Lời giải:
Với $k\in\mathbb{N}$.
Nếu $n=3k$ thì:
$2^{2n}+2^n+1=2^{6k}+2^{3k}+1=64^k+8^k+1$
$\equiv 1^k+1^k+1\equiv 3\pmod 7$ (loại)
Nếu $n=3k+1$ thì:
$2^{2n}+2^n+1=2^{6k+2}+2^{3k+1}+1$
$=4.64^k+2.8^k+1\equiv 4+2+1\equiv 7\equiv 0\pmod 7$
Nếu $n=3k+2$ thì:
$2^{2n}+2^n+1=2^{6k+4}+2^{3k+2}+1$
$=16.64^k+4.8^k+1\equiv 16+4+1\equiv 0\pmod 7$
Vậy chỉ cần $n$ không chia hết cho $3$ thì $2^{2n}+2^n+1\vdots 7$