Find the natural numbers $n$ such that $n 2^{n+1}+1$ is a square.
We are therefore looking for the $n$ such that there exists $a$ such that $n 2^{n+1}+1=a^{2}$. So, $n 2^{n+1}=(a+1)(a-1)$. Therefore, $2 \mid a+1$ and $2 \mid a-1$ (indeed, $a+1 \equiv a-1[2]$, and $n \geqslant 0$). We set $b$ such that $a-1=2 b$. We now assume $n \geqslant 1$, hence $n 2^{n-1}=b(b+1)$. Therefore, $b$ and $b+1$ are of different parities, in particular only one of the two is even. We note $n=2^{x} \cdot y$, with $y$ odd. It follows that, if it is $b$ that is even: $b \geqslant 2^{n-1}$, and $b+1 \leqslant y \leqslant n$. However, by a simple induction, we show that for $n \geqslant 1$, we have $2^{n-1} \geqslant n$. This would imply $b \geqslant b+1$: absurd. Thus, $b+1$ is even. Therefore, $b+1 \geqslant 2^{n-1}$, and $b \leqslant n$, hence $n+1 \geqslant 2^{n-1}$. However, for $n \geqslant 4$, we have $2^{n-1} \geqslant n+1$. By testing the remaining cases, we find that only $n=3$ works. It remains $n=0$, which is another solution.