Watch the overflow

What are the last three digits of N = 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + . . . + 2 ( 1000 ! ) ! N=2^{(1!)!}+ 2^{(2!)!}+...+2^{(1000!)!} ?


The answer is 454.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

24 solutions

Akshaj Kadaveru
May 20, 2014

The last three digits of a number is equivalent to the number reduced m o d 1000 \mod 1000 . To compute this, we can seperately consider m o d 125 \mod 125 and m o d 8 \mod 8 , and combine them at the end.

First notice that 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 \pmod{125} by Euler's Totient Theorem. Therefore, for all integers 100 k 100|k , 2 k 1 ( m o d 125 ) 2^k \equiv 1 \pmod{125} .

Now notice for all integers n 4 n \ge 4 , n ! 24 n! \ge 24 , so ( n ! ) ! (n!)! , when multiplied out, includes 2 , 5 , 10 2,5,10 , meaning 100 ( n ! ) ! 100|(n!)! . Therefore, i = 4 1000 2 ( i ! ) ! i = 4 1000 1 997 3 ( m o d 125 ) \displaystyle\sum_{i=4}^{1000} 2^{(i!)!} \equiv \displaystyle\sum_{i=4}^{1000}1 \equiv 997 \equiv -3 \pmod{125}

Our sum can therefore be written, in m o d 125 \mod 125 as 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 3 ) = 2 + 4 + 2 720 3 = 3 + 2 720 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + (-3) = 2 + 4 + 2^{720} - 3 = 3 + 2^{720}

This can be reduced further using our formerly mentioned identity 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 \pmod{125} , giving 3 + 2 720 = 3 + 2 20 3 + 2^{720} = 3 + 2^{20} . Now computing this is easy because 2 10 = 1024 24 2^{10} = 1024 \equiv 24 , so 3 + 2 20 3 + 2 4 2 579 79 3 + 2^{20} \equiv 3 + 24^2 \equiv 579 \equiv 79

Therefore, our expression is 79 ( m o d 125 ) 79 \pmod{125}

It is evident that all terms in our sum save 2 ( 1 ! ) ! 2^{(1!)!} and 2 ( 2 ! ) ! 2^{(2!)!} are divisible by 8 8 , so reducing m o d 8 \mod 8 gives 2 + 4 + 0 6 ( m o d 8 ) 2 + 4 + 0 \equiv 6 \pmod{8}

We have now deduced N 79 ( m o d 125 ) N \equiv 79 \pmod{125} and N 6 ( m o d 8 ) N \equiv 6 \pmod{8} .

The values that are 79 ( m o d 125 ) 79 \pmod{125} can be expressed as 79 + 125 y 79 + 125y . Taking this m o d 8 \mod 8 gives 1 + 5 y -1 + 5y , which we want to be 6 ( m o d 8 ) 6 \pmod{8} . Trying values shows that y = 3 y = 3 works, so N 79 + 3 125 = 454 ( m o d 1000 ) N \equiv 79 + 3\cdot 125 = 454 \pmod{1000} .

Therefore, our answer is 454 \boxed{454} .

If you want to use 2 100 376 ( m o d 1000 ) 2^{100} \equiv 376 \pmod{1000} , you will need to establish that somewhere, as it is not immediately obvious.

Calvin Lin Staff - 7 years ago
Diego Roque
May 20, 2014

We want the number N m o d 1000 N\mod{1000} , and 1000 = 8 125 1000=8\cdot 125 . For n 3 n\geq 3 , ( n ! ) ! ( 3 ! ) ! = 720 3 (n!)!\geq (3!)!=720\geq 3 so 2 ( n ! ) ! 2^{(n!)!} is multiple of 8 8 for n 3 n\geq 3 , and 2 ( 1 ! ) ! + 2 ( 2 ! ) ! = 2 1 + 2 2 = 6 2^{(1!)!}+2^{(2!)!}=2^1+2^2=6 , so N 6 m o d 8 N\equiv 6 \mod{8} .

Now, as ( 125 , 2 ) = 1 (125,2)=1 , we can use Euler to deduce(knowing that ϕ ( 5 3 ) = 5 3 5 2 = 100 \phi (5^3)=5^3-5^2=100 ) that 2 100 1 m o d 125 2^{100}\equiv 1\mod{125} . We know that n ! 0 m o d 100 n!\equiv 0\mod{100} for n 10 n\geq 10 , and n ! 10 n!\geq 10 for n 4 n\geq 4 . So for n 4 n\geq 4 , 2 ( n ! ) ! 2 100 k ( 2 100 ) k 1 m o d 125 2^{(n!)!}\equiv 2^{100\cdot k}\equiv (2^{100})^{k}\equiv 1\mod{125} . Together with 2 ( 3 ! ) ! 2 720 2 20 ( 2 10 ) 2 ( 1024 ) 2 2 4 2 576 m o d 1000 2^{(3!)!}\equiv 2^{720} \equiv 2^{20}\equiv (2^{10})^2\equiv (1024)^2\equiv 24^2\equiv 576 \mod{1000} and 2 ( 1 ! ) ! + 2 ( 2 ! ) ! = 6 2^{(1!)!}+2^{(2!)!}=6 , we got N 6 + 576 + 997 1 1579 79 m o d 125 N\equiv 6+576+997\cdot 1\equiv 1579\equiv 79\mod{125} .

So N 6 m o d 8 N\equiv 6 \mod{8} and N 79 m o d 125 N\equiv 79\mod{125} . So N = 125 k + 79 5 k + 7 6 m o d 8 N=125k+79\equiv 5k+7\equiv 6\mod{8} , then 5 k 1 5k\equiv -1 then k 3 m o d 8 k\equiv 3\mod{8} . So N 125 3 + 79 454 m o d 1000 N\equiv 125\cdot 3 +79\equiv 454\mod{1000} .

Thus, the last three digits are 454 454 .

Sambit Senapati
May 20, 2014

We begin by computing N modulo 8 and N modulo 125.

We know, N 6 ( m o d 8 ) N \equiv 6 (mod 8) and 2 100 1 ( m o d 125 ) 2^{100} \equiv 1(mod 125) (from Euler's theorem).

Note that, (4!)! onwards all the powers are divisible by 100.

So, N 2 + 4 + 2 720 + 997 ( m o d 125 ) N \equiv 2+4+2^{720}+997 (mod 125) N 3 + 2 20 ( m o d 125 ) \implies N \equiv 3+2^{20} (mod 125) .

Again, 2 8 6 ( m o d 125 ) 2^{8} \equiv 6 (mod 125) 2 20 36 16 ( m o d 125 ) \implies 2^{20} \equiv 36*16 (mod 125) 2 20 76 ( m o d 125 ) \implies 2^{20} \equiv 76 (mod 125)

This means N 79 ( m o d 125 ) N \equiv 79 (mod 125) .

Also, G C D ( 8 , 125 ) = 1 GCD(8,125)=1 , and 8 ( 47 ) + 125 ( 3 ) = 1 8(47)+125(-3)=1 (from Euclid's Division algorithm).

So, applying Chinese remainder theorem we get, N 79 8 47 6 125 3 ( m o d 1000 ) N \equiv 79*8*47-6*125*3 (mod 1000)

Thus, N 454 ( m o d 1000 ) N \equiv 454 (mod 1000) .

Kevin Sun
May 20, 2014

We attempt to compute this modulo 8 and 125, because we can use CRT to compute this mod 1000. It should be obvious that this is 6 mod 8, because the last 997 terms disappear mod 8. When k >= 4, then k! >= 24. Thus 100 | k, which means that 2 ( k ! ) ! 1 ( m o d 125 ) 2^{(k!)!} \equiv 1 \pmod{125} . Thus N 997 + 2 + 2 2 + 2 7 20 79 ( m o d 125 ) N \equiv 997 + 2 + 2^2 + 2^720 \equiv 79 \pmod{125} . Thus the last three digits of N are 454.

Thomas Beuman
Jul 29, 2013

Finding the last three digits is equivalent to determining the remainder modulo 1000. By the Chinese remainder theorem, we can consider modulo 8 and modulo 125 separately.

Modulo 8, we easily see that 2 ( 1 ! ) ! 2 2^{(1!)!} \equiv 2 , 2 ( 2 ! ) ! 4 2^{(2!)!} \equiv 4 and 2 ( k ! ) ! 0 2^{(k!)!} \equiv 0 for all k > 2 k > 2 . Therefore, N 6 ( mod 8 ) N \equiv 6 \ (\text{mod } 8) .

Modulo 125, by Euler's theorem, we have that 2 100 1 2^{100} \equiv 1 , since ϕ ( 125 ) = 100 \phi(125) = 100 . Therefore, 2 ( k ! ) ! 1 2^{(k!)!} \equiv 1 for all k > 3 k > 3 , as the exponent is a multiple of 100. For the smaller cases, we have 2 ( 1 ! ) ! 2 2^{(1!)!} \equiv 2 , 2 ( 2 ! ) ! 4 2^{(2!)!} \equiv 4 and 2 ( 3 ! ) ! = 2 720 2 20 76 2^{(3!)!} = 2^{720} \equiv 2^{20} \equiv 76 . Hence

N 2 + 4 + 76 + 997 1 1079 79 ( mod 125 ) N \equiv 2+4+76+997\cdot1 \equiv 1079 \equiv 79 \ (\text{mod } 125) .

Combining the two results modulo 8 and 125 (with the Chinese remainder theorem guaranteeing that there is a unique solution), we find that we must have N 454 ( mod 1000 ) N \equiv 454 \ (\text{mod } 1000) .

Can you explain the CRT step in a bit more detail - did you run the extended Euclidean algorithm, or is there a shortcut that gets us quickly from 6,8,79,125 to 454?

Matt McNabb - 7 years, 10 months ago

Log in to reply

Let z z be the last 3 3 digits, then since we already know the congruence's, we can write z = 125 k + 79 z= 125k + 79 .

Now we know that z 6 ( m o d 8 ) z \equiv 6 \pmod{8} .

5 k + 7 6 ( m o d 8 ) \Rightarrow 5k + 7 \equiv 6 \pmod{8}

k 3 ( m o d 8 ) \Rightarrow k \equiv 3 \pmod{8}

So k = 8 y + 3 k= 8y + 3 .

Use that z 1000 z \leq 1000 to get that y = 0 y=0 .

And z = 454 z= 454 .

Note that y , k y,k are non-negative integers.

Aditya Parson - 7 years, 10 months ago

How is mode 2(k!) mode 125 = 1 for k>3?

Snehal Raj - 7 years, 10 months ago

Awesome!

Jinyi Wu - 7 years, 10 months ago
Sai Krishna
May 20, 2014

1000=125 8 125,8 are coprimes. N=2+4+M(8)... N=6mod8 0r N-6=M(8) since (2,125)=1 so by euler's theorem 2^100=1mod125 in the expression for N from 4th term we see that powers are multiples of100 so they all are 1mod125. N=(2+4+2^720+997) mod125....again 2^720=2^700 2^20=2^20mod125 2^20=76mod125 (2^20=2^14*2^6 and 2^14=(125+3)^2) so N=2+4+76+997mod125=79mod125 or N-79=M(125) our goal is to express N-k=0mod8 and N-k=0mod125... so we find the least x and y satisfying 125x+79=6+8y..we get x=3 and y=56.... we get N-454=0mod8 and 0mod125 this means that N-454=0mod1000(125,8 are coprimes) N=454mod1000 so 454 are the last 3 digits

Hamza Khatri
May 20, 2014

2^((1!)!) = 2^1 = 2 2^((2!)!) = 2^2 = 4 2^((3!)!) = 2^6! = 2^720 2^((4!)!) = 2^24! = 2^(a multiple of 400)

Now - the key here becomes the cycle of powers of 2 mod 1000. Since φ(1000) = (5^3 - 5^2) * (2^3 - 2^2) = 100 * 4 = 400, the longest possible cycle for powers of 2 mod 1000 is 400.

So the answer will be the last three digits of the first three terms:

2+4+ (2^720 mod 1000)

We can quickly find that: 2^10 = 1024 ≡ 24 mod 1000 2^20 ≡ 24^2 ≡ 576 mod 1000 ... If you continue like this, you'll find that 2^n repeats mod 1000 for every 100 values of n, and 2^100 ≡ 376 mod 1000. So:

2+4+ 2^720 + 997*376 ≡ 6 + 2^20 ≡ 6 + 576 + 872 mod 1000

≡ 454 mod 1000

And the last three digits are 454.

Taehyung Kim
Jul 28, 2013

We need to take mod 1000 so we can take mod 125 and mod 8 and then use the chinese remainder theorem. Also, ϕ ( 125 ) = 100 \phi(125) = 100 so we see that when n 4 n \ge 4 2 ( n ! ) ! 2 0 1 ( m o d 125 ) 2^{(n!)!} \equiv 2^0 \equiv 1\pmod{125} by Euler's Theorem (note that when n 4 n \ge 4 , we have n ! 24 n! \ge 24 which will give 5 2 5^2 and 2 2 2^2 as factors). Also, we know that ( n ! ) ! > 3 (n!)! > 3 for all n > 4 n > 4 so 2 ( n ! ) ! 0 ( m o d 8 ) 2^{(n!)!} \equiv 0\pmod{8} Thus we get 2 ( n ! ) ! 376 ( m o d 1000 ) 2^{(n!)!} \equiv 376 \pmod{1000} by the Chinese Remainder Theorem. Since there are 997 997 terms such that n > 4 n > 4 so our answer must be 2 1 + 2 2 + 2 720 + 997 376. 2^1 + 2^2 + 2^{720} + 997\cdot 376. We can use Euler's Theorem again on 2 720 2^{720} to get 2 720 2 20 ( 2 8 ) 2 2 4 6 2 2 4 576 ( m o d 125 ) 2^{720} \equiv 2^{20} \equiv (2^8)^2\cdot 2^4 \equiv 6^2\cdot 2^4 \equiv 576 \pmod {125} Also 2 720 576 ( m o d 8 ) 2 720 576 ( m o d 1000 ) 2^{720} \equiv 576\pmod8\implies 2^{720} \equiv 576 \pmod{1000} . Now we have the answer. 2 + 4 + 576 + 997 376 454 ( m o d 1000 ) 2 + 4 + 576+ 997\cdot 376 \equiv 454 \pmod{1000}

how did you find out: euler fn of 125 equals 100???

Nupur Prasad - 7 years, 10 months ago

2 1 ! ) ! 2^{1!)!} = 2 1 2^{1} = 2 2^(2!)! = 2^2 =4 2^(3!)! = 2^720 2^(4!)!=2^24!=2^(a multiple of 400)

We are taking 1000 since we want last three digits of the no. 2^100=376 mod 1000 2^200 = 376 mod 1000 2^300= 376 mod 1000 2^400 = 376 mod 1000 ................ 1000 as factors 5^3,2^3,1 The last three digits will repeat after (5^3-5^2)*(2^3-2^2)= 400

Hence after 2^(4!)! the last three digits will always be 376 since each and every no. after 24! is a multiple of 400.

Therefor the answer:- 2+4+(last three digits of 2^720)+ (last three digits of 997*376) 997 since leaving the first three terms (1000-3) 997 terms are remaining

Since 720 is divisible of 24 therefore last three digits of 2^24 is 576 (2^24=576 mod 1000) therefor last three digits of 720 is also 576 997*376=374872 last three digits 872 2+4+576+872 1454 answer=454

Suspected cheater

http://in.answers.yahoo.com/question/index?qid=20130210173553AAUFjya

Calvin Lin Staff - 7 years ago
Cody Johnson
May 20, 2014

This problem's answer is given by ( i = 1 1000 2 ( i ! ) ! ) m o d 1000 \left(\sum_{i=1}^{1000} 2^{\left(i!\right)!}\right) \mod{1000} . Now notice that 2 100 n 376 m o d 1000 2^{100n} \equiv 376 \mod{1000} for all n > 0 n>0 . Also, since ( n ! ) ! 0 m o d 100 \left(n!\right)! \equiv 0 \mod{100} for all n > 0 n>0 , the answer would be the last three digits of 376 ( 1000 4 + 1 ) + i = 1 3 2 ( i ! ) ! 376\left(1000-4+1\right) + \sum_{i=1}^3 2^{\left(i!\right)!} . This can easily be computed to be 454 454 .

We begin by simplifying the exponent of some of the first few terms. The first four terms will then be: 2 + 2^2 + 2^6! + 2^24! 2^n*100 will always have 376 as its last three digits. Since, 10! has zero as its two last digits, any k! in which k is greater than 10 will yield a 376 as last three digits when it is raised to two. Thus, the terms starting from 2^(4!)! will have 376 as its last three digits.

the only problem now is the last three digits of 2^6! 2^6! = 2^720, we can write this in a different way, that is, 2^6! = (2^700)(2^10)(2^10) 2^700 will have a last three digits of 376. and 2^10 has a 024 as its last three digits. 376 24 24 has a last three digits of 576. Now, replacing all the terms with the last three digits we get, we will have 2 + 4 + 576 + 997(376) by getting 997(376) mod 1000, we will obtain 872. We can now replace 997(376) by 872 from our equation. 2 + 4 + 576 + 872, adding them all and getting its mod 1000, we will have 454.

Ivan Koswara
Jul 30, 2013

We will utilize the Euler's formula: a φ ( m ) 1 m o d m a^{\varphi(m)} \equiv 1 \bmod m when gcd ( a , m ) = 1 \gcd(a,m) = 1 .

First, φ ( 125 ) = 125 4 5 = 100 \varphi(125) = 125 \cdot \dfrac{4}{5} = 100 , by the formula of Euler's totient function . So 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 \pmod{125} , and so 2 100 n ( 2 100 ) n 1 n 1 ( m o d 125 ) 2^{100n} \equiv (2^{100})^n \equiv 1^n \equiv 1 \pmod{125} for all positive integer n n . Also, 2 n 0 ( m o d 8 ) 2^{n} \equiv 0 \pmod{8} for all n 3 n \ge 3 ; in particular, 2 100 n 0 ( m o d 8 ) 2^{100n} \equiv 0 \pmod{8} for all positive integer n n . So, by the Chinese remainder theorem we get 2 100 n 376 ( m o d 1000 ) 2^{100n} \equiv 376 \pmod{1000} for all positive integer n n .

Now, when n 4 n \ge 4 , n ! 24 n! \ge 24 , so ( n ! ) ! (n!)! contains the factors 10 , 20 10, 20 and so ( n ! ) ! (n!)! is divisible by 100 100 . So for all n 4 n \ge 4 , 2 ( n ! ) ! = 2 100 k 2^{(n!)!} = 2^{100k} for some k k . We invoke the result we proved in the second paragraph, so 2 ( n ! ) ! 376 ( m o d 1000 ) 2^{(n!)!} \equiv 376 \pmod{1000} for all n 4 n \ge 4 .

Next, we figure out the remaining three values:

  • 2 ( 1 ! ) ! = 2 1 ! = 2 1 = 2 2^{(1!)!} = 2^{1!} = 2^1 = 2
  • 2 ( 2 ! ) ! = 2 2 ! = 2 2 = 4 2^{(2!)!} = 2^{2!} = 2^2 = 4
  • 2 ( 3 ! ) ! = 2 6 ! = 2 720 = 2 700 2 20 2^{(3!)!} = 2^{6!} = 2^{720} = 2^{700} \cdot 2^{20} , so 2 ( 3 ! ) ! 2 700 2 20 376 2 20 ( m o d 1000 ) 2^{(3!)!} \equiv 2^{700} \cdot 2^{20} \equiv 376 \cdot 2^{20} \pmod{1000} . Also, 2 20 = 1048576 2^{20} = 1048576 is computable by a calculator, so 2 ( 3 ! ) ! 376 1048576 394264576 576 ( m o d 1000 ) 2^{(3!)!} \equiv 376 \cdot 1048576 \equiv 394264576 \equiv 576 \pmod{1000} .

Finally, we just sum up everything:

2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 2 ( 4 ! ) ! + + 2 ( 1000 ! ) ! ) 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + (2^{(4!)!} + \ldots + 2^{(1000!)!})

2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 376 + + 376 ) ( m o d 1000 ) \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + (376 + \ldots + 376) \pmod{1000}

2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 376 997 ) ( m o d 1000 ) \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + (376 \cdot 997) \pmod{1000}

2 + 4 + 576 + ( 376 997 ) ( m o d 1000 ) \equiv 2 + 4 + 576 + (376 \cdot 997) \pmod{1000}

2 + 4 + 576 + 374872 ( m o d 1000 ) \equiv 2 + 4 + 576 + 374872 \pmod{1000}

375454 ( m o d 1000 ) \equiv 375454 \pmod{1000}

454 ( m o d 1000 ) \equiv \boxed{454} \pmod{1000}

...which is the last three digits of N N .

The last three digits of N N is the remainder in the division of N N by 1000. 1000. We first compute the number N N modulo 8 8 and the number N N modulo 125. 125. Since 2 3 0 ( m o d 8 ) 2^3 \equiv 0 \pmod{8} and ( n ! ) ! 0 ( m o d 3 ) (n!)! \equiv 0 \pmod{3} for all n 3 n\ge 3 , it follows that 2 ( n ! ) ! 0 ( m o d 8 ) 2^{(n!)!} \equiv 0 \pmod{8} for all n 3 n\ge 3 , so that N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! 6 ( m o d 8 ) . N \equiv 2^{(1!)!}+2^{(2!)!} \equiv 6 \pmod 8. Now by the Fermat-Euler Theorem, we have 2 φ ( 125 ) 1 ( m o d 125 ) . 2^{\varphi(125)} \equiv 1 \pmod{125}. Since φ ( 125 ) = 5 3 5 2 = 100 \varphi(125) = 5^3-5^2 = 100 , this implies 2 100 1 ( m o d 125 ) . 2^{100} \equiv 1 \pmod{125}. Since ( n ! ) ! 0 ( m o d 100 ) (n!)! \equiv 0 \pmod{100} for all n 4 , n\ge 4, we have 2 ( n ! ) ! 1 ( m o d 125 ) 2^{(n!)!} \equiv 1 \pmod{125} for all n 4 , n\ge 4, so that N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 1 + + 1 ) 997 3 + 2 720 ( m o d 125 ) . N \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} +\underbrace{(1 + \cdots+1)}_{997} \equiv 3 + 2^{720} \pmod{125}. By using the fact that 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 \pmod{125} and 2 10 = 1024 24 101 ( m o d 125 ) , 2^{10} = 1024 \equiv 24 \equiv -101 \pmod{125}, we further reduce 2 720 2 20 10 1 2 10000 + 200 + 1 201 76 ( m o d 125 ) . 2^{720} \equiv 2^{20} \equiv 101^2 \equiv 10000+200 + 1\equiv 201 \equiv 76 \pmod{125}. Hence, N 3 + 76 79 ( m o d 125 ) . N \equiv 3 + 76 \equiv 79 \pmod{125}. From N 6 ( m o d 8 ) , N \equiv 6 \pmod{8}, we have N = 6 + 8 s N =6 +8s for some s Z . s\in\mathbb{Z}. Substituting this into the congruence N 79 ( m o d 125 ) , N\equiv 79 \pmod{125}, we have 8 s 73 ( m o d 125 ) s 73 ( 8 1 ) 73 47 56 ( m o d 125 ) . 8s \equiv 73 \pmod{125} \implies s \equiv 73(8^{-1}) \equiv 73\cdot 47 \equiv 56 \pmod{125}. That is s = 56 + 125 t s=56+ 125t for some t Z . t\in\mathbb{Z}. So N = 6 + 8 s = 6 + 8 ( 56 + 125 t ) = 454 + 1000 t 454 ( m o d 1000 ) . N = 6 + 8s = 6 +8(56+125t) =454 + 1000t \equiv 454 \pmod{1000} . Hence the last three digits of the integer N N is 454 . \boxed{454}.

Aditya Parson
Jul 29, 2013

Working this equation modulo 8 8 , it is clear that except the first two terms the rest are all divisible by 8 8 . So, we write N 2 + 2 ( 2 ! ) + 0 + 0... + 0 ( m o d 8 ) N \equiv 2 + 2^{(2!)} + 0+0...+0 \pmod{8} . N 6 ( m o d 8 ) \Rightarrow N \equiv 6 \pmod{8} .

Now we will work this equation modulo 125 125 . Note that ϕ ( 125 ) = 100 \phi(125)=100 .

So by the Euler's theorem we can state that 2 100 k 1 ( m o d 125 ) 2^{100k} \equiv 1 \pmod{125} [ k k is any non-negative integer.]

Clearly the term 2 ( 4 ! ) ! = 2 24 ! 2^{(4!)!} = 2^{24!} and those after it will have powers greater than 100 100 .[There are 997 997 such terms]

So, we write N 2 + 4 + 2 720 + 997 ( 1 ) ( m o d 125 ) N \equiv 2 + 4 + 2^{720} +997(1) \pmod{125}

Now, using the properties of modular arithmetic we get that 2 720 2 95 76 ( m o d 125 ) 2^{720} \equiv 2^{95} \equiv 76 \pmod{125}

N 79 ( m o d 125 ) \Rightarrow N \equiv 79 \pmod{125}

So, we have the following system of linear congruence's:

N 6 ( m o d 8 ) N \equiv 6 \pmod{8}

N 79 ( m o d 125 ) N \equiv 79 \pmod{125}

Using the Chinese remainder Theorem we get that N 454 ( m o d 1000 ) N \equiv 454 \pmod {1000}

So the last 3 3 digits are 454 \boxed{454} .

Note that ϕ ( n ) \phi(n) denotes the Euler's totient function.

Aditya Parson - 7 years, 10 months ago

Note that ϕ ( n ) \phi(n) denotes the Euler's totient function.

Aditya Parson - 7 years, 10 months ago

Note that ϕ ( n ) \phi(n) denotes Euler's Totient Function.

Aditya Parson - 7 years, 10 months ago
Jeremy Kong
Jul 29, 2013

Let f ( n ) = 2 n ( m o d 1000 ) \mathrm{f}(n) = 2^n \left(\mathrm{mod}\: 1000 \right) .

Observe that f ( 100 ) = ( 2 10 ) 10 ( m o d 1000 ) = 2 4 10 ( m o d 1000 ) = ( 2 3 × 3 ) 10 ( m o d 1000 ) \mathrm{f}(100) = (2^{10})^{10} \left(\mathrm{mod}\: 1000 \right)\ = 24^{10} \left(\mathrm{mod}\: 1000 \right) = (2^3 \times 3)^{10} \left(\mathrm{mod}\: 1000 \right) . This can be reduced to ( 2 10 ) 3 × 3 10 ( m o d 1000 ) = ( 2 4 3 × 49 ) ( m o d 1000 ) = 376 (2^{10})^3 \times 3^{10} \left(\mathrm{mod}\: 1000 \right) = (24^3 \times 49) \left(\mathrm{mod}\: 1000 \right) = 376 .

Also observe that 37 6 2 = 376 ( m o d 1000 ) 376^2 = 376 \left(\mathrm{mod}\: 1000 \right) . From this, we can deduce that f ( 100 k ) = 376 \mathrm{f}(100k) = 376 for integer k k .

Thus, letting g ( n ) = f ( ( n ! ) ! ) \mathrm{g}(n) = \mathrm{f}((n!)!) we need N = i = 1 1000 g ( i ) N = \sum_{i = 1}^{1000} \mathrm{g}(i) . Evidently, for all i 4 i \geq 4 , ( i ! ) ! (i!)! is some multiple of 100 100 and thus g ( i ) = f ( ( i ! ) ! ) = 376 \mathrm{g}(i) = \mathrm{f}((i!)!) = 376 .

It remains to calculate g ( 1 ) \mathrm{g}(1) through g ( 3 ) \mathrm{g}(3) . We can easily compute g ( 1 ) = 2 \mathrm{g}(1) = 2 and g ( 2 ) = 4 \mathrm{g}(2) = 4 .

We have g ( 3 ) = 2 720 ( m o d 1000 ) = 376 × 2 20 ( m o d 1000 ) = 576 \mathrm{g}(3) = 2^{720} \left(\mathrm{mod}\: 1000 \right) = 376 \times 2^{20} \left(\mathrm{mod}\: 1000 \right) = 576 .

Thus, the last three digits of N N are given by 376 × 997 + 576 + 4 + 2 ( m o d 1000 ) 376 \times 997 + 576 + 4 + 2 \:\left(\mathrm{mod}\: 1000 \right) . Since we are working modulo 1000 1000 this can be simplified to 376 × ( 3 ) + 576 + 4 + 2 = 546 ( m o d 1000 ) 376 \times (-3) + 576 + 4 + 2 = -546 \left(\mathrm{mod}\: 1000 \right) , giving us a final answer of 454 \boxed{454} (it is obvious that N N is positive).

Jimmy Kariznov
Jul 28, 2013

To find N ( m o d 1 0 3 ) N \pmod{10^3} , it suffices to find N ( m o d 2 3 ) N \pmod{2^3} and N ( m o d 5 3 ) N \pmod{5^3} .

.

For k 3 k \ge 3 , we have k ! 6 k! \ge 6 , and ( k ! ) ! 6 ! = 720 (k!)! \ge 6! = 720 .

Hence, 2 ( k ! ) ! 0 ( m o d 2 3 ) 2^{(k!)!} \equiv 0 \pmod{2^3} for all k 3 , 1000 k \in \overline{3,1000} . Therefore:

N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 0 + + 0 2 1 + 2 2 = 6 ( m o d 8 ) N \equiv 2^{(1!)!} + 2^{(2!)!} + 0 + \cdots + 0 \equiv 2^1 + 2^2 = 6 \pmod{8} .

.

Since ϕ ( 5 3 ) = 4 5 2 = 100 \phi(5^3) = 4 \cdot 5^2 = 100 and gcd ( 2 , 5 ) = 1 \text{gcd}(2,5) = 1 , we have 2 100 1 ( m o d 5 3 ) 2^{100} \equiv 1 \pmod{5^3} .

For k 4 k \ge 4 , we have k ! 24 > 10 k! \ge 24 > 10 , and thus, ( k ! ) ! 0 ( m o d 100 ) (k!)! \equiv 0 \pmod{100} .

Hence, 2 ( k ! ) ! 1 ( m o d 5 3 ) 2^{(k!)!} \equiv 1 \pmod{5^3} for all k 4 , 1000 k \in \overline{4,1000} . Therefore:

N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 1 + + 1 997 ones N \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + \underbrace{1 + \cdots + 1}_{997 \ \text{ones}} 2 1 + 2 2 + 2 720 + 997 \equiv 2^1 + 2^2 + 2^{720} + 997 2 20 + 3 \equiv 2^{20} + 3 ( 2 10 ) 2 + 3 \equiv (2^{10})^2 + 3 102 4 2 + 3 \equiv 1024^2 + 3 2 4 2 + 3 \equiv 24^2+3 579 \equiv 579 79 ( m o d 125 ) \equiv 79 \pmod{125} .

.

Since N 6 454 ( m o d 8 ) N \equiv 6 \equiv 454 \pmod{8} and N 79 454 ( m o d 125 ) N \equiv 79 \equiv 454 \pmod{125} , by the Chinese Remainder Theorem , we must have N 454 ( m o d 1000 ) N \equiv 454 \pmod{1000} .

Therefore, the last three digits of N N are 454 \boxed{454} .

We have to evaluate the sum N = i = 1 1000 2 ( i ! ) ! N= \sum_{i=1}^{1000} 2^{(i!)!} modulo 1000 1000 , which is equivalent to evaluating it modulo 125 125 and modulo 8 8 separately. Note that 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 (mod 125) (from Euler's Totient Theorem). Thus, 100 100 is the order of 2 2 mod 125 125 [note that the factors of 100 100 are 1 1 , 2 2 , 4 4 , 5 5 , 10 10 , 20 20 , and 50 50 , and none of them satisfy the condition]. So if m m is a positive integer which is divisible by 100 100 , 2 m 1 ( m o d 125 ) 2^m \equiv 1 (mod 125) . Now we shall find the smallest positive integer p p such that ( p ! ) ! ) (p!)!) is a multiple of 100 100 . If we can find such p p , then we have to evaluate the sum up to 2 p 1 2^{p-1} , because for all larger terms q q , 100 ( q ! ) ! 100 \mid (q!)! , hence 2 ( q ! ) ! 1 ( m o d 125 ) 2^{(q!)!} \equiv 1 (mod 125) , and the rest of the sum can be evaluated easily. Checking, we find out that n = 1 n= 1 does not work, n = 2 n= 2 does not work, n = 3 n= 3 does not work, but n = 4 n= 4 works! So, i = 4 1000 2 ( i ! ) ! i = 4 1000 1 997 3 m o d ( 125 ) \sum_{i= 4}^{1000} 2^{(i!)!} \equiv \sum_{i= 4}^{1000} 1 \equiv 997 \equiv -3 mod(125) . Hence, the total sum is 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! 3 2 + 4 + 2 720 3 3 + 2 720 m o d ( 125 ) \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} - 3 \equiv 2 + 4 + 2^{720} - 3 \equiv 3 + 2^{720} mod(125) . Again, 2 100 1 ( m o d 125 ) 2^{100} \equiv 1 (mod 125) , so 2 720 2 20 ( 2 10 ) 2 ( 1024 ) 2 2 4 2 576 m o d ( 125 ) 2^{720} \equiv 2^{20} \equiv (2^{10})^2 \equiv (1024)^2 \equiv 24^2 \equiv 576 mod(125) . Hence, the total sum is 579 79 ( m o d 125 ) \equiv 579 \equiv 79 (mod 125) .

Now we have to evaluate this modulo 8 8 . Clearly, all terms after 2 ( 3 ! ) ! 2^{(3!)!} are divisible by 8 8 , so we have to evaluate only the first 2 2 terms, which is 6 6 . Hence, N 6 ( m o d 8 ) N \equiv 6(mod 8) .

From the Chinese Remainder Theorem, x x will have only 1 1 possible value modulo 1000 1000 . Checking cases, we find out that x 454 ( m o d 1000 ) x \equiv 454 (mod 1000) .

Lucas Reis
Jul 28, 2013

Since that ( n ! ) ! > 3 , n > 2 (n!)!>3, \forall n>2 , we have 8 2 ( n ! ) ! , n > 2 8|2^{(n!)!}, \forall n>2 and so N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! 6 m o d 8 N\equiv 2^{(1!)!}+2^{(2!)!}\equiv 6\mod 8 .

Now, by the Euler's Theorem, we have 2 100 1 ( m o d ( ) 125 ) 2^{100}\equiv 1\pmod(125) since that m d c ( 2 , 125 ) = 1 mdc(2, 125)=1 and φ ( 125 ) = 100 \varphi(125)=100 and it's easy to see that 100 n ! , n 10 100 ( n ! ) ! , n 4 100|n!, \forall n\ge 10\Rightarrow 100|(n!)!, \forall n\ge 4 .

Then 2 ( n ! ) ! 2 100 k 1 ( m o d 125 ) , n 4 2^{(n!)!}\equiv 2^{100k}\equiv 1\pmod{125}, \forall n\ge 4 and ( ) N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 1 + 1 + + 1 997 ( m o d 125 ) (*)\quad N\equiv 2^{(1!)!}+2^{(2!)!}+2^{(3!)!}+\underbrace{1+1+\cdots+1}_{997}\pmod {125} .

We have 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! 2 + 2 2 + 2 720 2^{(1!)!}+2^{(2!)!}+2^{(3!)!}\equiv 2+2^{2}+2^{720}\equiv

2 + 2 2 + 2 20 2 + 4 + 76 82 ( m o d 125 ) 2+2^{2}+2^{20}\equiv 2+4+76\equiv 82 \pmod{125} .

So, by the ( ) (*) we have N 997 + 82 79 ( m o d 125 ) N\equiv 997+82\equiv 79\pmod{125} , and how N 6 ( m o d 8 ) N\equiv 6\pmod 8 , solving the two congruences we find N 454 ( m o d 1000 ) N\equiv 454\pmod{1000} .

Thus the last three digits of N N are 454 454 .

Thuc Vo Duy
Aug 2, 2013

2^100≡376 (mod 1000) ⟺2^100k≡〖376〗^k≡376 (mod 1000) 2^120≡2^100.2^20≡376.576≡576(mod 1000) 2^(1!)!=2≡2 (mod 1000) 2^(2!)!=2^2≡4 (mod 1000) 2^(3!)!=2^120≡576(mod 1000) From h=4 to 1000 we have 2^(k!)!=2^(k.100)≡376 (mod 1000) ⟹∑_(i=1)^1000▒2^(i!)! ≡2+4+576+376×997≡454 mod 1000 So the last three digits of N is 454

Russell Few
Aug 1, 2013

We note that if k 4 k \ge 4 , then ( k ! ) ! (k!)! is divisible by 100. Proof: Note that when k = 4 k=4 then we get ( 4 ! ) ! = 24 ! (4!)!=24! , which is divisible by 100. Note also that ( ( k + 1 ) ! ) ! ) ((k+1)!)!) is a multiple of ( k ! ) ! (k!)! , so all of ( k ! ) ! (k!)! where k 4 k \ge 4 is divisible by 100.

Thus by Euler Theorem and since ϕ ( 125 ) = 100 \phi(125)=100 , 2 100 1 ( m o d 125 ) 2^{100} \cong 1 (mod 125) . Hence all of 2 ( k ! ) ! 2^{(k!)!} where k 4 k \ge 4 is congruent to 1 ( m o d 125 ) 1 (mod 125) . Also, it is congruent to 0 ( m o d 8 ) 0 (mod 8) , so it is congruent to 376 ( m o d 1000 ) 376 (mod 1000) .

Note that 2 ( 1 ! ) ! = 2 2^{(1!)!}=2 and 2 ( 2 ! ) ! = 4 2^{(2!)!}=4 , and 2 ( 3 ! ) ! = 2 720 2^{(3!)!}=2^{720} . Note that 2 20 = 1048576 576 ( m o d 125 ) 2^{20}=1048576 \cong 576 (mod 125) and 2 100 1 ( m o d 125 ) 2^{100} \cong 1 (mod 125) . Thus 2 720 576 ( m o d 125 ) 2^{720} \cong 576 (mod 125) . It is also congruent to 0 ( m o d 8 ) 0 (mod 8) , thus it is congruent to 576 ( m o d 1000 ) 576 (mod 1000) .

Hence the sum that we need to evaluate is congruent to 2 + 4 + 576 + ( 376 ) ( 997 ) = 375454 2+4+576+(376)(997)=375454 , which is congruent to 454 ( m o d 1000 ) 454 (mod 1000) . Thus, the last 3 3 digits of the sum is 454 \boxed{454} .

Jiayang Zhao
Jul 31, 2013

By Euler's theorem, we know that for two relatively prime numbers a a and b b , a ϕ ( b ) 1 a^{\phi (b)} \equiv 1 (mod 125), where ϕ ( b ) \phi (b) is the Euler totient function, which counts the number of positive integers less than b b that are relatively prime to b b . Thus 2 ϕ ( 125 ) = 2 100 1 2^{\phi (125)} = 2^{100} \equiv 1 (mod 125).

Using this, we examine N N mod 125. For all integers n 4 n \geq 4 , ( n ! ) ! (n!)! is divisible by 100, and therefore we know that there is always some integer k k for which 2 ( n ! ) ! = 2 100 k 1 k 1 2^{(n!)!} = 2^{100k} \equiv 1^k \equiv 1 (mod 125).

N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 997 \therefore N \equiv 2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} + 997

2 + 4 + 2 720 + 997 3 + 2 720 3 + 2 20 \equiv 2+4+2^{720} + 997 \equiv 3+2^{720} \equiv 3+2^{20} (mod 125)

Note that 2 7 = 128 3 2^7 = 128 \equiv 3 (mod 125)

3 + 2 20 = 3 + 2 14 × 2 6 3 + 3 2 × 2 6 \therefore 3+2^{20} = 3+2^{14} \times 2^6 \equiv 3+3^2 \times 2^6

579 79 \equiv 579 \equiv 79 (mod 125)

Thus we know that N N mod 11 11 must be in the form 125 k + 79 125k +79 for some integer 0 k < 8 0 \leq k < 8 , and thus must be one of the following: 79 , 204 , 329 , 454 , 579 , 704 , 829 , 954 79, 204, 329, 454, 579, 704, 829, 954

However, we can also examine N N mod 8 8 . For all integers n 3 n \geq 3 , ( n ! ) ! > 8 (n!)! > 8 , thus 2 ( n ! ) ! 0 2^{(n!)!} \equiv 0 (mod 8).

N 2 ( 1 ! ) ! + 2 ( 2 ! ) ! 6 \therefore N \equiv 2^{(1!)!} + 2^{(2!)!} \equiv 6 (mod 8)

The only number in the earlier list of numbers that satisfies this is 454.

Michael Tang
Jul 31, 2013

We want to find N ( m o d 1000 ) , N \pmod{1000}, so we take each term of N N in modulo 8 8 and in modulo 125. 125. Notice that if k 4 , k \ge 4, then ( k ! ) ! 24 ! , (k!)! \ge 24!, so ( k ! ) ! (k!)! is divisible by ϕ ( 125 ) = 100. \phi(125) = 100. Then by Euler's Theorem, 2 ( k ! ) ! 2 0 = 1 ( m o d 125 ) . 2^{(k!)!} \equiv 2^0 = 1 \pmod{125}. Clearly 2 ( k ! ) ! 0 ( m o d 8 ) , 2^{(k!)!} \equiv 0 \pmod 8, so for k 4 k \ge 4 we have the system of congruences 2 ( k ! ) ! 1 ( m o d 125 ) , 2^{(k!)!} \equiv 1 \pmod{125}, 2 ( k ! ) ! 0 ( m o d 8 ) . 2^{(k!)!} \equiv 0 \pmod 8. By the Chinese Remainder Theorem, 2 ( k ! ) ! 376 ( m o d 1000 ) 2^{(k!)!} \equiv 376 \pmod{1000} is the only solution in modulo 1000. 1000. Thus, all terms of N , N, except for the first three, end in 376. 376.

Now we compute the last three digits of the first three terms.

  • The first term is 2 ( 1 ! ) ! = 2 1 = 2. 2^{(1!)!} = 2^1 = 2.

  • The second term is 2 ( 2 ! ) ! = 2 2 = 4. 2^{(2!)!} = 2^2 = 4.

  • The third term is 2 ( 3 ! ) ! = 2 720 . 2^{(3!)!} = 2^{720}. Using Euler's Theorem with modulo 125 , 125, we have 2 720 2 20 = 12 8 2 64 3 2 64 = 576 76 ( m o d 125 ) . 2^{720} \equiv 2^{20} = 128^2 \cdot 64 \equiv 3^2 \cdot 64 = 576 \equiv 76 \pmod{125}. Therefore, 2 720 576 ( m o d 1000 ) . 2^{720} \equiv 576 \pmod{1000}.

The sum of the last three digits of the terms is 2 + 4 + 576 + 997 ( 376 ) = 582 + ( 1000 3 ) 376 2+4+576+997(376) = 582 + (1000-3)376 582 3 ( 376 ) \equiv 582 - 3(376) 454 ( m o d 1000 ) . \equiv 454 \pmod{1000}. Hence, the last three digits of N N are 454 . \boxed{454}.

We need to calculate 2 n ! ! 2^{n!!} modulo 1000. We will do this by calculating the quantity modulo 8 and 125 and using Chinese remainder theorem.

First, note that 2 n ! ! 2^{n!!} divides 8 for n > 2 n>2 .

ϕ ( 125 ) = 100 \phi(125)=100 . Hence we have 2 100 1 2^{100}\equiv 1 modulo 125. But n ! ! n!! is a multiple of 100 for n > 3 n>3 . Hence 2 n ! ! 376 2^{n!!}\equiv 376 modulo 1000 for n > 3 n>3 .

Thus the required answer is

2 + 4 + 2 720 + 376 × 997 6 + 2 20 + 376 × 997 6 + 576 + 376 × 997 454 2+4+2^{720}+376\times 997\equiv 6 + 2^{20} + 376\times 997\equiv 6 + 576 + 376\times 997 \equiv 454 mod 1000.

Pi Han Goh
Jul 28, 2013

Essentially, we're finding N m o d 1000 N \bmod{1000}

Since 1000 = 8 × 125 1000 = 8 \times 125 , with gcd ( 8 , 125 ) = 1 \gcd(8,125) = 1 , we can solve N m o d 1000 N \bmod{1000} by Chinese Remainder Theorem.

Because ( 3 ! ) ! , ( 4 ! ) ! , ( 5 ! ) ! , , ( 1000 ! ) ! (3!)!, \space (4!)!, \space (5!)!, \ldots, (1000!)! are all greater than 3 3 , then 2 2 raised to the power of any of these terms are divisible by ( 2 3 = 8 ) (2^3=8) . So N m o d 8 = ( 2 ( 1 ! ) ! + 2 ( 2 ! ) ! ) m o d 8 = 6 N \bmod{8} = (2^{(1!)!} + 2^{(2!)!}) \bmod{8} = 6

Since gcd ( 2 , 125 ) = 1 \gcd(2,125) = 1 , we can apply Euler's totient function φ ( 125 ) = 125 ( 1 1 5 ) = 100 \Rightarrow \varphi (125) = 125(1- \frac {1}{5} ) = 100

And 5 24 ! , 10 24 ! , 4 24 ! 5 | 24!, 10 | 24!, 4 | 24! , so ( 4 ! ) ! (4!)! is divisible ( 4 × 5 × 5 = 100 (4 \times 5 \times 5 = 100 . Since ( 5 ! ) ! , ( 6 ! ) ! , ( 7 ! ) ! , , ( 1000 ! ) ! (5!)!, (6!)!, (7!)!, \ldots , (1000!)! are all multiples of ( 4 ! ) ! (4!)! , the third term (of N N ) onwards is divisible by 100 100 .

( 4 ! ) ! ( 5 ! ) ! ( 6 ! ) ! ( 1000 ! ) ! 0 ( m o d 1000 ) \Rightarrow (4!)! \equiv (5!)! \equiv (6!)! \equiv \ldots \equiv (1000!)! \equiv 0 \pmod{1000}

x m o d 125 = [ ( 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! ) \Rightarrow x \bmod{125} = [ (2^{(1!)!} + 2^{(2!)!} + 2^{(3!)!} )

+ ( 2 ( 4 ! ) ! + 2 ( 5 ! ) ! + + 2 ( 1000 ! ) ! ] m o d 125 \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space + ( 2^{(4!)!} + 2^{(5!)!} + \ldots + 2^{(1000!)!} ] \bmod{125}

x m o d 125 = [ ( 2 1 + 2 2 + 2 6 ! ) \Rightarrow x \bmod{125} = [ (2^1 + 2^2 + 2^{6!} )

+ ( 2 ( 4 ! ) ! m o d 100 + 2 ( 5 ! ) ! m o d 100 + + 2 ( 1000 ! ) ! m o d 100 ] m o d 125 + ( 2^{(4!)! \space \bmod{100}} + 2^{(5!)! \space \bmod{100}} + \ldots + 2^{(1000!)! \space \bmod{100}} ] \bmod{125}

x m o d 125 = [ ( 2 1 + 2 2 + 2 720 ) + ( 2 0 + + 2 0 ) ] m o d 125 \Rightarrow x \bmod{125} = [ (2^1 + 2^2 + 2^{720} ) + (2^0 + \ldots + 2^0) ] \bmod{125}

x m o d 125 = [ ( 6 + 2 720 m o d 100 ) + 997 ] m o d 125 \Rightarrow x \bmod{125} = [ (6 + 2^{720 \space \bmod{100} } ) + 997 ] \bmod{125}

x m o d 125 = [ 2 20 + 3 ] m o d 125 \Rightarrow x \bmod{125} = [ 2^{20} + 3 ] \bmod{125}

x m o d 125 = [ 2 2 ( 7 ) + 6 ) + 3 ] m o d 125 = ( 2 7 ) 2 ( 2 6 ) m o d 125 \Rightarrow x \bmod{125} = [ 2^{2(7)+6)} + 3 ] \bmod{125} = (2^7)^2 (2^6) \bmod{125}

x = ( 3 2 × 64 + 3 ) m o d 125 = 79 \Rightarrow x = (3^2 \times 64 +3 ) \bmod{125} = 79

Therefore, N N satisfy the linear congruences

x 6 ( m o d 8 ) , x 79 ( m o d 125 ) x \equiv 6 \pmod{8}, \space x \equiv 79 \pmod{125}

By Chinese remainder theorem, a 1 = 6 , a 2 = 79 , N 1 = n 2 = 125 , N 2 = n 1 = 8 a_1 = 6, a_2 = 79, N_1 = n_2 = 125, N_2 = n_1 = 8

Extended Euclidean algorithm:

gcd ( 125 , 8 ) = gcd ( 8 , 5 ) = 1 \gcd(125,8) = \gcd(8,5) = 1

1 = 2 ( 8 ) 3 ( 5 ) = 2 ( 8 ) 3 ( 125 5 ( 8 ) ) = 3 ( 125 ) + 47 ( 8 ) 1 = 2(8) - 3(5) = 2(8) -3(125-5(8)) = -3(125)+47(8)

y 1 = 3 + 8 = 5 , y 2 = 47 \Rightarrow y_1 =-3+8=5, \space y_2 = 47

x ( a 1 N 1 y 1 + a 2 N 2 y 2 ) m o d 1000 454 \Rightarrow x \equiv (a_1 N_1 y_1 + a_2 N_2 y_2) \bmod{1000} \equiv 454

Hence, N m o d 1000 = 454 N \bmod{1000} = \LARGE \boxed{454}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...