Show that any square number $k^2$ can be written as the sum of two squares and difference of two other squares

algebra-precalculusdiophantine equationselementary-number-theory

While reading up on Pythagorean quadruples and Legendre's three square theorem, I encountered the following problem:

Since there are an infinite number of Pythagorean quadruples, it is true that the equation $a^2 + b^2 + c^2 = d^2$ has an infinite number of positive integer solutions. For example, $3^2 + 4^2 + 12^2 = 13^2$. In the same sense, we can show that $5^2$ can be written as the sum of two squares $3^2 + 4^2$ and the difference of two other squares $13^2 -12^2$. Using the results above, is it possible to show that any perfect square $k^2$ can be simultaneously written as the sum of two squares $a^2 + b^2$ and the difference of two other squares $d^2 – c^2?$

For a different version of the question, click here: Range of values of $k^2$ equal to the sum of two squares and the difference of two other squares.

Best Answer

While obviously, we have $k^2=k^2+0^2 = k^2-0^2$. We might want to exclude it to make things interesting and restrict each term to be non-zero.

In that case, it is not true.

Consider $2^2$, however, we can write it as the sum of two non-zero squares.

Non-zero squares that are smaller than it is $1$, hence it can't be written as the sum of two squares.

Similarly, $1^2=1$ cannot be the difference of two non-zero squares. Suppose $$1=c^2-b^2=(c-b)(c+b)$$

then we have $c-b=1$ and $c+b=1$, resulting in $c=1, b=0$.

Similarly, $2^2=c^2-b^2=(c-b)(c+b)$

Then we either have $(c-b, c+b)=(1,4)$ or $(c-b, c+b)=(2,2)$. The second case would lead to $b=0$. hence just consider the first case.

$$c-b=1$$ $$c+b=4$$

but adding them up would lead to a contradiction in parity.