Find all positive integers $n$ such that $n 2^{n+1} + 1$ is a perfect square.
Answer: $n=0$ and $n=3$.

Clearly $n 2^{n+1}+1$ is odd, so, if this number is a perfect square, then $n 2^{n+1}+1=$ $(2 x+1)^{2}, x \in \mathbb{N}$, whence $n 2^{n-1}=x(x+1)$.

The integers $x$ and $x+1$ are coprime, so one of them must be divisible by $2^{n-1}$, which means that the other must be at most $n$. This shows that $2^{n-1} \leqslant n+1$.

An easy induction shows that the above inequality is false for all $n \geqslant 4$, and a direct inspection confirms that the only convenient values in the case $n \leqslant 3$ are 0 and 3.