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

A249093
Length of self-iteration of the Kolakoski sequence A000002 starting at A000002(n): a(n) = max { k | A000002(n+i-1) = A000002(i), 0 < i <= k }.
6
0, 0, 1, 2, 0, 4, 0, 0, 7, 0, 0, 1, 2, 0, 1, 4, 0, 0, 2, 0, 1, 2, 0, 7, 0, 0, 1, 2, 0, 1, 2, 0, 4, 0, 0, 11, 0, 0, 1, 2, 0, 4, 0, 0, 2, 0, 1, 2, 0, 1, 4, 0, 0, 18, 0, 0, 1, 2, 0, 4, 0, 0, 7, 0, 0, 1, 2, 0, 1, 2, 0, 4, 0, 0, 2, 0, 1, 4, 0, 0, 28, 0, 0, 1, 2, 0, 4
OFFSET
2,4
COMMENTS
The Kolakoski sequence A000002 has a fractal structure that appears in the infinite number of iterations of itself that it contains. This sequence gives the length of the iteration starting at position n (with a length = 0 if A000002(n) = 2 <> A000002(1) = 1).
Recalling that A000002 begins as 1221121221..., the apparition of these iterations is easily understood from the evolution of an initial 2 in even position in A000002, which generates: 2 > (1)22(1) > (2)122112(1) > (1)221221121221(2)... (as long as the equivalent of the initial 2 in the successive iterates remains in even position). This example shows that the iterations are growing forward and backward in a symmetric pattern. The lengths of the backward iterations are in A249094 and the lengths of the full iterations with the two branches are in A249507.
Because each iteration must be generated by a preceding (and shorter) iteration, each branch is constituted of a term of A054351 (successive generations of the Kolakoski sequence), and the nonzero values of this sequence are all in A054352. That is, the only possible nonzero lengths of iterations are 1, 2, 4, 7, 11, ..., and a given value > 1 cannot appear in this sequence before the other smaller values.
Conjecture: for any k, there is an iteration of length A054352(k) in A000002.
LINKS
Jean-Christophe Hervé, Table of n, a(n) for n = 2..99990
EXAMPLE
A000002(n) = 2 => a(n) = 0 since the Kolakoski sequence begins with 1. a(7) = 4 since A000002(7:10) = A000002(1:4) and A000002(11) <> A000002(5).
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved