## x^2 + y^2 + z^2 = u^2 + v^2

Starting with

$(a + b \, d)^2 \; + \; (a \, d - b)^2$
$= \; a^2 \, d^2 \; + \; a^2 \; + \; b^2 \, d^2 \; + \; b^2$

if   $a^2 \; + \; b^2 \; = \; c^2$,   then

$a^2 \, d^2 \; + \; b^2 \, d^2 \; + \; c^2$
$= (a \, d)^2 \; + \; (b \, d)^2 \; + \; c^2$

$= \; (d^2 + 1) \, c^2$

So,

$(a \, d)^2 + (b \, d)^2 + c^2 = (a + b \, d)^2 + (a \, d - b)^2$,

Using all 16 primitive Pythagorean triples with   $c \; \leq \; 100$ :
PPT (3,4,5) :

$(3 \, d)^2 + (4 \, d)^2 + 5^2 = (3 + 4 \, d)^2 + (3 \, d - 4)^2$   which is true

For   d = 1, 2

$3^2 + 4^2 + 5^2 \; = \; 7^2 + 1^2 \; = \; 50$
$6^2 + 8^2 + 5^2 \; = \; 11^2 + 2^2 \; = \; 125$

(5, 12, 13),    d = 1, 2
$5^2 + 12^2 + 13^2 = 17^2 + 7^2 \; = \; 338$
$10^2 + 24^2 + 13^2 = 29^2 + 2^2 \; = \; 845$

(8, 15, 17),    d = 1, 2
$8^2 + 15^2 + 17^2 \; = \; 23^2 + 7^2 \; = \; 578$
$16^2 + 30^2 + 17^2 \; = \; 38^2 + 1^2 \; = \; 1445$

(7, 24, 25),    d = 1, 2
$7^2 + 24^2 + 25^2 \; = \; 31^2 + 17^2 \; = \; 1250$
$14^2 + 48^2 + 25^2 \; = \; 55^2 + 10^2 \; = \; 3125$

(20, 21, 29),    d = 1, 2
$20^2 + 21^2 + 29^2 \; = \; 41^2 + 1^2 \; = \; 1682$
$40^2 + 42^2 + 29^2 \; = \; 62^2 + 19^2 \; = \; 4205$

(12, 35, 37),    d = 1, 2
$12^2 + 35^2 + 37^2 \; = \; 47^2 + 23^2 \; = \; 2738$
$24^2 + 70^2 + 37^2 \; = \; 82^2 + 11^2 \; = \; 6845$

(9, 40, 41),    d = 1, 2
$9^2 + 40^2 + 41^2 \; = \; 49^2 + 31^2 \; = \; 3362$
$18^2 + 80^2 + 41^2 \; = \; 89^2 + 22^2 \; = \; 8405$

(28, 45, 53),    d = 1, 2
$28^2 + 45^2 + 53^2 \; = \; 73^2 + 17^2 \; = \; 5618$
$56^2 + 90^2 + 53^2 \; = \; 118^2 + 11^2 \; = \; 14045$

(11, 60, 61),    d = 1, 2
$11^2 + 60^2 + 61^2 \; = \; 71^2 + 49^2 \; = \; 7442$
$22^2 + 120^2 + 61^2 \; = \; 131^2 + 38^2 \; = \; 18605$

(16, 63, 65),    d = 1, 2
$16^2 + 63^2 + 65^2 \; = \; 79^2 + 47^2 \; = \; 8450$
$32^2 + 126^2 + 65^2 \; = \; 142^2 + 31^2 \; = \; 21125$

(33, 56, 65),    d = 1, 2
$33^2 + 56^2 + 65^2 \; = \; 89^2 + 23^2 \; = \; 8450$
$66^2 + 112^2 + 65^2 \; = \; 145^2 + 10^2 \; = \; 21125$

(48, 55, 73),    d = 1, 2
$48^2 + 55^2 + 73^2 \; = \; 103^2 + 7^2 \; = \; 10658$
$96^2 + 110^2 + 73^2 \; = \; 158^2 + 41^2 \; = \; 26645$

(13, 84, 85),    d = 1, 2
$13^2 + 84^2 + 85^2 \; = \; 97^2 + 71^2 \; = \; 14450$
$26^2 + 168^2 + 85^2 \; = \; 181^2 + 58^2 \; = \; 36125$

(36, 77, 85),    d = 1, 2
$36^2 + 77^2 + 85^2 \; = \; 113^2 + 41^2 \; = \; 14450$
$72^2 + 154^2 + 85^2 \; = \; 190^2 + 5^2 \; = \; 36125$

(39, 80, 89),    d = 1, 2
$39^2 + 80^2 + 89^2 \; = \; 119^2 + 41^2 \; = \; 15842$
$78^2 + 160^2 + 89^2 \; = \; 199^2 + 2^2 \; = \; 39605$

(65, 72, 97),    d = 1, 2
$65^2 + 72^2 + 97^2 \; = \; 137^2 + 7^2 \; = \; 18818$
$130^2 + 144^2 + 97^2 \; = \; 209^2 + 58^2 \; = \; 47045$