Is every integer a mixed sum of three squares?

175 Views Asked by At

Lagrange's four-square theorem states that every natural number can be represented as the sum of four integer squares $n = a^2 + b^2 + c^2 + d^2$.

Question: Is every integer a mixed sum of three integer squares $n = \pm a^2\pm b^2 \pm c^2$ ?

Note that the signs are independently positive or negative, for example $28 = 36-9+1$.

2

There are 2 best solutions below

8
On BEST ANSWER

You can write every number $n$ in the form $a^2+b^2-c^2$. Just pick $a$ so that $n-a^2$ is odd and then solve

$$\begin{align} b+c&=n-a^2\\ b-c&=1 \end{align}$$

for $b$ and $c$:

$$\begin{align} b&={n-a^2+1\over2}\\ c&={n-a^2-1\over2} \end{align}$$

0
On

around 1930, L. E. Dickson and his students, A. Oppenheim and A. E. Ross, found all indefinite ternary quadratic forms (up to $SL_3 \mathbb Z$ equivalence) with squarefree "discriminant" that do represent all integers. Three out of four infinite families are indicated on page 161 of Modern Elementary Theory of Numbers by Dickson. With odd and squarefree $N,$ also squarefree $M,$ both allowed positive or negative, the four are $$ xy - M z^2, $$ $$ 2xy - N z^2, $$ $$ 2xy + y^2 - N z^2, $$ $$ 2xy + y^2 - 2N z^2. $$

In particular $$ g(u,v,w) = 2 uv - w^2 $$ is evidently universal, if the target number $n$ is even take $w=0$ and $v=1$ and $u=n/2.$ If $n$ is odd take $w=1.$

Take your $$ f(x,y,z) = x^2 - y^2 - z^2 $$ along with $g(u,v,w) = n.$ Then $$ f(u+v+w, u + w, v+w) = (u+v+w)^2 - (u+w)^2 - (v+w)^2 = g(u,v,w) = n. $$ Note that I have indicated a linear change of variables with determinant $1,$ so that its inverse will also have integer coefficients. This is the $SL_3 \mathbb Z$ equivalence I indicated, and the reason for taking a roundabout path to a simple fact.