A249507 Length of full iterated word (direct branch and reverse branch) of the Kolakoski sequence A000002 initiated at A000002(n). If the reverse branch is longer than the direct branch, the total length is counted negatively: if A000002(n) = 2, a(n) = 0; if A000002(n) = 1, a(n) = (ld+lr-1)*sign(ld-lr) with ld = max { k | A000002(n-i+1) = A000002(i), 0A000002(n-i+1) = A000002(i), 0
0, 0, -4, 2, 0, 5, 0, 0, 10, 0, 0, -4, 2, 0, -2, 4, 0, 0, -8, 0, -2, 2, 0, 8, 0, 0, -4, 2, 0, -2, 2, 0, 5, 0, 0, 14, 0, 0, -4, 2, 0, 5, 0, 0, -5, 0, -2, 2, 0, -2, 4, 0, 0, 24, 0, 0, -4, 2, 0, 5, 0, 0, 10, 0, 0, -4, 2, 0, -2, 2, 0, 5, 0, 0, -5, 0, -2, 4, 0, 0, 38, 0, 0, -4, 2, 0, 5
Offset: 2
Keywords
Examples
The OK sequence begins as (highlighting the 10th term): 122112122-1-2211211221211... where the iterated word 122-1-221121 of length 10 can be seen around the 10th term; thus a(10) = 10.
Links
- Jean-Christophe Hervé, Table of n, a(n) for n = 2..99990
Comments