[go: up one dir, main page]

login
A249094
Length of reverse 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, 4, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 1, 0, 0, 7, 0, 2, 1, 0, 2, 0, 0, 4, 1, 0, 2, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 0, 0, 4, 0, 2, 1, 0, 2, 1, 0, 0, 7, 0, 0, 4, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 1, 0, 2, 0, 0, 4, 0, 2, 1, 0, 0, 11, 0, 0, 4, 1, 0, 2
OFFSET
2,3
COMMENTS
The Kolakoski sequence A000002 has a fractal structure that appears in the infinite number of iterations and reverse iterations of itself that it contains. Each iteration develops itself in two branches, a right branch in the direct sense, and a left branch in the reverse sense, e.g., 122-1-221121. This sequence gives the length of the reverse iteration (or left branch) starting at position n, with a length = 0 if A000002(n) = 2 <> A000002(1) = 1.
The lengths of the right branches are in A249093 and the lengths of the full iterations with the two branches are in A249507.
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).
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) in reverse order for the left branches, and the nonzero values of this sequence are all in A054352. Any given value > 1 cannot appear in this sequence before the other smaller values.
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(10) = 4 since A000002(7:10) = A000002(1:4) and A000002(6) <> A000002(5).
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved