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”).
%I #12 Jun 18 2013 06:06:14
%S 3,12,21,27,30,39,47,57,66,69,84,93,102,111,114,120,129,139,156,166,
%T 174,183,189,192,207,216,219,225,237,243,252,264,270,273,282,290,309,
%U 318,327,336,351,354,363,380,386,398,407,416,425,437,443,462,471,480
%N Positions of occurrences of 2,1,1,2,1 in the Kolakoski sequence A000002.
%H Nathaniel Johnston, <a href="/A074276/b074276.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%t 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 *)
%Y Cf. A074275, A074277.
%K nonn,easy
%O 1,1
%A _Jon Perry_, Sep 21 2002
%E Extended and offset corrected by _Nathaniel Johnston_, May 02 2011