I want to find the last digit of $7^{7^7}$. I found out already that $7^7$ (mod 10) last digit is 3. But how do I use that to get the last digit of the whole thing?
Thanks
I want to find the last digit of $7^{7^7}$. I found out already that $7^7$ (mod 10) last digit is 3. But how do I use that to get the last digit of the whole thing?
Thanks
Note that $7^2 \equiv 49 \equiv -1 \bmod 10$, and so $7^4 \equiv 1 \bmod 10$. Hence if $a=4q+r$ then $$7^a \equiv 7^{4q+r} \equiv (7^4)^q \cdot 7^r \equiv 7^r \bmod 4$$ This reduces your problem to finding $7^7 \bmod 4$... but this should be easy since $7 \equiv -1 \bmod 4$.
Notice that the last digits of powers of $7$ run in the repeating sequence $7,9,3,1$. Thus, what you really need to know is what $7^7$ is congruent to modulo $4$, not modulo $10$, so as to tell where in the sequence $7^{7^7}$ falls. $7^k\bmod 4$ is easily computed from $k$; how?