Find the last two digits of $9^{{9}^{9}}$

Key remark: By the binomial theorem, for every odd $k$, $(10-1)^k=n+10\cdot k-1$ for some integer $n$ which is a multiple of $100$. Since $10\cdot k=10\cdot\ell(k)\bmod{100}$ where $\ell(k)$ denotes the last digit of $k$, this shows that, for every odd $k$, $9^k=10\cdot \ell(k)-1\bmod{100}$.

First application: $\ell(9)=9$, hence the key remark above yields $9^9=10\cdot \ell(9)-1=89\bmod{100}$.

Second application: our first application implies that $\ell(9^9)=9$ hence, using the key remark once again but this time for $k=9^9$, one gets $9^k=10\cdot\ell(k)-1=89\bmod{100}$.

And so on: for every tower of nines, $9^{9^{9^{9^{\cdots}}}}=89\bmod{100}$.


You could also just do modular exponentiation and take note of the periods.

The powers of $9 \mod 100$ are: 1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, ... They have a period of $10$. This means that if $n \equiv 9 \mod 10$, then $9^n \equiv 89 \mod 100$. Since $9^9 = 387,420,489$, this means that $9^{9^9} \equiv 89 \mod 100$.


Let $k$ be the order of $9$ mod $100$. Then $$1\equiv 9^k=(10-1)^k \equiv 10\binom{k}{1}\cdot 10(-1)^{k-1}+(-1)^k\pmod{100}$$ It implies that $1=\pm (10k-1)\pmod{100}$. The minimal integer which satisfies this condition is $k=10$. It follows that $$9^{9^9} \equiv 9^9 \equiv 9^{-1}\equiv 89\pmod{100}.$$