## Triangular number & sum of four squares in 2 ways

An integer of the form   $T_{n} \; = \; n \, (n + 1)/2$   is called a Triangular number.

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

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

substituting   (1, 4, 6, 7)   and   (2, 3, 5, 8)   for a triangular number :

$T_1 = 1$   …..   $T_4 = 10$   …..   $T_6 = 21$   …..   $T_7 = 28$
$T_2 = 3$   …..   $T_3 = 6$   ……   $T_5 = 15$   …..   $T_8 = 36$

$1 + 10 + 21 + 28 \; = \; 3 + 6 + 15 + 36 \; = \; 60$

Similarly,

$5 + 8 + 10 + 11 \; = \; 6 + 7 + 9 + 12 \; = \; 34$

$5^2 + 8^2 + 10^2 + 11^2 \; = \; 6^2 + 7^2 + 9^2 + 12^2 \; = \; 310$

$T_5 = 15$   …..   $T_8 = 36$   …..   $T_{10} = 55$   …..   $T_{11} = 66$
$T_6 = 21$   …..   $T_7 = 28$   …..   $T_9 = 45$   ……..   $T_{12} = 78$

$15 + 36 + 55 + 66 \; = \; 21 + 28 + 45 + 78 \; = \; 172$

$1 + 4 + \; 6 \; + \; 7 \; = \; 2 + 3 + 5 + 8$
$5 + 8 + 10 + 11 \; = \; 6 + 7 + 9 + 12$
———————————————————-
$6 + 12 + 16 + 18 \; = \; 8 + 10 + 14 + 20 \; = \; 52$

$6^2 + 12^2 + 16^2 + 18^2 \; = \; 8^2 + 10^2 + 14^2 + 20^2 \; = \; 760$

$T_6 = 21$   …..   $T_{12} = 78$   …..   $T_{16} = 136$ …..   $T_{18} = 171$

$T_8 = 36$   …..   $T_{10} = 55$   …..   $T_{14} = 105$   …..   $T_{20} = 210$

$21 + 78 + 136 + 171 \; = \; 36 + 55 + 105 + 210 \; = \; 406$

Find other examples.

Paul found

$1+4+6+7 \; = \; 2+3+5+8 \; = \; 18$
$1+4+7+8 \; = \; 2+3+6+9 \; = \; 20$
$2+8+13+15 \; = \; 4+6+11+17 \; = \; 38$
$2+5+7+8 \; = \; 3+4+6+9 \; = \; 22$
$3+9+13+15 \; = \; 5+7+11+17 \; = \; 40$
$1+6+7+8 \; = \; 3+4+5+10 \; = \; 22$
$2+10+13+15 \; = \; 5+7+10+18 \; = \; 40$
$2+9+10+11 \; = \; 5+6+7+14 \; = \; 32$
$5+8+10+11 \; = \; 6+7+9+12 \; = \; 34$
$7+17+20+22 \; = \; 11+13+16+26 \; = \; 66$
$1+7+8+14 \; = \; 2+4+11+13 \; = \; 30$
$6+15+18+25 \; = \; 8+11+20+25 \; = \; 64$
$3+6+11+12 \; = \; 4+5+10+13 \; = \; 32$
$8+14+21+23 \; = \; 10+12+19+25 \; = \; 66$

$1^2+4^2+6^2+7^2 = 2^2+3^2+5^2+8^2 = 102$
$1^2+4^2+7^2+8^2 = 2^2+3^2+6^2+9^2 = 130$
$2^2+8^2+13^2+15^2 = 4^2+6^2+11^2+17^2 = 462$
$2^2+5^2+7^2+8^2 = 3^2+4^2+6^2+9^2 = 142$
$3^2+9^2+13^2+15^2 = 5^2+7^2+11^2+17^2 = 484$
$1^2+6^2+7^2+8^2 = 3^2+4^2+5^2+10^2 = 150$
$2^2+10^2+13^2+15^2 = 5^2+7^2+10^2+18^2 = 498$
$2^2+9^2+10^2+11^2 = 5^2+6^2+7^2+14^2 = 306$
$5^2+8^2+10^2+11^2 = 6^2+7^2+9^2+12^2 = 310$
$7^2+17^2+20^2+22^2 = 11^2+13^2+16^2+26^2 = 1222$
$1^2+7^2+8^2+14^2 = 2^2+4^2+11^2+13^2 = 310$
$6^2+15^2+18^2+25^2 = 8^2+11^2+20^2+25^2 = 1210$
$3^2+6^2+11^2+12^2 = 4^2+5^2+10^2+13^2 = 310$
$8^2+14^2+21^2+23^2 = 10^2+12^2+19^2+25^2 = 1230$

$T_1 = 1$   ……   $T_2 = 3$   ……   $T_3 = 6$
$T_4 = 10$   …..   $T_5 = 15$   …..   $T_6 = 21$
$T_7 = 28$   …..   $T_8 = 36$   …..   $T_9 = 45$

$T_{10} = 55$   ……   $T_{11} = 66$   ……   $T_{12} = 78$
$T_{13} = 91$   ……   $T_{14} = 105$   …..   $T_{15} = 120$
$T_{16} = 136$   …..   $T_{17} = 153$   …..   $T_{18} = 171$
$T_{19} = 190$   …..   $T_{20} = 210$   …..   $T_{21} = 231$
$T_{22} = 253$   …..   $T_{23} = 276$   …..   $T_{24} = 300$
$T_{25} = 325$   …..   $T_{26} = 351$   …..   $T_{27} = 378$
$T_{28} = 406$   …..   $T_{29} = 435$   …..   $T_{30} = 465$

(1,4,6,7)   ——->   (1, 10, 21, 28)
{2,3,5,8)   ——->   (3, 6, 15, 36)

1 + 10 + 21 + 28   =   3 + 6 + 15 + 36   =   60

(1,4,7,8)   ——->   (1, 10, 28, 36)
(2,3,6,9)   ——->   (3, 6, 21, 45)

1 + 10 + 28 + 36 = 3 + 6 + 21 + 45   =   75

(2,8,13,15)   —–>   (3, 36, 91, 120)
(4,6,11,17)   —–>   (10, 21, 66, 153)

3 + 36 + 91 + 120   =   10 + 21 + 66 + 153   =   250

(2, 5, 7, 8)   ———->   (3, 15, 28, 36)
(3 ,4 ,6, 9)   ———->   (6, 10, 21, 45)

3 + 15 + 28 + 36   =   6 + 10 + 21 + 45   =   82

(3, 9, 13, 15)   ——–>   (6, 45, 91, 120)
(5, 7, 11, 17)   ——–>   (15, 28, 66, 153)

6 + 45 + 91 + 120   =   15 + 28 + 66 + 153   =   262

(1, 4, 6, 7)   ———->   (1, 10, 21, 28)
(2, 3, 5, 8)   ———->   (3, 6, 15, 36)

1 + 10 + 21 + 28   =   3 + 6 + 15 + 36   =   60

(1, 6 ,7, 8)   ———->   (1, 21, 28, 36)
(3, 4, 5, 10)   ———>   (6, 10, 15, 55)

1 + 21 + 28 + 36   =   6 + 10 + 15 + 55   =   86

(2, 10, 13, 15)   ——->   (3, 55, 91, 120)
(5, 7, 10, 18)   ——–>   (15, 28, 55, 171)

3 + 55 + 91 + 120   =   15 + 28 + 55 + 171   =   269

math grad - Interest: Number theory
This entry was posted in Number Puzzles and tagged , . Bookmark the permalink.

### 3 Responses to Triangular number & sum of four squares in 2 ways

1. Paul says:

There are 1114 solutions with the sum of squares <= 310, Here are a few.

The isolated one is the example given above so you get the format, they all pass each test for equal sum, equal sum of squares and T Numbers etc

{{{1,4,6,7},{2,3,5,8}},{{1,4,7,8},{2,3,6,9}}} , {{2,8,13,15},{4,6,11,17}}
{{{1,4,6,7},{2,3,5,8}},{{2,5,7,8},{3,4,6,9}}} , {{3,9,13,15},{5,7,11,17}}
{{{1,4,6,7},{2,3,5,8}},{{1,6,7,8},{3,4,5,10}}} , {{2,10,13,15},{5,7,10,18}}

{{{1,4,6,7},{2,3,5,8}},{{5,8,10,11},{6,7,9,12}}} , {{6,12,16,18},{8,10,14,20}}

{{{2,9,10,11},{5,6,7,14}},{{5,8,10,11},{6,7,9,12}}} , {{7,17,20,22},{11,13,16,26}}
{{{1,7,8,14},{2,4,11,13}},{{5,8,10,11},{6,7,9,12}}} , {{6,15,18,25},{8,11,20,25}}
{{{3,6,11,12},{4,5,10,13}},{{5,8,10,11},{6,7,9,12}}} , {{8,14,21,23},{10,12,19,25}}

Paul.

• benvitalis says:

Thanks for the drop box folder

• Paul says:

Here is the MMA code, it is set between 100 and 150 for the sum of squares.

```Clear[a, b, c, d]; lt = {}; cnt = 0; lts = {}; Do[
p = Solve[
a^2 + b^2 + c^2 + d^2 == n && a < b < c < d && a > 0, {a, b, c, d},
Integers]; p = {a, b, c, d} /. p;
f = Cases[
e = Subsets[p, {2}], {{a_, b_, c_, d_}, {e_, f_, g_, h_}} /;
a + b + c + d ==
e + f + g + h && (a (a + 1))/2 + (b (b + 1))/2 + (c (c + 1))/
2 + (d (d + 1))/2 == (e (e + 1))/2 + (f (f + 1))/2 + (
g (g + 1))/2 + (h (h + 1))/2 &&
Length[Union[{a, b, c, d, e, f, g, h}]] == 8];
If[Length[f] > 0, f = Partition[Partition[Flatten[f], 4], 2];
AppendTo[lt, f]], {n, 100, 150}];
lt = Partition[Partition[Flatten[lt], 4], 2]; Do[
AppendTo[lts, {lt[[q]], lt[[w]]}], {q, 1, Length[lt] - 1}, {w, q + 1,
Length[lt]}]; Do[j = lts[[q, 1]] + lts[[q, 2]];
If[Length[Union[Total /@ (lts[[q, 1]] + lts[[q, 2]])]] == 1 &&
Length[Union[Total /@ ((lts[[q, 1]] + lts[[q, 2]])^2)]] ==
1 && (j[[1, 1]] (j[[1, 1]] + 1))/2 + (j[[1, 2]] (j[[1, 2]] + 1))/
2 + (j[[1, 3]] (j[[1, 3]] + 1))/2 + (j[[1, 4]] (j[[1, 4]] + 1))/
2 == (j[[2, 1]] (j[[2, 1]] + 1))/2 + (j[[2, 2]] (j[[2, 2]] + 1))/
2 + (j[[2, 3]] (j[[2, 3]] + 1))/2 + (j[[2, 4]] (j[[2, 4]] + 1))/
2, Print[lts[[q]], " , ", j]; cnt++], {q, 1,
Length[lts]}]; Print[cnt]```

Paul.