

A249093


Length of selfiteration of the Kolakoski sequence A000002 starting at A000002(n): a(n) = max { k  A000002(n+i1) = 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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

JeanChristophe Hervé, Table of n, a(n) for n = 2..99990


EXAMPLE

A000002(n) = 2 => a(n) = 0 since the Kolakoski sequence begins by 1. a(7) = 4 since A000002(7:10) = A000002(1:4) and A000002(11) <> A000002(5).


CROSSREFS

Cf. A000002, A054351, A054352, A249094, A249507, A249508.
Sequence in context: A246160 A081120 A200038 * A102392 A227311 A178515
Adjacent sequences: A249090 A249091 A249092 * A249094 A249095 A249096


KEYWORD

nonn


AUTHOR

JeanChristophe Hervé, Oct 28 2014


STATUS

approved



