Can every perfect square exist as the sum or difference of two perfect squares?

Every square can be written as the difference of two squares.

$(x+1)^2-x^2=2x+1$

This shows that any odd number, in particular an odd square, is the difference of two squares.

$(x+1)^2-(x-1)^2=4x$.

Any multiple of 4 is the difference of squares. An even square will be divisible by 4, so even squares are also the difference of two squares.


Every square number is expressible as the difference of two squares. First, note that every odd number $2n+1$ can be written as $(n+1)^2 - n^2$. Next, you can write every even square as $4n^2 = (n^2+1)^2 - (n^2-1)^2$. Note that if you specify that it has to be a difference of two nonzero squares, then $1$ and $4$ do not count.

In general, the only integers that cannot be written as differences of squares are the numbers congruent to $2$ modulo $4$. This can be obtained by solving for $x-y = n_1, x+y = n_2$, whenever you have a factorization $n = n_1n_2$ into terms of the same parity. (Again, if you specify difference of nonzero squares, $1$ and $4$ do not count.)