



2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Often equal to A074292 (at the beginning), but not always (see comments in A074292). First differences between the two sequences are at n = 47, 48, 56, 57, 128, 129, 137, 139, 147, 148,176, 177,... (see A248345 = A156257  A074292).  JeanChristophe Hervé, Oct 11 2014
As in the Kolakoski sequence, runs in this sequence are of length 1 or 2: a run XX in this sequence implies YXXYX in OK for the first X, and this cannot be continued by a single Y (because XYXYX is not possible), thus we have YXXYXXY, which can be continued by YXXYXXYY or by YXXYXXYXYY, but not by YXXYXXYXX (because this would imply an impossible 21212 in OK). However, words of the form YXYXY appear in this sequence, but they don't in A000002.  JeanChristophe Hervé, Oct 12 2014
Applying Lenormand's "raboter" transformation (see A318921) to A000002 leads to this sequence.  Rémy Sigrist, Nov 11 2020


LINKS

JeanChristophe Hervé, Table of n, a(n) for n = 1..5000


FORMULA

a(n) = A000002(A078649(n)) = A000002(A078649(n)+1).
Strictly positive terms of (A000002(n)1)*(mod(n1, 2)+1).  JeanChristophe Hervé, Oct 11 2014
Strictly positive terms of (1abs(A000002(n+1)A000002(n)))*A000002(n).  JeanChristophe Hervé, Oct 11 2014


EXAMPLE

Kolakoski sequence begins (1),(2,2),(1,1),(2),(1),(2,2),(1),(2,2), so this one begins 2,1,2,2.


MAPLE

A156257 := proc(n)
A000002(A078649(n)) ;
end proc:
seq(A156257(n), n=1..50) ; # R. J. Mathar, Nov 15 2014


MATHEMATICA

OK = {1, 2, 2}; Do[OK = Join[OK, {1+Mod[n1, 2]}], {n, 3, 1000}, {OK[[n]]}]; Select[Split[OK], Length[#] == 2&][[All, 1]] (* JeanFrançois Alcover, Nov 13 2014 *)


CROSSREFS

Cf. A000002, A074292, A318921.
Sequence in context: A296299 A109494 A074292 * A097867 A075344 A144083
Adjacent sequences: A156254 A156255 A156256 * A156258 A156259 A156260


KEYWORD

nonn


AUTHOR

Benoit Cloitre, Feb 07 2009


EXTENSIONS

Definition revised by JeanChristophe Hervé, Oct 11 2014


STATUS

approved



