Elementary Number Theory – Last Two Digits of ${14}^{{14}^{14}}$

decimal-expansionelementary-number-theoryexponentiationmodular arithmetic

How to calculate the last two digits of ${14}^{{14}^{14}}$? With the help of any method. I have tried and have got the last digit to be $6$. But not sure.

Best Answer

Clearly, $14^{14^{14}}$ is a multiple of $4$. To compute $14^n\pmod{25}$ we should know $n\pmod {\phi(25)}$, i.e. $14^{14}\pmod{20}$. Again, $14^{14}$ is a multiple of $4$, and it is $\equiv (-1)^{14}\equiv 1\pmod 5$. Hence $14^{14}\equiv 16\pmod {20}$. Thus $14^{14^{14}}\equiv 14^{16}\pmod {25}$. This can me computed by repeated squareing: $$ 14^{16}=(14^2)^8=196^8\equiv (-4)^8=16^4=256^2\equiv 6^2=36\pmod{25}.$$ Since $36$ is already a multiple of $4$, we have immediately that $14^{14^{14}}\equiv 36\pmod{100}$.