2 0 1 6 Number of 5 = 2 1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7
Find the last two digits of the number above.
The problem is not original.
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.
Nice, did the same thing. Only about one line of working haha.
To determine the last two digits of the expression, we observe its power cycle and observe its cyclicity. Since only the last two digits of 2 0 1 6 determine the expressions last two digits, we can find the power cycle of 1 6 only
1 6 1 = 1 6 1 6 2 = 2 5 6 1 6 3 = 4 0 9 6 1 6 4 = 6 5 5 3 6 1 6 5 = 1 0 4 8 5 7 6 1 6 6 = 1 6 7 7 7 2 1 6 → 1 6 → 5 6 → 9 6 → 3 6 → 7 6 → 1 6
2 0 1 6 1 2 0 1 6 2 2 0 1 6 3 2 0 1 6 4 2 0 1 6 5 → 1 6 → 5 6 → 9 6 → 3 6 → 7 6 2 0 1 6 6 2 0 1 6 7 2 0 1 6 8 2 0 1 6 9 2 0 1 6 1 0 → 1 6 → 5 6 → 9 6 → 3 6 → 7 6 …
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 ≡ 2 m o d ( 5 ) ∴ Last two digits 2 0 1 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 → 2 0 1 6 2 → 5 6
Let N be the given number. We need to find N m o d 1 0 0 . Since g cd ( N , 1 0 0 ) = 1 , we can use Chinese remainder theorem on the factors 4 and 2 5 of 1 0 0 as follows.
Factor 4: N ≡ 0 (mod 4)
Factor 25:
2 0 1 6 # of 5 = 21 5 5 5 ⋯ 5 7 ⟹ N ⟹ 2 5 n + 6 n + 2 ⟹ n ⟹ N ≡ 1 6 # of 5 = 21 5 5 5 ⋯ 5 7 (mod 25) ≡ 2 4 × # of 5 = 21 5 5 5 ⋯ 5 7 (mod 25) ≡ 2 4 × # of 5 = 21 5 5 5 ⋯ 5 7 m o d ϕ ( 2 5 ) (mod 25) ≡ 2 4 × # of 5 = 21 5 5 5 ⋯ 5 7 m o d 2 0 (mod 25) ≡ 2 4 × 5 7 m o d 2 0 (mod 25) ≡ 2 8 ≡ 2 5 6 ≡ 6 (mod 25) ≡ 2 5 n + 6 ≡ 0 (mod 4) ≡ 0 (mod 4) = 2 ≡ 2 5 n + 6 ≡ 5 6 (mod 100) Since g cd ( 2 , 2 5 ) = 1 , Euler’s theorem applies. Euler’s totient function ϕ ( 2 5 ) = 2 5 × 5 4 = 2 0 where n is an integer.
References:
( 2 0 1 6 ) 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 = ( ( 2 0 1 6 ) 1 0 ) 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 × ( 2 0 1 6 ) 7
2016 end in 6, we can find the last two digits with the help of the following points :
Finally, using basic multiplication technique, the last two digits of the product of the numbers ending in 76 and 56 are : 56
I used a calculator and found that:
2 0 1 6 7 ≡ 5 6 ( m o d 1 0 0 )
2 0 1 6 5 7 ≡ 5 6 ( m o d 1 0 0 )
2 0 1 6 5 5 7 ≡ 5 6 ( m o d 1 0 0 )
I didn't check anymore; I just assumed it kept repeating, so I typed in 5 6 and that gave me a ✓.
Finding its last two digits is equivalent to finding the last two digits of 1 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 We first express 1 6 as 2 4
Note that if we multiply 5 5 5 5 5 5 . . . . . 7 (where 5 is repeated n times) by 4 , we get 2 2 2 . . . 8 ( 2 is repeated n + 1 times)
The expression becomes 2 2 2 2 2 . . . 8 = 2 2 2 2 . . . 0 ∗ 2 8
= ( 2 1 0 ) 2 2 2 . . . . . 2 ∗ 2 8 which is equivalent to finding the last 2 digits of :-
( 2 4 ) 2 2 . . . . 2 ∗ 2 8
It may be proved that the last 2 digits of 2 4 e v e n = 7 6
Hence, we need to find last two digits of 7 6 ∗ 2 8 (There is a short trick to it as well. If we multiply 7 6 by 2 n , it becomes
( 7 5 + 1 ) 2 n = 7 5 ∗ 2 n + 2 n
last 2 digits of 7 5 ∗ 2 n = 0 0 . Hence last two digits of 7 6 ∗ 2 n = last two digits of 2 n )
= 5 6
Let the exponent be denoted as A = 21 times 5 5 5 ⋯ 5 7 since we are asked to find 2 0 1 6 A m o d ( 1 0 0 ) which we further can write as ( 2 0 0 0 + 1 6 ) A m o d ( 1 0 0 ) = r = 0 ∑ A ( r A ) ( 2 0 0 0 ) A − r ( 1 6 ) A m o d ( 1 0 0 ) = A-1 times 0 + 0 + ⋯ + 0 + ( A A ) 1 6 A m o d ( 1 0 0 ) = 2 4 A m o d ( 1 0 0 ) we note that g.c.d ( 2 , 1 0 0 ) = 1 so we will consider the following { 2 4 A m o d ( 4 ) = 0 2 4 A m o d ( 2 5 ) = ? thus we will find the 2 4 A m o d ( 2 5 ) and g.c.d ( 2 , 2 5 ) = 1 so by Euler's theorem we have 2 ϕ ( 2 5 ) ≡ 1 m o d ( 2 5 ) ⟹ 2 2 0 ≡ 1 m o d ( 2 5 ) as 4 A m o d ( 2 0 ) = 8 therefore we have 2 4 A m o d 2 5 = 2 8 m o d ( 2 5 ) = 2 5 6 m o d ( 2 5 ) = 6 combining these two results and hence by Chinese remainder theorem we find the solution m o d 1 0 0 such x ≡ 0 m o d 4 and x ≡ 6 m o d ( 2 5 ) is 56
The solution though right is not well explained. Check out my solution
Log in to reply
Sir I always love to explain the thing but I'm suffering from terrible neck and right hand pain so I cannot do much explanation and writing latex . Even I'm supposed to avoid the phones :(
Even though your solution is right, you could have immediately realized that the number 2 0 1 6 that gigantic number is divisible by 4 because 2016 is divisible by 4.
The brute force method, using cryptographic methods: ( 2 0 1 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 m o d 1 0 0 ) ⇒ 5 6 . In this case, the power mod function, which applies the mod 100 function whenever applicable.
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 ⇒ 1 2 d 2 a d 2 3 7 2 e d 4 c e 3 8 e 5 1 6 ⇒ 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 2
The methodology of the power mod function is not difficult.:
The binary bits reversed:
{ 1 , 0 , 1 , 0 , 0 , 1 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 1 , 0 , 1 , 0 , 1 , 1 , 0 , 1 , 1 , 1 , 0 , 1 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 1 , 0 , 1 , 1 , 0 , 1 , 0 , 0 , 1 }
The repeated squares of the previous value immediately reduced by the mod 100 function are:
{ 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 , 5 6 , 3 6 , 9 6 , 1 6 }
Selecting just the squarings corresponding to the 1 bits in the reversed binary representation of 555555555555555555555557:
{ 1 6 , 3 6 , 5 6 , 3 6 , 9 6 , 9 6 , 1 6 , 5 6 , 5 6 , 3 6 , 9 6 , 3 6 , 9 6 , 3 6 , 1 6 , 3 6 , 9 6 , 5 6 , 3 6 , 9 6 , 5 6 , 1 6 , 5 6 , 3 6 , 1 6 , 5 6 , 5 6 , 1 6 , 3 6 , 9 6 , 5 6 , 9 6 , 5 6 , 1 6 , 3 6 , 9 6 , 5 6 , 1 6 }
The accumulative products and immediate mod 100 reductions are:
{ 1 6 , 7 6 , 5 6 , 1 6 , 3 6 , 5 6 , 9 6 , 7 6 , 5 6 , 1 6 , 3 6 , 9 6 , 1 6 , 7 6 , 1 6 , 7 6 , 9 6 , 7 6 , 3 6 , 5 6 , 3 6 , 7 6 , 5 6 , 1 6 , 5 6 , 3 6 , 1 6 , 5 6 , 1 6 , 3 6 , 1 6 , 3 6 , 1 6 , 5 6 , 1 6 , 3 6 , 1 6 , 5 6 }
The desired answer is the last number: 56.
The numbers never get huge! Even in this problem, doing it with pencil and paper is imaginable.
I don't understand at all.
What is a power mod function?
Why should we reverse the "binary bits"?
"The repeated squares of the previous value of 2016". Previous value of 2016? What does that mean? 2016 is a number, not a list.
Research "powermod". The very first Google result describes it. I gave a simple description in my solution: "which applies the mod 100 function whenever applicable".
The bits were reversed only so that the processing went from left to right. The languages that I am accustomed to working within are left to right languages. That is the only reason for the bit order reversal.
We are building a list. It is a list of the squares of the previous value reduced by mod 100 with the first being 2016 itself.
Problem Loading...
Note Loading...
Set Loading...
Here's an alternative solution that doesn't use the Chinese Remainder Theorem. To be clear, CRT is a solid approach for these problems in general, but in this specific case there are some shortcuts.
Let A n = n 5 s 5 ⋯ 5 7 . We want to find 2 0 1 6 A 2 1 ( m o d 1 0 0 ) .
We can simplify immediately by noting 2 0 1 6 ≡ 1 6 ( m o d 1 0 0 ) , so we need 1 6 A 2 1 ( m o d 1 0 0 ) .
Now, this is where CRT would normally be used. But it's worth trying to see what happens to the last two digits of different powers of 1 6 . We have 1 6 2 = 2 5 6 , so the next last digit pair is 5 6 ; continuing, we have 1 6 → 5 6 → 9 6 → 3 6 → 7 6 → 1 6 , and the cycle repeats with period 5 .
Since A n ≡ 2 ( m o d 5 ) for all n , we in fact have 1 6 A n ≡ 1 6 2 ≡ 5 6 ( m o d 1 0 0 ) for all n .
Just a footnote on this approach: it may seem wildly optimistic to try looking for this cycle. But there are at most 1 0 0 distinct pairs of last digits, so they must repeat at some point. And better than this, we know that all positive integer powers of 1 6 end with a 6 , so the cycle can have length at most 1 0 .