login
Parse the Kolakoski sequence A000002 into distinct phrases 1, 2, 21, 12, 122, 1221, 121, 12212, 11, ...; a(n) = length of n-th phrase.
8

%I #15 Nov 04 2024 12:51:03

%S 1,1,2,2,3,4,3,5,2,3,3,4,6,3,6,4,2,5,4,6,4,3,5,7,4,5,7,5,4,6,6,5,5,6,

%T 6,4,8,5,5,9,10,7,9,8,7,5,8,11,5,6,6,7,8,7,6,6,7,7,7,9,4,4,8,8,10,5,7,

%U 8,7,9,8,12,6,10,6,8,6,10,7,9,9,8,7,8,7,9,8,7,8,8,9,9,10,8,10,9,8,11,5,6

%N Parse the Kolakoski sequence A000002 into distinct phrases 1, 2, 21, 12, 122, 1221, 121, 12212, 11, ...; a(n) = length of n-th phrase.

%H Rémy Sigrist, <a href="/A187199/b187199.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A187199/a187199.gp.txt">PARI program</a>

%o (PARI) \\ See Links section.

%Y Cf. A000002, A007782, A109337, A187180-A187188, A187200.

%K nonn,changed

%O 1,3

%A _N. J. A. Sloane_, Mar 06 2011