# Method of calculating the last digit of $7^{49}$

I would like to point out the difference between $7^{7^7}$ and $7^{49}$. typically the notation $a^{a^{a^a}}$ means $a^{(a^a)}$. Heuristically, start from the top and work your way down. e.g. $2^{2^{{2^2}}} = 2^{(2^{({2^2})})} = 2^{(2^{4})} = 2^{16}=65536$.

• The answer is $7$, as you calculated. Why do you say it's $3$? – Guy Mar 20 '17 at 18:51
• $7^{7^7} = 7^{823543} \ne 7^{49}$ – zahbaz Mar 20 '17 at 18:55
• @BasemFouda, $7^{7^7}$ and $7^{49}=7^{7^2}$ are entirely different numbers. – Barry Cipra Mar 20 '17 at 18:57
• In fact $$7^{7^7} \equiv 7^3\equiv 3\mod 10$$ – Peter Mar 20 '17 at 19:00
• @BasemFouda Don't delete this question because expressions like $7^{(7^7)}$ and $(7^7)^7$ are often mixed and it might help more people to distinguish them. The convention is that $a^{b^c}=a^{(b^c)}$ – Peter Mar 20 '17 at 19:01

$$7^{49}\equiv 7^1=7\mod 10$$ We can reduce the exponent modulo $\phi(10)=4$, which immediately gives the result $7$.
notice that $7^2 \equiv 49 \equiv -1 \pmod {10}$
$$7^{49} \equiv 7^{32} \times 7^{16} \times 7 \equiv (7^{2})^{16} \times (7^{2})^{8} \times 7 \equiv(-1)^{16} \times (-1)^8 \times 7\equiv 7 \pmod {10}$$