What are the last three digits of N = 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + . . . + 2 ( 1 0 0 0 ! ) ! ?
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.
We want the number N m o d 1 0 0 0 , and 1 0 0 0 = 8 ⋅ 1 2 5 . For n ≥ 3 , ( n ! ) ! ≥ ( 3 ! ) ! = 7 2 0 ≥ 3 so 2 ( n ! ) ! is multiple of 8 for n ≥ 3 , and 2 ( 1 ! ) ! + 2 ( 2 ! ) ! = 2 1 + 2 2 = 6 , so N ≡ 6 m o d 8 .
Now, as ( 1 2 5 , 2 ) = 1 , we can use Euler to deduce(knowing that ϕ ( 5 3 ) = 5 3 − 5 2 = 1 0 0 ) that 2 1 0 0 ≡ 1 m o d 1 2 5 . We know that n ! ≡ 0 m o d 1 0 0 for n ≥ 1 0 , and n ! ≥ 1 0 for n ≥ 4 . So for n ≥ 4 , 2 ( n ! ) ! ≡ 2 1 0 0 ⋅ k ≡ ( 2 1 0 0 ) k ≡ 1 m o d 1 2 5 . Together with 2 ( 3 ! ) ! ≡ 2 7 2 0 ≡ 2 2 0 ≡ ( 2 1 0 ) 2 ≡ ( 1 0 2 4 ) 2 ≡ 2 4 2 ≡ 5 7 6 m o d 1 0 0 0 and 2 ( 1 ! ) ! + 2 ( 2 ! ) ! = 6 , we got N ≡ 6 + 5 7 6 + 9 9 7 ⋅ 1 ≡ 1 5 7 9 ≡ 7 9 m o d 1 2 5 .
So N ≡ 6 m o d 8 and N ≡ 7 9 m o d 1 2 5 . So N = 1 2 5 k + 7 9 ≡ 5 k + 7 ≡ 6 m o d 8 , then 5 k ≡ − 1 then k ≡ 3 m o d 8 . So N ≡ 1 2 5 ⋅ 3 + 7 9 ≡ 4 5 4 m o d 1 0 0 0 .
Thus, the last three digits are 4 5 4 .
We begin by computing N modulo 8 and N modulo 125.
We know, N ≡ 6 ( m o d 8 ) and 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) (from Euler's theorem).
Note that, (4!)! onwards all the powers are divisible by 100.
So, N ≡ 2 + 4 + 2 7 2 0 + 9 9 7 ( m o d 1 2 5 ) ⟹ N ≡ 3 + 2 2 0 ( m o d 1 2 5 ) .
Again, 2 8 ≡ 6 ( m o d 1 2 5 ) ⟹ 2 2 0 ≡ 3 6 ∗ 1 6 ( m o d 1 2 5 ) ⟹ 2 2 0 ≡ 7 6 ( m o d 1 2 5 )
This means N ≡ 7 9 ( m o d 1 2 5 ) .
Also, G C D ( 8 , 1 2 5 ) = 1 , and 8 ( 4 7 ) + 1 2 5 ( − 3 ) = 1 (from Euclid's Division algorithm).
So, applying Chinese remainder theorem we get, N ≡ 7 9 ∗ 8 ∗ 4 7 − 6 ∗ 1 2 5 ∗ 3 ( m o d 1 0 0 0 )
Thus, N ≡ 4 5 4 ( m o d 1 0 0 0 ) .
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 1 2 5 ) . Thus N ≡ 9 9 7 + 2 + 2 2 + 2 7 2 0 ≡ 7 9 ( m o d 1 2 5 ) . Thus the last three digits of N are 454.
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 ( 2 ! ) ! ≡ 4 and 2 ( k ! ) ! ≡ 0 for all k > 2 . Therefore, N ≡ 6 ( mod 8 ) .
Modulo 125, by Euler's theorem, we have that 2 1 0 0 ≡ 1 , since ϕ ( 1 2 5 ) = 1 0 0 . Therefore, 2 ( k ! ) ! ≡ 1 for all k > 3 , as the exponent is a multiple of 100. For the smaller cases, we have 2 ( 1 ! ) ! ≡ 2 , 2 ( 2 ! ) ! ≡ 4 and 2 ( 3 ! ) ! = 2 7 2 0 ≡ 2 2 0 ≡ 7 6 . Hence
N ≡ 2 + 4 + 7 6 + 9 9 7 ⋅ 1 ≡ 1 0 7 9 ≡ 7 9 ( mod 1 2 5 ) .
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 ≡ 4 5 4 ( mod 1 0 0 0 ) .
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?
Log in to reply
Let z be the last 3 digits, then since we already know the congruence's, we can write z = 1 2 5 k + 7 9 .
Now we know that z ≡ 6 ( m o d 8 ) .
⇒ 5 k + 7 ≡ 6 ( m o d 8 )
⇒ k ≡ 3 ( m o d 8 )
So k = 8 y + 3 .
Use that z ≤ 1 0 0 0 to get that y = 0 .
And z = 4 5 4 .
Note that y , k are non-negative integers.
How is mode 2(k!) mode 125 = 1 for k>3?
Awesome!
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
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.
We need to take mod 1000 so we can take mod 125 and mod 8 and then use the chinese remainder theorem. Also, ϕ ( 1 2 5 ) = 1 0 0 so we see that when n ≥ 4 2 ( n ! ) ! ≡ 2 0 ≡ 1 ( m o d 1 2 5 ) by Euler's Theorem (note that when n ≥ 4 , we have n ! ≥ 2 4 which will give 5 2 and 2 2 as factors). Also, we know that ( n ! ) ! > 3 for all n > 4 so 2 ( n ! ) ! ≡ 0 ( m o d 8 ) Thus we get 2 ( n ! ) ! ≡ 3 7 6 ( m o d 1 0 0 0 ) by the Chinese Remainder Theorem. Since there are 9 9 7 terms such that n > 4 so our answer must be 2 1 + 2 2 + 2 7 2 0 + 9 9 7 ⋅ 3 7 6 . We can use Euler's Theorem again on 2 7 2 0 to get 2 7 2 0 ≡ 2 2 0 ≡ ( 2 8 ) 2 ⋅ 2 4 ≡ 6 2 ⋅ 2 4 ≡ 5 7 6 ( m o d 1 2 5 ) Also 2 7 2 0 ≡ 5 7 6 ( m o d 8 ) ⟹ 2 7 2 0 ≡ 5 7 6 ( m o d 1 0 0 0 ) . Now we have the answer. 2 + 4 + 5 7 6 + 9 9 7 ⋅ 3 7 6 ≡ 4 5 4 ( m o d 1 0 0 0 )
how did you find out: euler fn of 125 equals 100???
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
This problem's answer is given by ( ∑ i = 1 1 0 0 0 2 ( i ! ) ! ) m o d 1 0 0 0 . Now notice that 2 1 0 0 n ≡ 3 7 6 m o d 1 0 0 0 for all n > 0 . Also, since ( n ! ) ! ≡ 0 m o d 1 0 0 for all n > 0 , the answer would be the last three digits of 3 7 6 ( 1 0 0 0 − 4 + 1 ) + ∑ i = 1 3 2 ( i ! ) ! . This can easily be computed to be 4 5 4 .
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.
We will utilize the Euler's formula: a φ ( m ) ≡ 1 m o d m when g cd ( a , m ) = 1 .
First, φ ( 1 2 5 ) = 1 2 5 ⋅ 5 4 = 1 0 0 , by the formula of Euler's totient function . So 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) , and so 2 1 0 0 n ≡ ( 2 1 0 0 ) n ≡ 1 n ≡ 1 ( m o d 1 2 5 ) for all positive integer n . Also, 2 n ≡ 0 ( m o d 8 ) for all n ≥ 3 ; in particular, 2 1 0 0 n ≡ 0 ( m o d 8 ) for all positive integer n . So, by the Chinese remainder theorem we get 2 1 0 0 n ≡ 3 7 6 ( m o d 1 0 0 0 ) for all positive integer n .
Now, when n ≥ 4 , n ! ≥ 2 4 , so ( n ! ) ! contains the factors 1 0 , 2 0 and so ( n ! ) ! is divisible by 1 0 0 . So for all n ≥ 4 , 2 ( n ! ) ! = 2 1 0 0 k for some k . We invoke the result we proved in the second paragraph, so 2 ( n ! ) ! ≡ 3 7 6 ( m o d 1 0 0 0 ) for all n ≥ 4 .
Next, we figure out the remaining three values:
Finally, we just sum up everything:
2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 2 ( 4 ! ) ! + … + 2 ( 1 0 0 0 ! ) ! )
≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 3 7 6 + … + 3 7 6 ) ( m o d 1 0 0 0 )
≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( 3 7 6 ⋅ 9 9 7 ) ( m o d 1 0 0 0 )
≡ 2 + 4 + 5 7 6 + ( 3 7 6 ⋅ 9 9 7 ) ( m o d 1 0 0 0 )
≡ 2 + 4 + 5 7 6 + 3 7 4 8 7 2 ( m o d 1 0 0 0 )
≡ 3 7 5 4 5 4 ( m o d 1 0 0 0 )
≡ 4 5 4 ( m o d 1 0 0 0 )
...which is the last three digits of N .
The last three digits of N is the remainder in the division of N by 1 0 0 0 . We first compute the number N modulo 8 and the number N modulo 1 2 5 . Since 2 3 ≡ 0 ( m o d 8 ) and ( n ! ) ! ≡ 0 ( m o d 3 ) for all n ≥ 3 , it follows that 2 ( n ! ) ! ≡ 0 ( m o d 8 ) for all n ≥ 3 , so that N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! ≡ 6 ( m o d 8 ) . Now by the Fermat-Euler Theorem, we have 2 φ ( 1 2 5 ) ≡ 1 ( m o d 1 2 5 ) . Since φ ( 1 2 5 ) = 5 3 − 5 2 = 1 0 0 , this implies 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) . Since ( n ! ) ! ≡ 0 ( m o d 1 0 0 ) for all n ≥ 4 , we have 2 ( n ! ) ! ≡ 1 ( m o d 1 2 5 ) for all n ≥ 4 , so that N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 9 9 7 ( 1 + ⋯ + 1 ) ≡ 3 + 2 7 2 0 ( m o d 1 2 5 ) . By using the fact that 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) and 2 1 0 = 1 0 2 4 ≡ 2 4 ≡ − 1 0 1 ( m o d 1 2 5 ) , we further reduce 2 7 2 0 ≡ 2 2 0 ≡ 1 0 1 2 ≡ 1 0 0 0 0 + 2 0 0 + 1 ≡ 2 0 1 ≡ 7 6 ( m o d 1 2 5 ) . Hence, N ≡ 3 + 7 6 ≡ 7 9 ( m o d 1 2 5 ) . From N ≡ 6 ( m o d 8 ) , we have N = 6 + 8 s for some s ∈ Z . Substituting this into the congruence N ≡ 7 9 ( m o d 1 2 5 ) , we have 8 s ≡ 7 3 ( m o d 1 2 5 ) ⟹ s ≡ 7 3 ( 8 − 1 ) ≡ 7 3 ⋅ 4 7 ≡ 5 6 ( m o d 1 2 5 ) . That is s = 5 6 + 1 2 5 t for some t ∈ Z . So N = 6 + 8 s = 6 + 8 ( 5 6 + 1 2 5 t ) = 4 5 4 + 1 0 0 0 t ≡ 4 5 4 ( m o d 1 0 0 0 ) . Hence the last three digits of the integer N is 4 5 4 .
Working this equation modulo 8 , it is clear that except the first two terms the rest are all divisible by 8 . So, we write N ≡ 2 + 2 ( 2 ! ) + 0 + 0 . . . + 0 ( m o d 8 ) . ⇒ N ≡ 6 ( m o d 8 ) .
Now we will work this equation modulo 1 2 5 . Note that ϕ ( 1 2 5 ) = 1 0 0 .
So by the Euler's theorem we can state that 2 1 0 0 k ≡ 1 ( m o d 1 2 5 ) [ k is any non-negative integer.]
Clearly the term 2 ( 4 ! ) ! = 2 2 4 ! and those after it will have powers greater than 1 0 0 .[There are 9 9 7 such terms]
So, we write N ≡ 2 + 4 + 2 7 2 0 + 9 9 7 ( 1 ) ( m o d 1 2 5 )
Now, using the properties of modular arithmetic we get that 2 7 2 0 ≡ 2 9 5 ≡ 7 6 ( m o d 1 2 5 )
⇒ N ≡ 7 9 ( m o d 1 2 5 )
So, we have the following system of linear congruence's:
N ≡ 6 ( m o d 8 )
N ≡ 7 9 ( m o d 1 2 5 )
Using the Chinese remainder Theorem we get that N ≡ 4 5 4 ( m o d 1 0 0 0 )
So the last 3 digits are 4 5 4 .
Note that ϕ ( n ) denotes the Euler's totient function.
Note that ϕ ( n ) denotes the Euler's totient function.
Note that ϕ ( n ) denotes Euler's Totient Function.
Let f ( n ) = 2 n ( m o d 1 0 0 0 ) .
Observe that f ( 1 0 0 ) = ( 2 1 0 ) 1 0 ( m o d 1 0 0 0 ) = 2 4 1 0 ( m o d 1 0 0 0 ) = ( 2 3 × 3 ) 1 0 ( m o d 1 0 0 0 ) . This can be reduced to ( 2 1 0 ) 3 × 3 1 0 ( m o d 1 0 0 0 ) = ( 2 4 3 × 4 9 ) ( m o d 1 0 0 0 ) = 3 7 6 .
Also observe that 3 7 6 2 = 3 7 6 ( m o d 1 0 0 0 ) . From this, we can deduce that f ( 1 0 0 k ) = 3 7 6 for integer k .
Thus, letting g ( n ) = f ( ( n ! ) ! ) we need N = ∑ i = 1 1 0 0 0 g ( i ) . Evidently, for all i ≥ 4 , ( i ! ) ! is some multiple of 1 0 0 and thus g ( i ) = f ( ( i ! ) ! ) = 3 7 6 .
It remains to calculate g ( 1 ) through g ( 3 ) . We can easily compute g ( 1 ) = 2 and g ( 2 ) = 4 .
We have g ( 3 ) = 2 7 2 0 ( m o d 1 0 0 0 ) = 3 7 6 × 2 2 0 ( m o d 1 0 0 0 ) = 5 7 6 .
Thus, the last three digits of N are given by 3 7 6 × 9 9 7 + 5 7 6 + 4 + 2 ( m o d 1 0 0 0 ) . Since we are working modulo 1 0 0 0 this can be simplified to 3 7 6 × ( − 3 ) + 5 7 6 + 4 + 2 = − 5 4 6 ( m o d 1 0 0 0 ) , giving us a final answer of 4 5 4 (it is obvious that N is positive).
To find N ( m o d 1 0 3 ) , it suffices to find N ( m o d 2 3 ) and N ( m o d 5 3 ) .
.
For k ≥ 3 , we have k ! ≥ 6 , and ( k ! ) ! ≥ 6 ! = 7 2 0 .
Hence, 2 ( k ! ) ! ≡ 0 ( m o d 2 3 ) for all k ∈ 3 , 1 0 0 0 . Therefore:
N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 0 + ⋯ + 0 ≡ 2 1 + 2 2 = 6 ( m o d 8 ) .
.
Since ϕ ( 5 3 ) = 4 ⋅ 5 2 = 1 0 0 and gcd ( 2 , 5 ) = 1 , we have 2 1 0 0 ≡ 1 ( m o d 5 3 ) .
For k ≥ 4 , we have k ! ≥ 2 4 > 1 0 , and thus, ( k ! ) ! ≡ 0 ( m o d 1 0 0 ) .
Hence, 2 ( k ! ) ! ≡ 1 ( m o d 5 3 ) for all k ∈ 4 , 1 0 0 0 . Therefore:
N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 9 9 7 ones 1 + ⋯ + 1 ≡ 2 1 + 2 2 + 2 7 2 0 + 9 9 7 ≡ 2 2 0 + 3 ≡ ( 2 1 0 ) 2 + 3 ≡ 1 0 2 4 2 + 3 ≡ 2 4 2 + 3 ≡ 5 7 9 ≡ 7 9 ( m o d 1 2 5 ) .
.
Since N ≡ 6 ≡ 4 5 4 ( m o d 8 ) and N ≡ 7 9 ≡ 4 5 4 ( m o d 1 2 5 ) , by the Chinese Remainder Theorem , we must have N ≡ 4 5 4 ( m o d 1 0 0 0 ) .
Therefore, the last three digits of N are 4 5 4 .
We have to evaluate the sum N = ∑ i = 1 1 0 0 0 2 ( i ! ) ! modulo 1 0 0 0 , which is equivalent to evaluating it modulo 1 2 5 and modulo 8 separately. Note that 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) (from Euler's Totient Theorem). Thus, 1 0 0 is the order of 2 mod 1 2 5 [note that the factors of 1 0 0 are 1 , 2 , 4 , 5 , 1 0 , 2 0 , and 5 0 , and none of them satisfy the condition]. So if m is a positive integer which is divisible by 1 0 0 , 2 m ≡ 1 ( m o d 1 2 5 ) . Now we shall find the smallest positive integer p such that ( p ! ) ! ) is a multiple of 1 0 0 . If we can find such p , then we have to evaluate the sum up to 2 p − 1 , because for all larger terms q , 1 0 0 ∣ ( q ! ) ! , hence 2 ( q ! ) ! ≡ 1 ( m o d 1 2 5 ) , and the rest of the sum can be evaluated easily. Checking, we find out that n = 1 does not work, n = 2 does not work, n = 3 does not work, but n = 4 works! So, ∑ i = 4 1 0 0 0 2 ( i ! ) ! ≡ ∑ i = 4 1 0 0 0 1 ≡ 9 9 7 ≡ − 3 m o d ( 1 2 5 ) . Hence, the total sum is ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! − 3 ≡ 2 + 4 + 2 7 2 0 − 3 ≡ 3 + 2 7 2 0 m o d ( 1 2 5 ) . Again, 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) , so 2 7 2 0 ≡ 2 2 0 ≡ ( 2 1 0 ) 2 ≡ ( 1 0 2 4 ) 2 ≡ 2 4 2 ≡ 5 7 6 m o d ( 1 2 5 ) . Hence, the total sum is ≡ 5 7 9 ≡ 7 9 ( m o d 1 2 5 ) .
Now we have to evaluate this modulo 8 . Clearly, all terms after 2 ( 3 ! ) ! are divisible by 8 , so we have to evaluate only the first 2 terms, which is 6 . Hence, N ≡ 6 ( m o d 8 ) .
From the Chinese Remainder Theorem, x will have only 1 possible value modulo 1 0 0 0 . Checking cases, we find out that x ≡ 4 5 4 ( m o d 1 0 0 0 ) .
Since that ( n ! ) ! > 3 , ∀ n > 2 , we have 8 ∣ 2 ( n ! ) ! , ∀ n > 2 and so N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! ≡ 6 m o d 8 .
Now, by the Euler's Theorem, we have 2 1 0 0 ≡ 1 ( m o d ( ) 1 2 5 ) since that m d c ( 2 , 1 2 5 ) = 1 and φ ( 1 2 5 ) = 1 0 0 and it's easy to see that 1 0 0 ∣ n ! , ∀ n ≥ 1 0 ⇒ 1 0 0 ∣ ( n ! ) ! , ∀ n ≥ 4 .
Then 2 ( n ! ) ! ≡ 2 1 0 0 k ≡ 1 ( m o d 1 2 5 ) , ∀ n ≥ 4 and ( ∗ ) N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 9 9 7 1 + 1 + ⋯ + 1 ( m o d 1 2 5 ) .
We have 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! ≡ 2 + 2 2 + 2 7 2 0 ≡
2 + 2 2 + 2 2 0 ≡ 2 + 4 + 7 6 ≡ 8 2 ( m o d 1 2 5 ) .
So, by the ( ∗ ) we have N ≡ 9 9 7 + 8 2 ≡ 7 9 ( m o d 1 2 5 ) , and how N ≡ 6 ( m o d 8 ) , solving the two congruences we find N ≡ 4 5 4 ( m o d 1 0 0 0 ) .
Thus the last three digits of N are 4 5 4 .
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
We note that if k ≥ 4 , then ( k ! ) ! is divisible by 100. Proof: Note that when k = 4 then we get ( 4 ! ) ! = 2 4 ! , which is divisible by 100. Note also that ( ( k + 1 ) ! ) ! ) is a multiple of ( k ! ) ! , so all of ( k ! ) ! where k ≥ 4 is divisible by 100.
Thus by Euler Theorem and since ϕ ( 1 2 5 ) = 1 0 0 , 2 1 0 0 ≅ 1 ( m o d 1 2 5 ) . Hence all of 2 ( k ! ) ! where k ≥ 4 is congruent to 1 ( m o d 1 2 5 ) . Also, it is congruent to 0 ( m o d 8 ) , so it is congruent to 3 7 6 ( m o d 1 0 0 0 ) .
Note that 2 ( 1 ! ) ! = 2 and 2 ( 2 ! ) ! = 4 , and 2 ( 3 ! ) ! = 2 7 2 0 . Note that 2 2 0 = 1 0 4 8 5 7 6 ≅ 5 7 6 ( m o d 1 2 5 ) and 2 1 0 0 ≅ 1 ( m o d 1 2 5 ) . Thus 2 7 2 0 ≅ 5 7 6 ( m o d 1 2 5 ) . It is also congruent to 0 ( m o d 8 ) , thus it is congruent to 5 7 6 ( m o d 1 0 0 0 ) .
Hence the sum that we need to evaluate is congruent to 2 + 4 + 5 7 6 + ( 3 7 6 ) ( 9 9 7 ) = 3 7 5 4 5 4 , which is congruent to 4 5 4 ( m o d 1 0 0 0 ) . Thus, the last 3 digits of the sum is 4 5 4 .
By Euler's theorem, we know that for two relatively prime numbers a and b , a ϕ ( b ) ≡ 1 (mod 125), where ϕ ( b ) is the Euler totient function, which counts the number of positive integers less than b that are relatively prime to b . Thus 2 ϕ ( 1 2 5 ) = 2 1 0 0 ≡ 1 (mod 125).
Using this, we examine N mod 125. For all integers n ≥ 4 , ( n ! ) ! is divisible by 100, and therefore we know that there is always some integer k for which 2 ( n ! ) ! = 2 1 0 0 k ≡ 1 k ≡ 1 (mod 125).
∴ N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + 9 9 7
≡ 2 + 4 + 2 7 2 0 + 9 9 7 ≡ 3 + 2 7 2 0 ≡ 3 + 2 2 0 (mod 125)
Note that 2 7 = 1 2 8 ≡ 3 (mod 125)
∴ 3 + 2 2 0 = 3 + 2 1 4 × 2 6 ≡ 3 + 3 2 × 2 6
≡ 5 7 9 ≡ 7 9 (mod 125)
Thus we know that N mod 1 1 must be in the form 1 2 5 k + 7 9 for some integer 0 ≤ k < 8 , and thus must be one of the following: 7 9 , 2 0 4 , 3 2 9 , 4 5 4 , 5 7 9 , 7 0 4 , 8 2 9 , 9 5 4
However, we can also examine N mod 8 . For all integers n ≥ 3 , ( n ! ) ! > 8 , thus 2 ( n ! ) ! ≡ 0 (mod 8).
∴ N ≡ 2 ( 1 ! ) ! + 2 ( 2 ! ) ! ≡ 6 (mod 8)
The only number in the earlier list of numbers that satisfies this is 454.
We want to find N ( m o d 1 0 0 0 ) , so we take each term of N in modulo 8 and in modulo 1 2 5 . Notice that if k ≥ 4 , then ( k ! ) ! ≥ 2 4 ! , so ( k ! ) ! is divisible by ϕ ( 1 2 5 ) = 1 0 0 . Then by Euler's Theorem, 2 ( k ! ) ! ≡ 2 0 = 1 ( m o d 1 2 5 ) . Clearly 2 ( k ! ) ! ≡ 0 ( m o d 8 ) , so for k ≥ 4 we have the system of congruences 2 ( k ! ) ! ≡ 1 ( m o d 1 2 5 ) , 2 ( k ! ) ! ≡ 0 ( m o d 8 ) . By the Chinese Remainder Theorem, 2 ( k ! ) ! ≡ 3 7 6 ( m o d 1 0 0 0 ) is the only solution in modulo 1 0 0 0 . Thus, all terms of N , except for the first three, end in 3 7 6 .
Now we compute the last three digits of the first three terms.
The first term is 2 ( 1 ! ) ! = 2 1 = 2 .
The second term is 2 ( 2 ! ) ! = 2 2 = 4 .
The third term is 2 ( 3 ! ) ! = 2 7 2 0 . Using Euler's Theorem with modulo 1 2 5 , we have 2 7 2 0 ≡ 2 2 0 = 1 2 8 2 ⋅ 6 4 ≡ 3 2 ⋅ 6 4 = 5 7 6 ≡ 7 6 ( m o d 1 2 5 ) . Therefore, 2 7 2 0 ≡ 5 7 6 ( m o d 1 0 0 0 ) .
The sum of the last three digits of the terms is 2 + 4 + 5 7 6 + 9 9 7 ( 3 7 6 ) = 5 8 2 + ( 1 0 0 0 − 3 ) 3 7 6 ≡ 5 8 2 − 3 ( 3 7 6 ) ≡ 4 5 4 ( m o d 1 0 0 0 ) . Hence, the last three digits of N are 4 5 4 .
We need to calculate 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 ! ! divides 8 for n > 2 .
ϕ ( 1 2 5 ) = 1 0 0 . Hence we have 2 1 0 0 ≡ 1 modulo 125. But n ! ! is a multiple of 100 for n > 3 . Hence 2 n ! ! ≡ 3 7 6 modulo 1000 for n > 3 .
Thus the required answer is
2 + 4 + 2 7 2 0 + 3 7 6 × 9 9 7 ≡ 6 + 2 2 0 + 3 7 6 × 9 9 7 ≡ 6 + 5 7 6 + 3 7 6 × 9 9 7 ≡ 4 5 4 mod 1000.
Essentially, we're finding N m o d 1 0 0 0
Since 1 0 0 0 = 8 × 1 2 5 , with g cd ( 8 , 1 2 5 ) = 1 , we can solve N m o d 1 0 0 0 by Chinese Remainder Theorem.
Because ( 3 ! ) ! , ( 4 ! ) ! , ( 5 ! ) ! , … , ( 1 0 0 0 ! ) ! are all greater than 3 , then 2 raised to the power of any of these terms are divisible by ( 2 3 = 8 ) . So N m o d 8 = ( 2 ( 1 ! ) ! + 2 ( 2 ! ) ! ) m o d 8 = 6
Since g cd ( 2 , 1 2 5 ) = 1 , we can apply Euler's totient function ⇒ φ ( 1 2 5 ) = 1 2 5 ( 1 − 5 1 ) = 1 0 0
And 5 ∣ 2 4 ! , 1 0 ∣ 2 4 ! , 4 ∣ 2 4 ! , so ( 4 ! ) ! is divisible ( 4 × 5 × 5 = 1 0 0 . Since ( 5 ! ) ! , ( 6 ! ) ! , ( 7 ! ) ! , … , ( 1 0 0 0 ! ) ! are all multiples of ( 4 ! ) ! , the third term (of N ) onwards is divisible by 1 0 0 .
⇒ ( 4 ! ) ! ≡ ( 5 ! ) ! ≡ ( 6 ! ) ! ≡ … ≡ ( 1 0 0 0 ! ) ! ≡ 0 ( m o d 1 0 0 0 )
⇒ x m o d 1 2 5 = [ ( 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! )
+ ( 2 ( 4 ! ) ! + 2 ( 5 ! ) ! + … + 2 ( 1 0 0 0 ! ) ! ] m o d 1 2 5
⇒ x m o d 1 2 5 = [ ( 2 1 + 2 2 + 2 6 ! )
+ ( 2 ( 4 ! ) ! m o d 1 0 0 + 2 ( 5 ! ) ! m o d 1 0 0 + … + 2 ( 1 0 0 0 ! ) ! m o d 1 0 0 ] m o d 1 2 5
⇒ x m o d 1 2 5 = [ ( 2 1 + 2 2 + 2 7 2 0 ) + ( 2 0 + … + 2 0 ) ] m o d 1 2 5
⇒ x m o d 1 2 5 = [ ( 6 + 2 7 2 0 m o d 1 0 0 ) + 9 9 7 ] m o d 1 2 5
⇒ x m o d 1 2 5 = [ 2 2 0 + 3 ] m o d 1 2 5
⇒ x m o d 1 2 5 = [ 2 2 ( 7 ) + 6 ) + 3 ] m o d 1 2 5 = ( 2 7 ) 2 ( 2 6 ) m o d 1 2 5
⇒ x = ( 3 2 × 6 4 + 3 ) m o d 1 2 5 = 7 9
Therefore, N satisfy the linear congruences
x ≡ 6 ( m o d 8 ) , x ≡ 7 9 ( m o d 1 2 5 )
By Chinese remainder theorem, a 1 = 6 , a 2 = 7 9 , N 1 = n 2 = 1 2 5 , N 2 = n 1 = 8
Extended Euclidean algorithm:
g cd ( 1 2 5 , 8 ) = g cd ( 8 , 5 ) = 1
1 = 2 ( 8 ) − 3 ( 5 ) = 2 ( 8 ) − 3 ( 1 2 5 − 5 ( 8 ) ) = − 3 ( 1 2 5 ) + 4 7 ( 8 )
⇒ y 1 = − 3 + 8 = 5 , y 2 = 4 7
⇒ x ≡ ( a 1 N 1 y 1 + a 2 N 2 y 2 ) m o d 1 0 0 0 ≡ 4 5 4
Hence, N m o d 1 0 0 0 = 4 5 4
Problem Loading...
Note Loading...
Set Loading...
The last three digits of a number is equivalent to the number reduced m o d 1 0 0 0 . To compute this, we can seperately consider m o d 1 2 5 and m o d 8 , and combine them at the end.
First notice that 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) by Euler's Totient Theorem. Therefore, for all integers 1 0 0 ∣ k , 2 k ≡ 1 ( m o d 1 2 5 ) .
Now notice for all integers n ≥ 4 , n ! ≥ 2 4 , so ( n ! ) ! , when multiplied out, includes 2 , 5 , 1 0 , meaning 1 0 0 ∣ ( n ! ) ! . Therefore, i = 4 ∑ 1 0 0 0 2 ( i ! ) ! ≡ i = 4 ∑ 1 0 0 0 1 ≡ 9 9 7 ≡ − 3 ( m o d 1 2 5 )
Our sum can therefore be written, in m o d 1 2 5 as 2 ( 1 ! ) ! + 2 ( 2 ! ) ! + 2 ( 3 ! ) ! + ( − 3 ) = 2 + 4 + 2 7 2 0 − 3 = 3 + 2 7 2 0
This can be reduced further using our formerly mentioned identity 2 1 0 0 ≡ 1 ( m o d 1 2 5 ) , giving 3 + 2 7 2 0 = 3 + 2 2 0 . Now computing this is easy because 2 1 0 = 1 0 2 4 ≡ 2 4 , so 3 + 2 2 0 ≡ 3 + 2 4 2 ≡ 5 7 9 ≡ 7 9
Therefore, our expression is 7 9 ( m o d 1 2 5 )
It is evident that all terms in our sum save 2 ( 1 ! ) ! and 2 ( 2 ! ) ! are divisible by 8 , so reducing m o d 8 gives 2 + 4 + 0 ≡ 6 ( m o d 8 )
We have now deduced N ≡ 7 9 ( m o d 1 2 5 ) and N ≡ 6 ( m o d 8 ) .
The values that are 7 9 ( m o d 1 2 5 ) can be expressed as 7 9 + 1 2 5 y . Taking this m o d 8 gives − 1 + 5 y , which we want to be 6 ( m o d 8 ) . Trying values shows that y = 3 works, so N ≡ 7 9 + 3 ⋅ 1 2 5 = 4 5 4 ( m o d 1 0 0 0 ) .
Therefore, our answer is 4 5 4 .