%I #20 Sep 04 2018 03:36:25
%S 1,0,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,1,1,1,
%T 0,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,1,0,1,1,0,1,0,1,
%U 1,0,1,1,1,0,1,1,1,0,1,0,1,1,0,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,1,1,0,1,1
%N a(n) = abs(A054354(n)).
%C This sequence is the image of the Kolakoski sequence A000002 under the morphism 1->1, 2->01. [_Gabriele Fici_, Aug 12 2013]
%H J.M. Fedou and G. Fici, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL13/Fici/fici.html">Some remarks on differentiable sequences and recursivity</a>, Journal of Integer Sequences 13(3): Article 10.3.2 (2010). [From Jean-Marc Fedou and _Gabriele Fici_, Mar 18 2010]
%F a(n) = (v(n+1) - v(n) + 1)/2 where v(n) = A156253(n) - A156251(n).
%F a(n) = (A000002(n) + A000002(n+1)) mod 2.
%t a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 105}, {i, 1, a2[[n]]}]; a[n_] := Mod[a2[[n]] + a2[[n + 1]], 2]; Table[a[n], {n, 1, 105}] (* _Jean-François Alcover_, Jun 18 2013 *)
%K nonn
%O 1,1
%A _Benoit Cloitre_, Feb 14 2009
|