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

I have been told that this proof is incorrect, however, I'm having a hard time seeing the issue.

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

Proof:
$$n > 0$$

Since $$n$$ is a perfect square, $$a^2=n$$
The subsequent perfect square can be written as $${b^2=\left(a+1\right)}^2$$
The difference between consecutive squares is then $${|b}^2-a^2|=|2a+1|$$

$$\forall a\in\mathbb{Z}(|2a+1|\neq 4)$$
$$\square$$

Edit: Thanks everyone, appreciate it :)

• Well, nobody said the squares had to be consecutive. $0,4$ are two squares that differ by $4$ so somewhere along the line you have to use the fact that $n>0$.
– lulu
Feb 19, 2021 at 1:19
• You can say that $(a+1)^2-a^2\le4$. Feb 19, 2021 at 1:29
• Oops, edited @lulu Feb 19, 2021 at 1:32
• I don't see where you improved anything. You are still only considering consecutive squares, but the problem did not specify that. For example, your argument would work equally well for $n, n+8$ but of course there is such a pair (namely $1,9$).
– lulu
Feb 19, 2021 at 1:35

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.

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$$.

Your proof/argument shows that if $$n$$ is a square, then the next square, namely $$\ n+2\sqrt{n}+1,\$$ is not equal to $$\ n+4\$$. You haven't in any way shown that $$\ n+4\$$ is not a square number. You've just shown that it's not the next square number after $$\ n$$.