## Digits reversed (#2) | sum of four squares in two ways

Take, for example, the numbers   102

$102 \; = \; 1^2 + 4^2 + 6^2 + 7^2 \; = \; 2^2 + 3^2 + 5^2 + 8^2$

$1 + 4 + 6 + 7 \; = \; 2 + 3 + 5 + 8 \; = \;15$

1,   4,   6,   7
2,   3,   5,   8

combining digits on the right and left-hand side of the equal sign and obtain

number of possible combinations:   4*3*2*1   =   4!

digits reversed
12, 43, 65, 78   ——>   21, 34, 56, 87
12, 43, 68, 75   ——>   21, 34, 86, 57
12, 45, 63, 78   ——>   21, 54, 36, 87
12, 45, 68, 73   ——>   21, 54, 86, 37
12, 48, 63, 75   ——>   21, 84, 36, 57
12, 48, 65, 73   ——>   21, 84, 56, 37

13, 42, 65, 78   ——>   31, 24, 56, 87
13, 42, 68, 75   ——>   31, 24, 86, 57
13, 45, 62, 78   ——>   31, 54, 26, 87
13, 45, 68, 72   ——>   31, 54, 86, 27
13, 48, 62, 75   ——>   31, 84, 26, 57
13, 48, 65, 72   ——>   31, 84, 56, 27

15, 42, 63, 78   ——>   51, 24, 36, 87
15, 42, 68, 73   ——>   51, 24, 86, 37
15, 43, 62, 78   ——>   51, 34, 26, 87
15, 43, 68, 72   ——>   51, 34, 86, 27
15, 48, 62, 73   ——>   51, 84, 26, 37
15, 48, 63, 72   ——>   51, 84, 36, 27

18, 42, 63, 75   ——>   81, 24, 36, 57
18, 42, 65, 73   ——>   81, 24, 56, 37
18, 43, 62, 75   ——>   81, 34, 26, 57
18, 43, 65, 72   ——>   81, 34, 56, 27
18, 45, 62, 73   ——>   81, 54, 26, 37
18, 45, 63, 72   ——>   81, 54, 36, 27

then

$12 + 43 + 65 + 78 \; = \; 21 + 34 + 56 + 87 \; = \; 198$
$12 + 43 + 68 + 75 \; = \; 21 + 34 + 86 + 57 \; = \; 198$
$12 + 45 + 63 + 78 \; = \; 21 + 54 + 36 + 87 \; = \; 198$
$12 + 45 + 68 + 73 \; = \; 21 + 54 + 86 + 37 \; = \; 198$
$12 + 48 + 63 + 75 \; = \; 21 + 84 + 36 + 57 \; = \; 198$
$12 + 48 + 65 + 73 \; = \; 21 + 84 + 56 + 37 \; = \; 198$

$12^2 + 43^2 + 65^2 + 78^2 \; = \; 21^2 + 34^2 + 56^2 + 87^2 \; = \; 12302$
$12^2 + 43^2 + 68^2 + 75^2 \; = \; 21^2 + 34^2 + 86^2 + 57^2 \; = \; 12242$
$12^2 + 45^2 + 63^2 + 78^2 \; = \; 21^2 + 54^2 + 36^2 + 87^2 \; = \; 12222$
$12^2 + 45^2 + 68^2 + 73^2 \; = \; 21^2 + 54^2 + 86^2 + 37^2 \; = \; 12122$
$12^2 + 48^2 + 63^2 + 75^2 \; = \; 21^2 + 84^2 + 36^2 + 57^2 \; = \; 12042$
$12^2 + 48^2 + 65^2 + 73^2 \; = \; 21^2 + 84^2 + 56^2 + 37^2 \; = \; 12002$

$13 + 42 + 65 + 78 \; = \; 31 + 24 + 56 + 87 \; = \; 198$
$13 + 42 + 68 + 75 \; = \; 31 + 24 + 86 + 57 \; = \; 198$
$13 + 45 + 62 + 78 \; = \; 31 + 54 + 26 + 87 \; = \; 198$
$13 + 45 + 68 + 72 \; = \; 31 + 54 + 86 + 27 \; = \; 198$
$13 + 48 + 62 + 75 \; = \; 31 + 84 + 26 + 57 \; = \; 198$
$13 + 48 + 65 + 72 \; = \; 31 + 84 + 56 + 27 \; = \; 198$

$13^2 + 42^2 + 65^2 + 78^2 \; = \; 31^2 + 24^2 + 56^2 + 87^2 \; = \; 12242$
$13^2 + 42^2 + 68^2 + 75^2 \; = \; 31^2 + 24^2 + 86^2 + 57^2 \; = \; 12182$
$13^2 + 45^2 + 62^2 + 78^2 \; = \; 31^2 + 54^2 + 26^2 + 87^2 \; = \; 12122$
$13^2 + 45^2 + 68^2 + 72^2 \; = \; 31^2 + 54^2 + 86^2 + 27^2 \; = \; 12002$
$13^2 + 48^2 + 62^2 + 75^2 \; = \; 31^2 + 84^2 + 26^2 + 57^2 \; = \; 11942$
$13^2 + 48^2 + 65^2 + 72^2 \; = \; 31^2 + 84^2 + 56^2 + 27^2 \; = \; 11882$

$15 + 42 + 63 + 78 \; = \; 51 + 24 + 36 + 87 \; = \; 198$
$15 + 42 + 68 + 73 \; = \; 51 + 24 + 86 + 37 \; = \; 198$
$15 + 43 + 62 + 78 \; = \; 51 + 34 + 26 + 87 \; = \; 198$
$15 + 43 + 68 + 72 \; = \; 51 + 34 + 86 + 27 \; = \; 198$
$15 + 48 + 62 + 73 \; = \; 51 + 84 + 26 + 37 \; = \; 198$
$15 + 48 + 63 + 72 \; = \; 51 + 84 + 36 + 27 \; = \; 198$

$15^2 + 42^2 + 63^2 + 78^2 \; = \; 51^2 + 24^2 + 36^2 + 87^2 \; = \; 12042$
$15^2 + 42^2 + 68^2 + 73^2 \; = \; 51^2 + 24^2 + 86^2 + 37^2 \; = \; 11942$
$15^2 + 43^2 + 62^2 + 78^2 \; = \; 51^2 + 34^2 + 26^2 + 87^2 \; = \; 12002$
$15^2 + 43^2 + 68^2 + 72^2 \; = \; 51^2 + 34^2 + 86^2 + 27^2 \; = \; 11882$
$15^2 + 48^2 + 62^2 + 73^2 \; = \; 51^2 + 84^2 + 26^2 + 37^2 \; = \; 11702$
$15^2 + 48^2 + 63^2 + 72^2 \; = \; 51^2 + 84^2 + 36^2 + 27^2 \; = \; 11682$

$18 + 42 + 63 + 75 \; = \; 81 + 24 + 36 + 57 \; = \; 198$
$18 + 42 + 65 + 73 \; = \; 81 + 24 + 56 + 37 \; = \; 198$
$18 + 43 + 62 + 75 \; = \; 81 + 34 + 26 + 57 \; = \; 198$
$18 + 43 + 65 + 72 \; = \; 81 + 34 + 56 + 27 \; = \; 198$
$18 + 45 + 62 + 73 \; = \; 81 + 54 + 26 + 37 \; = \; 198$
$18 + 45 + 63 + 72 \; = \; 81 + 54 + 36 + 27 \; = \; 198$

$18^2 + 42^2 + 63^2 + 75^2 \; = \; 81^2 + 24^2 + 36^2 + 57^2 \; = \; 11682$
$18^2 + 42^2 + 65^2 + 73^2 \; = \; 81^2 + 24^2 + 56^2 + 37^2 \; = \; 11642$
$18^2 + 43^2 + 62^2 + 75^2 \; = \; 81^2 + 34^2 + 26^2 + 57^2 \; = \; 11642$
$18^2 + 43^2 + 65^2 + 72^2 \; = \; 81^2 + 34^2 + 56^2 + 27^2 \; = \; 11582$
$18^2 + 45^2 + 62^2 + 73^2 \; = \; 81^2 + 54^2 + 26^2 + 37^2 \; = \; 11522$
$18^2 + 45^2 + 63^2 + 72^2 \; = \; 81^2 + 54^2 + 36^2 + 27^2 \; = \; 11502$