# Writing 616 as a sum of four squares

I am using the fact that $S_4$ is closed under multiplication and Euler's four square identity:

$$(a_1^2+a_2^2+a_3^2+a_4^2)(b_1^2+b_2^2+b_3^2+b_4^2) =\\ \quad(a_1b_1 - a_2b_2 - a_3b_3 - a_4b_4)^2 + (a_1b_2+a_2b_1+a_3b_4-a_4b_3)^2 +(a_1b_3 - a_2b_4 + a_3b_1 + a_4b_2)^2 + (a_1b_4 + a_2b_3 - a_3b_2 + a_4b_1)^2$$

So $616= 2^3\cdot 7\cdot 11$

$= 8 \times (2^2+1^2+1^2+1^2)(3^2+1^2+1^2+0^2)$ $=8 \times(6 − 1 − 1)^2 + (2 + 3 + 0 − 1)^2 + (2 − 0 + 3 + 1)^2 + (0 + 1 − 1 + 3)^2$

$=8(4^2+4^2+6^2+3^2)$

But then from here I am stuck, I can't see how to get the four integers.

• $8=2^2+2^2+0^2+0^2$. Couldn't you use the same identity again? Jun 2, 2017 at 11:54
• $16^2 + 14^2+8^2+10^2 = 616$ Jun 2, 2017 at 12:17
• shortcut is: $616=28\cdot22=(5^2+1^2+1^2+1^2)(4^2+2^2+1^2+1^2)$ Jun 2, 2017 at 12:35
• My strategy was to divide $616$ by $4$ and express $154$ as sum of three squares, achieving the same result as @GerryMyerson. Jun 2, 2017 at 17:45
• For reference, all solutions satisfying $0 \le a \le b \le c \le d$. $$\begin{array}{rll}616 &= 0^2 + 2^2 + 6^2 + 24^2 &= 0^2 + 6^2 + 16^2 + 18^2\\ &= 2^2 + 4^2 + 14^2 + 20^2 &= 2^2 + 8^2 + 8^2 + 22^2\\ &= 2^2 + 10^2 + 16^2 + 16^2 &= 2^2 + 12^2 + 12^2 + 18^2\\ &= 4^2 + 4^2 + 10^2 + 22^2 &= 4^2 + 10^2 + 10^2 + 20^2\\ &= 6^2 + 6^2 + 12^2 + 20^2 &= 8^2 + 10^2 + 14^2 + 16^2 \end{array}$$ this is generated by brute force, no idea how to exhaust all solutions in other manner. Jun 2, 2017 at 19:32

If the sum of four squares is divisible by $8,$ then each of the four numbers is even and we may divide through by $2.$ That is, we write $616/4 = 154$ as the sum of four squares (this allows $0$ and $1$ as squares if convenient). Then just double those. $$154 = 144 + 9 + 1 + 0$$ $$154 = 121 + 25 + 4 + 4$$ $$154 = 121 + 16 + 16 + 1$$ and so on

I'm not sure why you didn't simply finish it:

$8 = 2^2 + 2^2 +0^2 + 0^2$

So $(2^2 + 2^2 +0^2 + 0^2)(4^2 + 4^2 + 6^2 + 3^2)$

$= (2*4 - 2*4 - 0*6 - 0*3)^2 + (2*4+2*4+0*3-0*6)^2+(2*6 - 2*3 + 0*4 + 0*4)^2 + (2*3 + 2*6 - 0*4 + 0*4)^2$

$= 0^2 + 16^2 + 6^2 + 18^2$

$= 256+ 36 + 324 = 616$

• Of course that's not the only way to do it but is does use Eulers identity only. You could do any $(8*7)*11 = (8*11)*7 = 8*(7*11)$ as well. Jun 2, 2017 at 20:39