OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
EXAMPLE
Kolakoski sequence begins 1,2,2,1,1,2,1,2,2,1,2,2,1,1,... so the sequence includes 2, 8, and 11.
MATHEMATICA
a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 300}, {i, 1, a2[[n]]}]; Split[a2] /. {2, 2} -> {0, 2} // Flatten // Position[#, 0] & // Flatten (* Jean-François Alcover, Jun 18 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Sep 20 2002
EXTENSIONS
Extended and offset changed by Nathaniel Johnston, May 02 2011
STATUS
approved