Prove that $7$ divides $1 + 2^{(2^n)} + 2^{(2^{n+1})}$ by induction.
I ran into the above problem. The base case $n=1$ gives $21$ which is divisible by $7$.
Now assume it is true for $n$. Then for $n+1$, we have the expression
$$ 1 + 2^{(2^{n+1})} + 2^{(2^{n+2})}$$
which is equal to
$$1 + 2^{(2^n\cdot 2)} + 2^{(2^n \cdot 2^2)}$$
but I do not really see how it helps.
Any ideas?
Hint:
Let $I_n = x_n^2 + x_n + 1$ where $x_n$ satisfy $x_{n+1} = x_n^2$ with $x_0 = 2$. Then
$$I_{n+1} = x_{n}^4 + x_n^2 + 1 = (x_n^2-x_n+1)I_n$$
Proving that $7| I_n$ using induction on $n$ is now very simple.