login
Irregular triangle read by rows; the n-th row is the colexicographically earliest finite subset of distinct positive numbers that do not appear in previous rows and summing to a prime number.
2

%I #10 Oct 18 2020 22:32:28

%S 2,3,1,4,5,7,8,9,11,13,6,10,15,17,19,12,14,21,23,16,25,20,27,29,31,18,

%T 22,33,24,35,37,28,39,41,43,26,45,47,30,49,32,51,53,34,55,36,38,57,59,

%U 61,40,63,42,65,67,44,69,71,73,48,50,75,54,77,79,46,81,83

%N Irregular triangle read by rows; the n-th row is the colexicographically earliest finite subset of distinct positive numbers that do not appear in previous rows and summing to a prime number.

%C This sequence is a permutation of the natural numbers.

%C Each prime number appears alone on some row.

%C Sequence A338141 gives row sums.

%H Rémy Sigrist, <a href="/A338240/b338240.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A338240/a338240.png">Scatterplot of (n, a(n)-n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A338240/a338240.gp.txt">PARI program for A338240</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e Triangle begins:

%e 1: [2]

%e 2: [3]

%e 3: [1, 4]

%e 4: [5]

%e 5: [7]

%e 6: [8, 9]

%e 7: [11]

%e 8: [13]

%e 9: [6, 10, 15]

%e 10: [17]

%e 11: [19]

%e 12: [12, 14, 21]

%e 13: [23]

%e 14: [16, 25]

%e 15: [20, 27]

%o (PARI) See Links section.

%Y Cf. A338141 (row sums).

%K nonn,tabf

%O 1,1

%A _Rémy Sigrist_, Oct 18 2020