login
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