Artificial intelligent assistant

Is every integer a mixed sum of three squares? 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$.

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}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 254fe8a7978e5896b891771e5ab41fd2