## experimentX 3 years ago Find the last 10 digit's of $$999^{999}$$ ?

1. amistre64

9*111 9*3*37 $(9*3*37)^9)^3)^{37}$ not sure if something like that would be a good idea

2. experimentX

well .. i was thinking like factoring it. it's a programming problem http://projecteuler.net/problem=48 if you do this directly on any language ... returns Not an integer

3. amistre64

i wouldnt know right off hand what that is :) but, maybe $(1000-1)^3)^9)^{37}$

4. experimentX

this looks promising $(1000 - 1)^{999} = \sum_{i=0}^{999} \binom{999}{i}1000^i$

5. amistre64

yes it does :)

6. amistre64

and maybe a (-1)^(999-i) perhaps

7. experimentX

yeah ... i can calculate it programatically (for this particular problem). I still need to generalize it to every terms. this won't be nice. this isn't nice. I hope there is nice algebra.

8. experimentX

gotta sleep .. we'll see this tomorrow.

9. amistre64

good luck ;)

10. Valpey

$999^{999}\mod 10^{10} = (1000-1)^{999}\mod 10^{10}=(10^3-1)^{999}\mod 10^{10}$$=\sum_{k=0}^{999}\binom{999}{k}(10^3)^k*(-1)^{999-k}\mod 10^{10}$$=\sum_{k=4}^{999}\binom{999}{k}(10^3)^k*(-1)^{999-k}\mod 10^{10}+\sum_{k=0}^{3}\binom{999}{k}(10^3)^k*(-1)^{999-k}\mod 10^{10}$ $=0+\sum_{k=0}^{3}\binom{999}{k}(10^3)^k*(-1)^{999-k}\mod 10^{10}$$\Big(\binom{999}{3}(10^3)^3-\binom{999}{2}(10^3)^2+\binom{999}{1}(10^3)^1-\binom{999}{0}(10^3)^0\Big)\mod 10^{10}$$\Big(\binom{999}{3}(10^3)^3-\binom{999}{2}(10^3)^2\Big)\mod 10^{10}+\binom{999}{1}(10^3)^1-\binom{999}{0}(10^3)^0$$\Big(\binom{999}{3}10^3-\binom{999}{2}\Big)*10^6\mod 10^{10}+999,000-1$$\Big(\Big(\binom{999}{3}10^3-\binom{999}{2}\Big)\mod 10^{4}\Big)*10^6+999,000-1$

11. perl

wow i cant understand this

12. perl

how did you get zero for |dw:1348816150400:dw|

13. perl

oh I see, because (10^3)^4 mod 10^10= 0

14. experimentX

this ain't easy ... you can write a short program to determine what are the first ten terms. still this is quite long.

15. perl

well ive never seen mod used in binomial problems this is cool

16. experimentX

well ... I'm still looking for some better method. this might blow up my processing chips

17. perl

valpeys solution is fine, why dont you use that?

18. experimentX

because that is only for particular 999 which I posed for this particular problem. My original problem is to find the first ten digits of $1^1 + 2^2 + 3^3 + ... + 1000^{1000}$

19. perl

oh

20. experimentX

for 999, the one is parts 1000 and 1 <--- this one factor makes things easy. for 998 the other part is 2 .... I can't ignore powers of 2

21. sauravshakya

The first ten digits of 1^1 +2^2 +3^3 +...+1000^1000 is the first ten digits of 1000^1000 As 1000^1000 > 10^10 *999^999

22. sauravshakya

And first ten digits of 1000^1000 is 1000000000 Thus, the first ten digit of 1^1+2^2+3^3+...+1000^1000 is 1000000000

23. experimentX

i think the problem is to find the last ten digit of it. You don't have to find out the solution using purely maths only, you can use computer to calculate. the problem is taken from here http://projecteuler.net/