<s>[INST] If $a, b, c, d \in \mathbb{N}$ and $ab = cd \ne 0$ show that $a^2+b^2+c^2+d^2$ is composite A problem I saw on quora,
slightly modified.
If $a, b, c, d \in \mathbb{N}$
and
$ab = cd \ne 0$
show that
$a^2+b^2+c^2+d^2$
is composite.
My solution uses the theorem that
a number that can be written as the sum of two squares in two different ways is composite,
and I wondered if there is 
a simpler proof
(probably involving
the difference of squares).
Here is my proof.
$a^2+b^2+c^2+d^2
=a^2+2ab+b^2+c^2–2cd+d^2
=(a+b)^2+(c-d)^2
$
and
$a^2+b^2+c^2+d^2
=a^2-2ab+b^2+c^2+2cd+d^2
=(a-b)^2+(c+d)^2
$
and it is known that 
a number that can be written as the sum of two squares in two different ways is composite.
If the two ways are the same
then either
$a+b=a-b, c-d=c+d$
or
$a+b=c+d, c-d=a-b$.
In the first case,
$b=d=0$
which is not allowed.
In the second case,
adding them
$2a = 2c$ so $a=c$
and then $b=d$
so
$a^2+b^2+c^2+d^2
=2a^2+2b^2
$
which is composite.
 [/INST] standard is to let   $g = \gcd(a,c)$ so that $a = g \alpha$   and $c = g \gamma,$ with
$$ \gcd(\alpha, \gamma) = 1 $$
As $b \alpha = d \gamma$ and $ \gcd(\alpha, \gamma) = 1, $ we find $\gamma|b,$ let
$  b = h \gamma,$  which leads to $d = h \alpha$
$$ a^2 + c^2 + d^2 + b^2 = g^2 \alpha^2 + g^2 \gamma^2 + h^2 \alpha^2 + h^2 \gamma^2 = (g^2 + h^2) (\alpha^2 + \gamma^2)     $$ 
</s>