I have this problem from an algebra course:
Find the remainder of $2^{2^n}$ when divided by 13, $\forall n \in \Bbb N$
It's in a section of Fermat's little theorem and Chinese Remainder Theorem exercises but I don't understand how to solve it.
There's something I'm missing, any hints please? Thanks!
The sequence given by $a_n=2^{2^n}$ fulfills $$ a_{n+1} = a_n^2 $$ hence the sequence $\!\!\pmod{13}$ becomes periodic very soon: $$\begin{array}{|c|c|c|c|}\hline n & 0 & 1 & 2 & 3 & 4 & 5 & \ldots\\ \hline a_n \pmod{13} & 2 & 4 & \color{red}{3} & \color{blue}{9} & \color{red}{3} & \color{blue}{9} & \ldots\\ \hline\end{array}$$