Prove that if n is a perfect square, then n+2 is not a perfect square I'm working on proving the following statement:

If n is a perfect square, then n+2 is not a perfect square.

I also need to state this in first order logic with arithmetic, but have no idea what that looks like.

The only start I have so far in terms of the proof is:

$n$ = $a^2$

$n+2$ = $b^2$

But I don't know how to proceed from here? I've seen solutions to this already but do not understand how they actually prove anything.
Let's assume w.o.l.g that $a, b &gt;= 0$

$b^2 = n+2$

$a^2 = n$

So $b^2 - a^2 = 2$, which means $(b-a)(b+a) = 2$. So $(b+a)$ is a divisor of 2 (either 1 or 2, since $b+a&gt;0$).

Now only a few cases remain


$a = 0, b=1$
$a = 1, b=0$
$a = 0, b=2$
$a = 1, b=1$
$a = 2, b=0$


No case has $b^2 - a^2 = 2$
Let us assume $n+2$ is a perfect square:
then, since $n$ is a perfect square, $n=a^2$ (where $a$ is a positive integer).
Since according to our assumption, $n+2$ is a perfect square, $n+2=b^2$ (where $b$ is a positive integer)
Then, we have ,
$$
a^2 +2=b^2
$$
Since the sum of a perfect square (here, $a^2$) and an imperfect square (here, $2$) is always an imperfect square, we know that the left hand side of the equation is an imperfect square and the right hand side of the equation is a perfect square (according to our assumption). So, a clear contradiction arises. This contradiction is due to our false assumption. Thus, $a^2+2$ i.e. $n+2$ is an imperfect square. Hence proved