# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a320143 Showing 1-1 of 1 %I A320143 #22 Oct 28 2021 10:00:36 %S A320143 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, %T A320143 34,35,37,38,41,42,43,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,63, %U A320143 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 %N 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. %C A320143 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. %C A320143 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. %C A320143 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. %C A320143 This is for instance the situation of the computed "diamond" after the value 12 has been assigned (on the right): %C A320143 1 %C A320143 2 3 %C A320143 4 5 6 %C A320143 7 9 11 8 %C A320143 10 16 20 19 12 %C A320143 26 36 39 31 %C A320143 62 75 70 %C A320143 137 145 %C A320143 282 %C A320143 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): %C A320143 1 %C A320143 2 3 %C A320143 4 5 6 %C A320143 7 9 11 8 %C A320143 10 16 20 19 12 %C A320143 13 26 36 39 31 %C A320143 39 62 75 70 %C A320143 137 145 %C A320143 282 %C A320143 So, as 13 fails, we will try 14 instead: %C A320143 1 %C A320143 2 3 %C A320143 4 5 6 %C A320143 7 9 11 8 %C A320143 10 16 20 19 12 %C A320143 14 26 36 39 31 %C A320143 40 62 75 70 %C A320143 102 137 145 %C A320143 239 282 %C A320143 521 %C A320143 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: %C A320143 1 %C A320143 2 3 %C A320143 4 5 6 %C A320143 7 9 11 8 %C A320143 10 16 20 19 12 %C A320143 14 26 36 39 31 13 %C A320143 40 62 75 70 44 %C A320143 102 137 145 114 %C A320143 239 282 259 %C A320143 521 541 %C A320143 1062 %C A320143 This is fine; the 6th row of the triangle is now completed. %C A320143 Etc. %H A320143 Lars Blomberg, Table of n, a(n) for n = 1..200 %e A320143 The triangle starts like this: %e A320143 1 %e A320143 2 3 %e A320143 4 5 6 %e A320143 7 9 11 8 %e A320143 10 16 20 19 12 %e A320143 14 26 36 39 31 13 %e A320143 15 40 62 75 70 44 17 %e A320143 18 55 102 137 145 114 61 21 %e A320143 22 73 157 239 282 259 175 82 23 %e A320143 ... %Y A320143 Cf. A007318 (Pascal's triangle read by rows). %K A320143 base,tabl,nonn %O A320143 1,2 %A A320143 _Eric Angelini_ and _Lars Blomberg_, Oct 06 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE