Find The Last Two Digits Of $9^{8^7}$ Find the last two digits of $9^{8^7}$.
I tried finding a secure pattern for the last two digits of powers of $9$ but that didn't work.  Any answers?
 A: Since \begin{align}(10-1)^{10}&=\sum_{i=0}^{10} \begin{pmatrix} 10 \\i \end{pmatrix}10^i(-1)^{10-i}\\&=(-1)^{10}+10(10)(-1)^9+\sum_{i=2}^{10} \begin{pmatrix} 10 \\i \end{pmatrix}10^i(-1)^{10-i} \\&\equiv1\mod 100\end{align}
We have 
$$9^{10} \equiv 1 \mod 100$$
Since $8^7 \equiv (-2)^7 \equiv -128 \equiv 2 \mod 10,$
$9^{8^7}\equiv9^2 \equiv 81 \mod 100$
A: If you look at the last two digits of powers of nine, there is a cycle of length $10$: $$09,81,29,61,49,41,69,21,89,01.$$
So, you just need to find the remainder when dividing $8^7$ by $10$, i.e. the last digit of $8^7$. Some computation shows this digit is $2$, so the second number in the above list is $81$.
A: Alternatively
By FLT 
$3^{\phi(100) = 40}= 9^{20} \equiv 1 \mod 100$
$9^{8^7} = 9^{2^{21}} \equiv 9^{2^{21} \mod 20} \mod 100$
$2^{\phi(5)=4} \equiv 1 \mod 5$ so $2^{21=4*5 + 1} \equiv 2 \mod 5$
$2^{21} \equiv 0 \mod 4$ os $2^{21} \equiv 2 + 5k \mod 20$ where $4|2 + 5k$. 
i.e. $2^{21} \equiv 12 \mod 20$.
so $9^{2^{21}} \equiv 9^{12}  \mod 100$
$9^{12} = (10 - 1)^{12} = 10^{12} - .... -12*10 + 1 \equiv -120 + 1 \equiv 81 \mod 100$
