Exercise 11. Determine all natural numbers $n$ such that 21 divides $2^{2^{n}}+2^{n}+1$.
Solution to Exercise 11 Since $21=3 \times 7$ and 3 and 7 are coprime, 21 divides $2^{2^{n}}+2^{n}+1$ if and only if 3 and 7 divide $2^{2^{n}}+2^{n}+1$.

Let's immediately eliminate the case $n=0$, which gives $2^{2^{0}}+2^{0}+1=4$ which is not divisible by 21. We can therefore assume $n>0$, in particular $2^{n}$ is even. Then modulo $3: 2^{2^{n}}+2^{n}+1 \equiv(-1)^{2^{n}}+(-1)^{n}+1 \equiv (-1)^{n}+2(\bmod 3)$. In particular, $2^{2^{n}}+2^{n}+1$ is divisible by 3 if and only if $n$ is even. We will henceforth assume that this condition is satisfied.

It remains to consider the case of divisibility by 7. Modulo 7, the powers of 2 are $2^{0} \equiv 1, 2^{1} \equiv 2, 2^{2} \equiv 4, 2^{3} \equiv 1$: we need to study the exponent modulo 3. Since $n$ is even (from the previous case), we already know that $2^{n} \equiv 1(\bmod 3)$, so $2^{2^{n}} \equiv 2(\bmod 7)$. We want $2^{n} \equiv -1-2 \equiv 4(\bmod 3)$, and thus $n \equiv 2(\bmod 3)$ (and conversely, if $n \equiv 2(\bmod 3)$, since $n$ is even, then 7 divides $2^{2^{n}}+2^{n}+1$).

We must have $\mathfrak{n} \equiv 0(\bmod 2), \mathfrak{n} \equiv 2(\bmod 3)$: since 2 and 3 are coprime, the Chinese Remainder Theorem gives that there is a unique solution modulo $2 \times 3=6$, and we notice that it is $\mathfrak{n} \equiv 2(\bmod 6)$.

In conclusion, the natural numbers $\boldsymbol{n}$ that work are exactly those that satisfy $\boldsymbol{n} \equiv 2(\bmod 6)$.

Comment from the graders: Students who tackled this problem generally understood it well and presented mostly complete solutions. Some conducted a direct study modulo 21, while others decomposed it into a study modulo 3 and modulo 7. Those who chose this alternative mostly forgot to specify that 3 and 7 are coprime, which is necessary for the study modulo 21 to be equivalent to the studies modulo 3 and modulo 7. Some also misread the statement and considered $2^{2n}+2^{n}+1$ instead of $2^{2^{n}}+2^{n}+1$. It is important to note that $2^{2^{n}}=2^{\left(2^{n}\right)}$, meaning it is $2^{k}$ with $k=2^{n}$, which is different from $\left(2^{2}\right)^{n}$.