## Task 4 - 231224

Determine all natural numbers $n$ for which the number $2^{n}+5$ is a perfect square.
If $2^{n}+5$ is a square number, then $n$ must be even, because for an odd $n$

$$
2^{n}+5=4^{\frac{n-1}{2}} 2+5 \equiv(-1)^{\frac{n-1}{2}} 2 \equiv \pm 2 \quad \bmod 5
$$

would hold, meaning $2^{n}+5$ would then be a quadratic non-residue modulo 5, a contradiction!

For an even $n$, however, $2^{n}=k^{2}$ with $k=2^{\frac{n}{2}} \in \mathbb{N}$, i.e., $2^{n}$ is itself a square number. We only need to solve the equation

$$
k^{2}+5=\ell^{2}
$$

in positive integers $k, \ell$. From $(\ell-k)(\ell+k)=5$ it immediately follows that $\ell-k=1, \ell+k=5$ and thus $k=2, \ell=3$. Since $2^{n}=k^{2}=2^{2}$, $n=2$ is then a solution to the problem and also the only one.