How to find last digit of $x_1^{x_2^{x_3}}$ for very large $x_2$ and $x_3$

75 Views Asked by At

Using Euler's Theorem to find $x_1^{x_2}$ for a very large $x_2$ seems not so difficult. What I don't understand is how I can find something like 499942^(898102^(846073)) using this process. Finding the last digit of $x_2^{x_3}$ hardly seems helpful. Maybe I'm missing something? Help appreciated. (not exclusively for powers of 2).

1

There are 1 best solutions below

0
On

Note that the last digit of powers of $2$ cycle with period $\phi(10)=4$: they go $2,4,8,6$ and repeat so you only need the exponent $\bmod 4$. The exponent is clearly equivalent to $0 \bmod 4$ so the last digit is $6$.