Define a sequence $\displaystyle \{a_{i} \} $ by $\displaystyle a_1 = 4 $ and $\displaystyle a_{i+1} = 4^{a_{i}} $ for $\displaystyle i \geq 1 $. Which integers between $\displaystyle 00 $ and $\displaystyle 99 $ inclusive occur as the last two digits in the decimal expansion of infinitely many $\displaystyle a_{i} $.

It would take a long time to do this by brute force. What exactly does this mean (this was a hint that was given)?: If $\displaystyle 4 $ does not divide $\displaystyle n $, then $\displaystyle 4^{a} \mod n $ is determined by $\displaystyle a \mod \phi(n) $. So for example, $\displaystyle 4^{a}\mod15 $ is determined by $\displaystyle a \mod \phi(15) $.