cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Apr 11 2023

Keywords

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

Examples

			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.
Showing 1-1 of 1 results.