Find the last digits without the calculator

Without using the calculator, find the last five digits of 5 55 5^{55}

Bonus: Show as many ways to solve this as possible.


The answer is 78125.

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.

3 solutions

Chris Lewis
Aug 3, 2020

Method 1 1 : Chinese remainder theorem.


Method 2 2 : pattern spotting

We know that for n > 1 n>1 , the last two digits are always 25 25 .

Define a sequence a n a_n by 5 n = 100 a n + 25 5^n = 100a_n+25 for n > 1 n>1 .

We have a 2 = 0 a_2=0 and 5 n + 1 = 100 a n + 1 + 25 = 500 a n + 125 5^{n+1}=100a_{n+1}+25=500a_n+125

so a n + 1 = 5 a n + 1 a_{n+1}=5a_n+1 . We're only interested in the last three digits of this number, so we can ignore the others. The sequence goes 0 , 1 , 6 , 31 , 156 , 781 , 906 , 531 , 656 , 281 , 406 , 31 , 156 , 781 , 906 , 0,1,6,31,156,781,906,531,656,281,406,31,156,781,906,\cdots

and we see it locks into a repeating cycle of 8 8 numbers. Using this pattern, we find the last three digits of a 55 a_{55} are 781 781 so that the last 5 5 digits of 5 55 5^{55} are 78125 \boxed{78125} .


Method 3 3 : better pattern spotting

The last three digits of 2 5 n 25^n are 625 625 for n > 1 n>1 . Define 2 5 n = 1000 b n + 625 25^n=1000b_n+625 ; we then get b 2 = 0 b_2=0 , b n + 1 = 25 b n + 15 b_{n+1}= 25b_n+15 , and we're only interested in the last two digits of b n b_n .

Even better, b n b_n is always a multiple of 5 5 , so 20 b n 20b_n is always a multiple of 100 100 ; so we just need to keep track of the last two digits of b n b'_n where b 2 = 0 b'_2=0 and b n + 1 = 5 b n + 15 b'_{n+1}=5b'_n+15 .

The sequence we get is 0 , 15 , 90 , 65 , 40 , 15 , 90 0,15,90,65,40,15,90\cdots , which gets into a cycle of period 4 4 . So the last two digits of b 27 b'_{27} are 15 15 ; the last five digits of 5 54 5^{54} are 15625 15625 , and we get the same answer.


Method 4 4 : do you know your powers of 625 625 ?

There's an even stronger pattern in the last five digits of powers of 625 625 , though they're harder to work out without a calculator; this sequence is 625 , 90625 , 40625 , 90625 , 625,90625,40625,90625,\cdots

From this, 5 52 5^{52} ends in 40625 40625 , and we can multiply by 125 125 to get the answer.


Other methods:

Decimal expansions of 2 n 2^{-n} have the same digits as powers of 5 5 ( 0.5 , 0.25 , 0.125 , 0.625 , 0.5,0.25,0.125,0.625,\cdots ); is there a way to use this?

I think nothing new will come out of it.

2 n = 5 n 1 0 n 2^{-n}=\dfrac {5^n}{10^n}

So, ultimately you will arrive at the same earlier methods you explained already. :)

A Former Brilliant Member - 10 months, 1 week ago

For some reason, even though they're the same thing (as you point out), dividing by 2 2 seems easier than multiplying by 5 5 .

Chris Lewis - 10 months, 1 week ago

By Chinese remainder theorem , we have 5 55 m o d 5 5 = 0 5^{55} \bmod 5^5 = 0 ; and for 5 55 m o d 2 5 5^{55} \bmod 2^5 , we note that gcd ( 5 , 2 5 ) = 1 \gcd(5, 2^5) = 1 , we can apply the Euler's theorem and note that Euler's totient function ϕ ( 2 5 ) = 2 5 × 1 2 = 16 \phi(2^5) = 2^5 \times \frac 12 = 16 . Then

5 55 5 55 m o d ϕ ( 32 ) 5 55 m o d 16 5 7 (mod 32) 5 ( 125 ) ( 125 ) 5 ( 3 ) ( 3 ) 45 13 (mod 32) \begin{aligned} 5^{55} & \equiv 5^{55 \bmod \phi(32)} \equiv 5^{55 \bmod 16} \equiv 5^7 \text{ (mod 32)} \\ & \equiv 5(125)(125) \equiv 5(-3)(-3) \equiv 45 \equiv 13 \text{ (mod 32)} \end{aligned}

5 55 32 n + 13 where n is an integer. 32 n + 13 0 (mod 3125) Note that 5 5 = 3125 n 2441 5 5 5 32 ( 2441 ) + 13 7 8125 (mod 100000) \begin{aligned} \implies 5^{55} & \equiv 32 n + 13 & \small \blue{\text{where }n \text{ is an integer.}} \\ \implies 32n + 13 & \equiv 0 \text{ (mod 3125)} & \small \blue{\text{Note that }5^5 = 3125} \\ \implies n & \equiv 2441 \\ \implies 5^55 & \equiv 32(2441) + 13 \equiv \boxed78125{} \text{ (mod 100000)} \end{aligned}

On other ways of solving this problem , of course the easiest "way" to solve this is to hit "5^55 mod 100000" in WolframAlpha . Of course, you would said it is numerical method. But in fact is solving 32 n + 13 0 (mod 3125) 32n+13 \equiv 0 \text{ (mod 3125)} , I have resorted to Python to solve n = 2441 n=2441 , the other solutions are n = 5566 , 8691 n=5566, 8691 . Also I think the pattern spotting method proposed by @Chris Lewis would also need a computer to generate the patterns. I just used the Coding environment of Brilliant to get the following pattern. It has a period of 8 8 .

Any ideas for a truly calculator free method? (CRT looks good until you need to solve 32 n + 13 0 ( m o d 3125 ) 32n+13\equiv 0 \pmod{3125} .)

The "better pattern spotting" method I wrote up only needs multiplication of two digit numbers by 5 5 , but you do need to know that 2 6 = 15625 2^6=15625 , and realise what that means for the last three digits of 5 2 k 5^{2k} . Of course, you can work that out, but it's hard to see what the motivation would be for that.

Chris Lewis - 10 months, 1 week ago
Lâm Lê
Aug 18, 2020

I used a calculator 😈😜. AND REKTED YOU ALL! \text{I used a calculator 😈😜. AND REKTED YOU ALL!}

P. S. It was \text{P. S. It was} 78125 78125 . I used a calculator app and had to GODDAMN scroll for \text{. I used a calculator app and had to GODDAMN scroll for} almost eternity[insert rage here] \text{almost eternity[insert rage here]} (aka. 3 seconds). \text{(aka. 3 seconds).} P. P. S. All this writing is also taking almost eternity [insert more rage here](aka. 10 GODDAMN minutes) \text{P. P. S. All this writing is also taking almost eternity [insert more rage here](aka. 10 GODDAMN minutes)}

What a solution! Never thought of that.

Can you provide a solution for the generalization of this problem, which means 5 n 5^n for every positive integers n n ? Thanks in advance.

Tin Le - 9 months, 4 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...