login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A074275
Positions of occurrences of 1,2,2,1,2 in the Kolakoski sequence A000002.
3
7, 17, 34, 43, 52, 61, 73, 79, 88, 98, 106, 125, 134, 143, 149, 152, 161, 170, 179, 196, 202, 211, 230, 233, 248, 257, 260, 277, 286, 295, 298, 304, 313, 323, 331, 340, 346, 358, 367, 373, 376, 391, 394, 403, 411, 421, 430, 433, 448, 451, 457, 466, 476, 493
OFFSET
1,1
LINKS
EXAMPLE
The Kolakoski sequence begins 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,1,2,2,1,2,..., so 1,2,2,1,2 occurs at positions 7 and 17.
MATHEMATICA
a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 400}, {i, 1, a2[[n]]}]; a2 //. {a___, 1, 2, 2, 1, 2, b___} :> {a, 0, 2, 2, 1, 2, b} // Flatten // Position[#, 0] & // Flatten (* Jean-François Alcover, Jun 18 2013 *)
CROSSREFS
Sequence in context: A301695 A301725 A278920 * A051411 A195016 A296553
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Sep 21 2002
EXTENSIONS
Extended and offset corrected by Nathaniel Johnston, May 02 2011
STATUS
approved