login
A320143
A variation on Pascal's triangle: every term inside the triangle is the sum of the two integers immediately above it, with no duplicate term. See the Comments section to understand the sequence and the building process.
3
1, 2, 3, 4, 6, 7, 8, 10, 12, 14, 13, 15, 17, 18, 21, 22, 23, 24, 25, 27, 28, 30, 29, 32, 33, 34, 35, 37, 38, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 71, 72, 74, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 103
OFFSET
1,2
COMMENTS
The top of the hereunder triangle has value 1, so a(1) = 1. The next values are assigned alternately to the left border (2), then the right border (3), then the left border of the next row (4), then the right border (6), then the left border of the next row (7), then the right border (8), etc.
To build the triangle, always start a new row from the left with the smallest integer not yet present that doesn't produce an existing term. Indeed, this integer immediately generates a right-descending diagonal of terms (that are the sum of the two existing integers above it). We must then check at every stage if no duplicate term appears.
The end of the row is similarly filled with the smallest integer not yet present that doesn't produce a contradiction in its left-descending diagonal.
This is for instance the situation of the computed "diamond" after the value 12 has been assigned (on the right):
1
2 3
4 5 6
7 9 11 8
10 16 20 19 12
26 36 39 31
62 75 70
137 145
282
This "diamond" has 9 rows that won't change -- but the triangle has only 5 completed rows (the 5th row starts with 10 and ends with 12). To fully compute the 6th row of the triangle, we will try to expand the diamond with the smallest available integer -- which is 13. But 13 fails -- as we will see hereunder that the right-descending diagonal of 13 immediately produces a forbidden 39 (this 39 being used already in the triangle as the sum of 20 and 19):
1
2 3
4 5 6
7 9 11 8
10 16 20 19 12
13 26 36 39 31
39 62 75 70
137 145
282
So, as 13 fails, we will try 14 instead:
1
2 3
4 5 6
7 9 11 8
10 16 20 19 12
14 26 36 39 31
40 62 75 70
102 137 145
239 282
521
No contradiction appears with 14, all the terms of the diamond are distinct -- we then try to assign 13 at the end of the row starting with 14, and we check if its left-descending diagonal doesn't produce any duplicate term in the triangle:
1
2 3
4 5 6
7 9 11 8
10 16 20 19 12
14 26 36 39 31 13
40 62 75 70 44
102 137 145 114
239 282 259
521 541
1062
This is fine; the 6th row of the triangle is now completed.
Etc.
LINKS
EXAMPLE
The triangle starts like this:
1
2 3
4 5 6
7 9 11 8
10 16 20 19 12
14 26 36 39 31 13
15 40 62 75 70 44 17
18 55 102 137 145 114 61 21
22 73 157 239 282 259 175 82 23
...
CROSSREFS
Cf. A007318 (Pascal's triangle read by rows).
Sequence in context: A114149 A294652 A352882 * A062974 A329399 A329396
KEYWORD
base,tabl,nonn
AUTHOR
Eric Angelini and Lars Blomberg, Oct 06 2018
STATUS
approved