login
Positions of occurrences of 1,1,2,1,2,2,1,1,2 in the Kolakoski sequence A000002.
3

%I #12 Jun 18 2013 06:06:23

%S 22,115,184,220,238,265,381,438,481,557,584,602,629,683,752,779,806,

%T 848,866,967,1036,1072,1090,1117,1179,1232,1259,1334,1379,1460,1487,

%U 1514,1541,1714,1789,1870,2050,2077,2104,2131,2149,2176,2250,2291,2348,2391

%N Positions of occurrences of 1,1,2,1,2,2,1,1,2 in the Kolakoski sequence A000002.

%H Nathaniel Johnston, <a href="/A074277/b074277.txt">Table of n, a(n) for n = 1..2500</a>

%t a2 = {1, 2, 2}; Do[a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 2000}, {i, 1, a2[[n]]}]; a2 //. {a___, 1, 1, 2, 1, 2, 2, 1, 1, 2, b___} :> {a, 0, 1, 2, 1, 2, 2, 1, 1, 2, b} // Flatten // Position[#, 0] & // Flatten (* _Jean-François Alcover_, Jun 18 2013 *)

%Y Cf. A074275, A074276.

%K nonn,easy

%O 1,1

%A _Jon Perry_, Sep 21 2002

%E Extended and offset corrected by _Nathaniel Johnston_, May 02 2011