<s>[INST] Find all $n\in\mathbb N$ such that $\sqrt{n^2+8n-5}$ is an integer. $n^2+8n-5$ has to be a perfect square.
How to find all $n$?
 [/INST] $y^2=n^2+8n-5 = (n+4)^2 - 21$ implies $21 = x^2-y^2$, for $x=n+4$.
Write $21 = x^2-y^2= (x-y)(x+y)$. Since $x=n+4 \ge 4$, we must have $x+y=7$ or $x+y=21$.


*

*$x+y=7$ implies $x-y=3$ and so $x=5$ and $n=1$

*$x+y=21$ implies $x-y=1$ and so $x=11$ and $n=7$
</s>