OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..2500
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Sep 21 2002
EXTENSIONS
Extended and offset corrected by Nathaniel Johnston, May 02 2011
STATUS
approved