Find the positive integers $n$ such that $2^{n}+1$ is a perfect square.
We already see that 3 is a solution: let's show that it is the only one.

Let $n$ be such an integer: there exists $a \geq 0$ such that $2^{n}+1=a^{2}$. Clearly $a \neq 0$. But then $2^{n}=(a-1)(a+1)$, so $a+1$ and $a-1$ are positive divisors of a power of 2, hence they are powers of 2. Since they differ by 2, they can only be 2 and 4 (indeed, if $2^{x}+2=2^{y}$, then $y \geq 2$ because $2^{y}>2$ and $x \leq 1$ because $2^{y}-2^{x} \neq 0[4]$ and $x \neq 0$ so $x=1$ and $y=2$) so $a=3$ and $n=3$.