Prove that for any integer $n>0$ which is a perfect square, $n+4$ is not a perfect square.

Let $n = a^2 \implies n+4 = a^2+4 = b^2 \implies 4 = (b-a)(b+a) \implies b-a = 1, b+a = 4 \implies 2b = 5$, contradiction since $2b$ is even and $5$ is odd. Note that the case $b-a = 2, b+a = 2$ is ruled out because it leads to $b+a = b-a \implies a = 0$, but $a > 0$ since $n > 0$.


What's wrong is no-one said it was the next perfect square.

So if $n = a^2$ and $n+4 = b^2$ we have no reason to assume $b = a+1$.

But we can assume $b \ge a+1$ and get a similar problem.

$n=a^2$ and $n+4 = b^2 \ge (a+1)^2 = a^2 + 2a + 1$

So $4 \ge 2a+1$ so $a \le 1.5$. Well nothing wrong with that. So $a = 1, 0$ and $a=0\implies n =a^2 = 0$ that's out (but it is a case where $n =0^2$ and $n+4 = 2^2$) and $a=1\implies n=1^2 = 1$ and $n+4 = 5$ not a perfect square.

So that can fix the proof.

Or we can do:

You have $n=a^2$ and let's suppose $n+4 = b^2$ then

$b^2 - a^2 = 4$ and

$(b-a)(b+a) =4$ and... now we are talking. Assume $a,b$ are positive and $b > a$ we get $(b-a)(b+a) = (1,4), (2,2)$.

The first means $2b = 5; 2a = 3$ and $a = 1.5$ and $b = 2.5$ (and indeed $1.5^2 = 2.25$ and $2.5^2 = 6.25 = 2.25 + 4$. But $a, b$ are not integers.

The second means $a=0$ and $b =2$. So $n = 0^2 = 0 \not > 0$. So that is out.