# Enigma 1766

Spoiler for New Scientist Enigma 1766: “Triangular sums” (Follow the link to see the puzzle.)

There are several possibilities to consider. The single digit number could be the first in the sequence. Then it must be triangular: 1, 3, or 6. The second number must be two digits, with no zero, which when added to the first must be triangular, and the between the two numbers there must be no repeated digits.

The single digit number could be the second in the sequence. Then the first must be triangular, with a single digit difference between it and another triangular number; it can only be 10, 15, 21, 28, or 36. But 10 is ruled out because it has a zero, and 28 is ruled out because the corresponding single digit number, 8, shares a digit with it.

Could the single digit number be the third in the sequence? Then the first two numbers must add to 10, 15, 21, 28, or 36. They must have two digits each, which is impossible for 10 and 15, and they must not have the same first digit, which is impossible for 21 and 28. The first must be triangular, so all we’re left with is 21+15=36 (in either order), but those share a digit. So no, the single digit number cannot be third. Nor can it be fourth or fifth.

Then we’re left with these possibilities:

Sequence Sum Possible next numbers
1, 27, … 28 38
1, 35, … 36 69 84
1, 54, … 55 23
1, 65, … 66 87
3, 12, … 15 none
3, 18, … 21 none
3, 25, … 28 17
3, 42, … 45 91
3, 52, … 55 81
3, 75, … 78 none
6, 15, … 21 none
6, 39, … 45 none
6, 49, … 55 23 81
6, 72, … 78 13 58
6, 85, … 91 14 29
15, 6, … 21 34
21, 7, … 28 38
36, 9, … 45 none

For each first two numbers we consider which 2-digit numbers can be added to bring the sum up to another triangular number, and we rule out ones that repeat digits with themselves or the first two numbers, or which share a common factor with the first 2-digit number. The possibilities are shown in the fourth column.

So we have 16 sequences to consider, and in each case there are four unused digits, so we can quickly scan differences of triangular numbers (I used a spreadsheet) to see which ones we can use. There are only three cases where we can get a fourth number satisfying the puzzle requirements:

3, 25, 17, 46 but this leaves only 89 or 98, neither of which works

6, 49, 23, 75 and then 18 will give a triangular number — but it shares a common factor with 75

6, 49, 23, 58 and then 17 will give a triangular number. No common factors.

The only solution is 6, 49, 23, 58, 17 with sums 6, 55, 78, 136, 153.