Most even numbers is a sum $a+b+c+d$ where $a^2+b^2+c^2=d^2$

I have no idea how hard this conjecture is to prove:

Any even number $n\ge 36$ can be written as $n=a+b+c+d$ where $a^2+b^2+c^2=d^2$ and $a,b,c,d\in\mathbb Z^+$.

Small exceptions are $n=2, 4, 6, 10, 12, 14, 20, 26, 34.\,$ Tested for $n\le 10,000$.

A counter-example would be as interesting as a proof.

$n$ as above must be even
$d-c,c+d|a^2+b^2$

• Tested for $n\le 4000$? If somebody claimed "For a positive integer $y$, $61y^2+1$ is never a square of an integer, tested for $y<226153980$", that would still be wrong, because $61\cdot226153980^2+1=1766319049^2$ – Professor Vector Aug 19 '17 at 12:11
• You should add the positivity condition to your question, it may get overlooked in the comments. – Professor Vector Aug 19 '17 at 13:22
• The fact that there are exceptions rules out an identity as proof. However, just an observation, the simple identity $$(n - 1)^2 + n^2 + (n^2 - n)^2 = (n^2 - n + 1)^2$$ shows that $a+b+c+d = 2n^2$, hence every twice a square can be so expressed. – Tito Piezas III Aug 21 '17 at 8:26
• @TitoPiezasIII Identities are not entirely ruled out. There might be one that produces negative values for one or more of $a,b,c,d$ in those exceptional cases. – Jaap Scherphuis Aug 21 '17 at 8:40
• @TitoPiezasIII Furthermore, twice every non-squarefree number can be expressed (via scaling), – Carl Schildkraut Aug 21 '17 at 19:25

If you rewrite your sum of squares as

$$a_4^2-a_3^2=a_1^2+a_2^2$$

Then all you need to do is find a difference of two squares that equals a sum of two squares.

If the sum of two squares is an odd number $b$ with the form $2k+1$ that is

$$a_1^2+a_2^2=b=2k+1$$

Then since any odd number can be trivially written as the difference of two squares we have

$$\left( \frac{b+1}{2}\right)^2-\left( \frac{b-1}{2}\right)^2=b$$

which immediately gives

$$\left( \frac{b+1}{2}\right)^2-\left( \frac{b-1}{2}\right)^2=a_1^2+a_2^2$$

To fit your constraint above $\left( \frac{b+1}{2}\right)^2$ is even and $\left( \frac{b-1}{2}\right)^2$ is odd.

Most sums of two squares have the form $4k+1$ as you will see by adding these in turn $$(4k_1+1)^2+(4k_2)^2$$ $$(4k_1+1)^2+(4k_2+1)^2$$ $$(4k_1+1)^2+(4k_2+2)^2$$ $$(4k_1+1)^2+(4k_2+3)^2$$ $$(4k_1+2)^2+(4k_2)^2$$ $$(4k_1+2)^2+(4k_2+1)^2$$ $$(4k_1+2)^2+(4k_2+2)^2$$ $$(4k_1+2)^2+(4k_2+3)^2$$ $$(4k_1+3)^2+(4k_2)^2$$ $$(4k_1+3)^2+(4k_2+3)^2$$

Find the results $(\mod 4)$ and see if you can find other sums of the form $a_4^2-a_3^2=a_1^2+a_2^2$

Note Added to help explain why this approach does not work:

I thought the above might help lead to a proof/disproof of the conjecture. Hopefully the comments below will help clarify why this approach does not work.

if $a_1=\left( \frac{u-v}{2}\right)$, $a_2=\left( \frac{u+v}{2}\right)$, $a_3=\left( \frac{w-x}{2}\right)$ and $a_4=\left( \frac{w+x}{2}\right)$ then

$$n=a_1+a_2+a_3+a_4$$ $$n=\left( \frac{u-v}{2}\right)+\left( \frac{u+v}{2}\right)+\left( \frac{w-x}{2}\right)+\left( \frac{w+x}{2}\right)$$ $$n=u+w \tag 1$$ and

$$a_4^2=a_1^2+a_2^2+a_3^2$$ $$\left( \frac{w+x}{2}\right)^2=\left( \frac{u+v}{2}\right)^2+\left( \frac{u-v}{2}\right)^2+\left( \frac{w-x}{2}\right)^2$$

$$wx= \left( \frac{u+v}{2}\right)^2+\left( \frac{u-v}{2}\right)^2$$ or $$2wx=u^2+v^2$$

Substituting for $w$ using (1) gives $$n=u+\frac{u^2+v^2}{2x}$$

$2x$ being a factor of $u^2+v^2$.

This result I think shines a little light on why the problem of finding $n$ is not possible using this approach; that is the difficulty in finding a general solution to the factorization of $u^2+v^2$.

• The OP isn't looking for any solution of $a^2+b^2+c^2=d^2,$ only for those where $a+b+c+d$ is a given even number $n$. – Professor Vector Aug 19 '17 at 13:38
• @ProfessorVector: I admit my answer could be better worded and arranged, but I did write "To fit your constraint above $\left( \frac{b+1}{2}\right)^2$ is even and $\left( \frac{b-1}{2}\right)^2$ is odd" to acknowledge this requirement. – James Arathoon Aug 19 '17 at 13:49
• How would that give a representation of, say, $n=36$ as $a+b+c+d$ satisfying $a^2+b^2+c^2=d^2$? – Professor Vector Aug 19 '17 at 13:56
• @ProfessorVector: I realise now that the constraint above is not correct. all that is required is that $a+b+c+d$ is even, $\left( \frac{b+1}{2}\right)$ and $\left( \frac{b-1}{2}\right)$ can be odd and even either way around as long as $a_1$ and $a_2$ are an odd-even pair. – James Arathoon Aug 20 '17 at 12:15
• @ProfessorVector: in regard to your question there are two answers to $n=36$; $14^2-12^2=6^2+4^2$ and $15^2-5^2=14^2+2^2$, (a) and (b) respectively. (a) is simply a multiple of $7^2-6^2=13=3^2+2^2$, however (b) factorizes as $5^2(3^2-1^2)=2^2(7^2+1^2)$ with $5^2=\frac{1}{2}(7^2+1^2)$ and $3^2-1^2=2^3$. – James Arathoon Aug 20 '17 at 12:24

$$a^2+b^2+c^2=d^2$$

$$a=2ps$$ $$b=2ks$$ $$c=s^2-p^2-k^2$$ $$d=s^2+p^2+k^2$$

$$2n=2ps+2ks+s^2-p^2-k^2+s^2+p^2+k^2$$

$$qt=n=s(p+k+s)$$

Lay on multipliers and pick the right.

Or other item.

$$a=2s(p-k)$$

$$b=2s(p+k)$$

$$c=p^2+k^2-2s^2$$

$$d=p^2+k^2+2s^2$$

$$2n=2p^2+2k^2+4ps$$

$$p(p+2s)=n-k^2$$

It remains to try all possible $k$ . That expression was greater than $0$.

• How can you guarantee $c>0$? – Professor Vector Aug 19 '17 at 13:31
• No, it remains to prove that a choice with $p>k$ $p^2+k^2-2s^2>0$ is possible. And don't forget to tell me if you succeed, because I'd revoke my downvote, then, naturally. – Professor Vector Aug 19 '17 at 21:00