%I #29 Dec 20 2024 19:12:19
%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 Jean-Marc Fedou and Gabriele 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).
%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.
%F a(n) = A156253(n+1) - A156253(n). - _Alan Michael Gómez Calderón_, Dec 20 2024
%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 *)
%Y Cf. A000002, A054354, A156251, A156253.
%K nonn
%O 1,1
%A _Benoit Cloitre_, Feb 14 2009