Find the last two digits of $9^{{9}^{9}}$ I have to find the last two decimal digits of the number $9^{{9}^{9}}$.
That's what I did:
$$m=100 , \phi(m)=40, a=9$$
$$(100,9)=1, \text{ so from Euler's theorem,we have :} 9^{40} \equiv 1 \pmod{100}$$
$$9^{{9}^{9}} \equiv 9^{9^{2+2+2+2+1}} \equiv 9^{9^2 \cdot 9^2 \cdot 9^2 \cdot 9^2 \cdot 9} \equiv 9^{81 \cdot 81 \cdot 81 \cdot 81 \cdot 9} \equiv 9^{(40+40+1) \cdot (40+40+1) \cdot (40+40+1) \cdot (40+40+1) \cdot 9} \equiv (9^{(40+40+1)})^{(40+40+1) \cdot (40+40+1) \cdot (40+40+1) \cdot 9} \equiv 9^9 \equiv 9^4 \cdot 9^4 \cdot 9 \equiv 6561 \cdot 6561 \cdot 9 \equiv 3721 \cdot 9 \\ \equiv 21 \cdot 9 \equiv 89 \pmod{100}$$
So,the last two digits are $8 \text{ and } 9$.
$$$$But,is there also an other way two calculate the last two digits of $9^{{9}^{9}}$ or is the above the only one?

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}.$$
