A156257 Digit of runs of length 2 in the Kolakoski sequence A000002: a(n) = A000002(A078649(n)).
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
Offset: 1
Keywords
Examples
Kolakoski sequence begins (1),(2,2),(1,1),(2),(1),(2,2),(1),(2,2), so this one begins 2,1,2,2.
Links
- Jean-Christophe Hervé, Table of n, a(n) for n = 1..5000
Programs
-
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[n-1, 2]}], {n, 3, 1000}, {OK[[n]]}]; Select[Split[OK], Length[#] == 2&][[All, 1]] (* Jean-François Alcover, Nov 13 2014 *)
Formula
Strictly positive terms of (A000002(n)-1)*(mod(n-1, 2)+1). - Jean-Christophe Hervé, Oct 11 2014
Strictly positive terms of (1-abs(A000002(n+1)-A000002(n)))*A000002(n). - Jean-Christophe Hervé, Oct 11 2014
Extensions
Definition revised by Jean-Christophe Hervé, Oct 11 2014
Comments