## (a^2 + b^2 + c^2 + d^2)(e^2 + f^2 + g^2 + h^2) as a sum of 7 squares

$(a^2+b^2+c^2+d^2) \,(e^2+f^2+g^2+h^2)$

$= a^2 e^2+a^2 f^2+a^2 g^2+a^2 h^2+b^2 e^2+b^2 f^2+b^2 g^2+b^2 h^2+c^2 e^2+c^2 f^2+c^2 g^2$
$+ \; c^2 h^2+d^2 e^2+d^2 f^2+d^2 g^2+d^2 h^2$

$= (ae + bf + cg + dh)^2 + (af - be)^2 + (ag - ce)^2 + (ah - de)^2 + (bg - cf)^2$
$+ \; (bh - df)^2 + (ch - dg)^2$

for example,

(1)   $1^2 + 6^2 + 7^2 + 20^2 \; = \; 2^2 + 4^2 + 5^2 + 21^2 \; = \; 486$
(2)   $1^2 + 5^2 + 12^2 + 18^2 \; = \; 2^2 + 3^2 + 9^2 + 20^2 \; = \; 494$

$(1^2 + 6^2 + 7^2 + 20^2) \,(1^2 + 5^2 + 12^2 + 18^2) = 486 \times 494 = 240084$
$(1^2 + 6^2 + 7^2 + 20^2) \,(2^2 + 3^2 + 9^2 + 20^2) = 486 \times 494 = 240084$
$(1^2 + 6^2 + 7^2 + 20^2) \,(2^2 + 4^2 + 5^2 + 21^2) = 486^2$
$(2^2 + 4^2 + 5^2 + 21^2) \,(2^2 + 3^2 + 9^2 + 20^2) = 486 \times 494 = 240084$
$(1^2 + 5^2 + 12^2 + 18^2) \,(2^2 + 3^2 + 9^2 + 20^2) = 494^2$

$(1^2 + 6^2 + 7^2 + 20^2) \,(2^2 + 4^2 + 5^2 + 21^2)$
$= \; 2^2 + 8^2 + 9^2 + 19^2 + 46^2 + 47^2 + 481^2$
$= \; 486^2$

$(1^2 + 5^2 + 12^2 + 18^2) \,(2^2 + 3^2 + 9^2 + 20^2)$
$= \; 7^2 + 9^2 + 15^2 + 16^2 + 46^2 + 78^2 + 485^2$
$= \; 494^2$

$(1^2 + 6^2 + 7^2 + 20^2) \,(1^2 + 5^2 + 12^2 + 18^2)$
$= \; 1^2 + 2^2 + 5^2 + 8^2 + 37^2 + 114^2 + 475^2$
$= \; 240084$

$(1^2 + 6^2 + 7^2 + 20^2) \,(2^2 + 3^2 + 9^2 + 20^2)$
$= \; 5^2 + 9^2 + 20^2 + 33^2 + 40^2 + 60^2 + 483^2$
$= \; 240084$

By eliminating   $5^2$,   we get,
$1^2+2^2+8^2+37^2+114^2+475^2 = 9^2+20^2+33^2+40^2+60^2+483^2 = 240059$
240059   is a prime number.

$(2^2 + 4^2 + 5^2 + 21^2) \,(2^2 + 3^2 + 9^2 + 20^2)$
$= \; 2^2 + 2^2 + 8^2 + 17^2 + 21^2 + 89^2 + 481^2$
$= \; 240084$

$240084 \; = \; 1^2 + 2^2 + 5^2 + 8^2 + 37^2 + 114^2 + 475^2$
$240084 \; = \; 5^2 + 9^2 + 20^2 + 33^2 + 40^2 + 60^2 + 483^2$
$240084 \; = \; 2^2 + 2^2 + 8^2 + 17^2 + 21^2 + 89^2 + 481^2$