I am stuck at the following exercise:
Prove that $\forall n\in \mathbb{N}: 7\mid(1 + 2^{2^n} + 2^{2^{n+1}})$.
I tried to prove the Expression by induction but I cannot find a way to prove the implication $$7\mid(1 + 2^{2^n} + 2^{2^{n+1}}) \Rightarrow 7\mid(1 + 2^{2^{n+1}} + 2^{2^{(n+1)+1}}).$$ Any help would be appreciated very much.
Let $a_n=2^{2^n}$. We have $a_{n+1}=a_n^2$, hence the sequence $\{a_n\pmod{7}\}_{n\geq 0}$ is periodic from some point on. Let we compile a small table: $$ \begin{array}{|c|c|c|c|c|c|}\hline n & 0 & 1 & 2 & 3 & \ldots \\ \hline a_n\pmod{7} & 2 & 4 & 2 & 4 & \ldots\\ \hline\end{array}$$ By induction it is trivial that $a_n\equiv 2\pmod{7}$ if $n$ is even and $a_n\equiv 4\pmod{7}$ if $n$ is odd.
In any case, $$ 1+a_n+a_{n+1} \equiv 1+2+4 \equiv \color{red}{0}\pmod{7} $$ and that proves the claim.