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”).

A362228
Triangle read by rows: row n is the shortest, then lexicographically earliest sequence of positive integers that takes n iterations of the run transform to reach 1.
0
1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1
OFFSET
0,2
COMMENTS
The run transform replaces each run of consecutive identical values with a single value representing the length of that run.
Note that the shortest sequence is preferred over the lexicographically earliest. For example, for row n=6, we could have had (1,1,2,1,1,2,2), which is lexicographically earlier than (1,2,1,1,2), but the former has 7 terms and the shortest sequence has 5.
It is not sufficient to consider only the integers 1 and 2 inside a program for calculating this sequence, because Samuel B. Reid found a string of length 146 which will transform in 15 iterations of the run transform into 1. While doing so the fourth and fifth iterates of the transform contain a 3. - Thomas Scheuerle, Apr 12 2023
EXAMPLE
The triangle begins:
0 1;
1 2;
2 1, 1;
3 1, 2;
4 1, 1, 2;
5 1, 1, 2, 1;
6 1, 2, 1, 1, 2;
7 1, 1, 2, 1, 2, 2, 1;
8 1, 2, 1, 1, 2, 1, 1, 2, 2, 1;
9 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2;
10 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2;
...
Here is the run transform iterated on the 6th row (1, 2, 1, 1, 2), which takes 6 transformations to reach 1:
1, 1, 2, 1
2, 1, 1
1, 2
1, 1
2
1
CROSSREFS
Cf. A327662.
Sequence in context: A368473 A106035 A293811 * A105141 A103961 A012257
KEYWORD
nonn,tabf
AUTHOR
Neal Gersh Tolunsky, Apr 11 2023
STATUS
approved