# Zero and One are the only Consecutive Perfect Squares

## Theorem

If $n$ is a perfect square other than $0$, then $n+1$ is not a perfect square.

## Proof 1

Let $x$ and $h$ be integers such that $x^2 + 1 = (x - h)^2$

 $\displaystyle x^2 + 1$ $=$ $\displaystyle \left({x - h}\right)^2$ $\displaystyle 1$ $=$ $\displaystyle -2 x h + h^2$ $\displaystyle 2 x h$ $=$ $\displaystyle h^2 - 1$ $\displaystyle 2 x h$ $=$ $\displaystyle \left({h - 1}\right) \left({h + 1}\right)$

Consecutive Integers are Coprime, but both sides must have the same unique prime factorization by the Fundamental Theorem of Arithmetic, so $h$ cannot have any prime factors since they cannot be shared by $(h - 1)(h + 1)$.

This leaves $h = -1$, $h = 0$, or $h = 1$ as the only possibilities since they are the only integers with no prime factors.

If $h = -1$ then $h + 1 = 0$, so $2xh = 0$. It follows that $x = 0$.

If $h = 1$ then $h - 1 = 0$, so $2xh = 0$. It follows that $x = 0$.

If $h = 0$, then $2 x \cdot 0 = (-1)(1)$, a contradiction.

Therefore the only pairs of consecutive perfect squares are $0^2 = 0$ and $(0 + (-1))^2 = (-1)^2 = 1$, and $0^2 = 0$ and $(0 + 1)^2 = 1^2 = 1$.

$\blacksquare$

## Proof 2

Suppose that $k, l \in \Z$ are such that their squares are consecutive, i.e.:

$l^2 - k^2 = 1$

Then we can factor the left-hand side as:

$l^2 - k^2 = \left({l + k}\right) \left({l - k}\right)$

By Invertible Integers under Multiplication, it follows that:

$l + k = \pm 1 = l - k$

Therefore, it must be that:

$\left({l + k}\right) - \left({l - k}\right) = 0$

That is, $2 k = 0$, from which we conclude $k = 0$.

So if $n$ and $n + 1$ are squares, then necessarily $n = 0$.

The result follows.

$\blacksquare$