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”).

A074276
Positions of occurrences of 2,1,1,2,1 in the Kolakoski sequence A000002.
3
3, 12, 21, 27, 30, 39, 47, 57, 66, 69, 84, 93, 102, 111, 114, 120, 129, 139, 156, 166, 174, 183, 189, 192, 207, 216, 219, 225, 237, 243, 252, 264, 270, 273, 282, 290, 309, 318, 327, 336, 351, 354, 363, 380, 386, 398, 407, 416, 425, 437, 443, 462, 471, 480
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,..., so 2,1,1,2,1 occurs at positions 3 and 12.
MATHEMATICA
a2 = {1, 2, 2}; Do[a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 400}, {i, 1, a2[[n]]}]; a2 //. {a___, 2, 1, 1, 2, 1, b___} :> {a, 0, 1, 1, 2, 1, b} // Flatten // Position[#, 0] & // Flatten (* Jean-François Alcover, Jun 18 2013 *)
CROSSREFS
Sequence in context: A256131 A080767 A043465 * A055041 A061819 A017197
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Sep 21 2002
EXTENSIONS
Extended and offset corrected by Nathaniel Johnston, May 02 2011
STATUS
approved