login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Partial inventory of positions as an irregular table; rows 1 and 2 contain 1, for n > 2, row n contains the 1-based positions of 1's, followed by the positions of 2's, 3's, etc. in rows n-2 and n-1 flattened.
3

%I #18 Nov 03 2022 10:06:47

%S 1,1,1,2,1,2,3,1,3,2,4,5,1,4,2,6,3,5,7,8,1,6,3,8,2,10,4,7,5,11,9,12,

%T 13,1,9,3,13,5,11,2,15,6,17,4,10,7,16,8,12,19,14,18,20,21,1,14,5,20,3,

%U 16,7,24,9,18,2,22,8,26,4,28,11,15,6,25,10,19,12,29,13,17,31,21,27,23,32,30,33,34

%N Partial inventory of positions as an irregular table; rows 1 and 2 contain 1, for n > 2, row n contains the 1-based positions of 1's, followed by the positions of 2's, 3's, etc. in rows n-2 and n-1 flattened.

%C This sequence is a variant of A356784; here we consider two prior rows, there all prior rows, hence the term "partial" in the name.

%C The n-th row contains A000045(n) terms, and is a permutation of 1..A000045(n).

%H Rémy Sigrist, <a href="/A358090/b358090.txt">Table of n, a(n) for n = 1..10945</a>

%H Rémy Sigrist, <a href="/A358090/a358090.png">Scatterplot of the first 832039 terms</a>

%H Rémy Sigrist, <a href="/A358090/a358090.gp.txt">PARI program</a>

%F T(n, 1) = 1.

%F T(n, 2) = A001611(n-2) for n > 2.

%e Table begins:

%e 1,

%e 1,

%e 1, 2,

%e 1, 2, 3,

%e 1, 3, 2, 4, 5,

%e 1, 4, 2, 6, 3, 5, 7, 8,

%e 1, 6, 3, 8, 2, 10, 4, 7, 5, 11, 9, 12, 13,

%e ...

%e For n = 7:

%e - the terms in rows 5 and 6 are: 1, 3, 2, 4, 5, 1, 4, 2, 6, 3, 5, 7, 8,

%e - positions of 1's are: 1, 6,

%e - positions of 2's are: 3, 8,

%e - positions of 3's are: 2, 10,

%e - positions of 4's are: 4, 7,

%e - positions of 5's are: 5, 11,

%e - positions of 6's are: 9,

%e - positions of 7's are: 12,

%e - positions of 8's are: 13,

%e - so row 7 is: 1, 6, 3, 8, 2, 10, 4, 7, 5, 11, 9, 12, 13.

%o (PARI) See Links section.

%Y See A358120 for a similar sequence.

%Y Cf. A000045, A001611, A342585, A356784, A358123.

%K nonn,tabf

%O 1,4

%A _Rémy Sigrist_, Oct 30 2022