The Tower of 5 5s

71 Views Asked by At

What are the last three digits of

$5^{5^{5^{5^5}}}$? I tried using modular arithmetic, but it had fallen short. A detailed solution is greatly appreciated. Thank you very much in advance!

1

There are 1 best solutions below

2
On BEST ANSWER

Modular arithmetic should see you there without too much difficulty, although the tower of powers can be intimidating.

You want $5^{\large 5^{\large 5^{\large 5^{\large 5}}}}\bmod 1000$.

In lieu of using more sophisticated tools, just start with powers of $5\bmod 1000$:

$5^1 \equiv 5$
$5^2 \equiv 25$
$5^3 \equiv 125$
$5^4 \equiv 625$
$5^5 \equiv 3125\equiv 125$

And we have entered a cycle of length $2$.

Now all that remains is to determine whether the exponent is odd or even...