Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 3.2 Exercise 3.2.23
Determine the last two digits of $3^{3^{100}}$. (Find $3^{100} \mod {\varphi(100)}$ and use Exercise 3.2.22.)
Solution: We saw in a previous exercise how to compute that $\varphi(100) = 40$. Now $3^4 = 81 \equiv 1 \pmod {40}$, so that $$3^{100} = (3^4)^{25} \equiv 1^{25} = 1 \pmod {40}.$$ Thus $3^{100} = 40k + 1$ for some integer $k$. By Exercise 3.2.22, $3^{40} = 1 \pmod {100}$. Thus $$3^{3^{100}} = 3^{40k + 1} \equiv (3^{40})^k \cdot 3 \equiv 3 \pmod {100}.$$