<s>[INST] Proof for $\forall n\in \mathbb{N}: 7\mid(1 + 2^{2^n} + 2^{2^{n+1}})$ 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.
 [/INST] Suppose $1+2^{2^n}+2^{2^{n+1}}=7k$ and set, for simplicity, $a=2^{2^n}$. Then $2^{2^{n+1}}=a^2$ and $2^{2^{n+2}}=a^4$. Then
\begin{align}
&1+2^{2^n}+2^{2^{n+1}}=1+a+a^2 \\[4px]
&1+2^{2^{n+1}}+2^{2^{n+2}}=1+a^2+a^4
\end{align}
Then
$$
(1+a^2+a^4)-(1+a+a^2)=a^4-a=a(a-1)(a^2+a+1)=7ka(a-1)
$$
so
$$
1+a^2+a^4=7k+7ka(a-1)
$$
</s>