%I #3 Mar 30 2012 18:59:02
%S 0,0,1,0,2,1,2,0,0,2,1,1,1,2,0,0,1,0,0,2,1,1,0,1,0,1,1,2,0,0,1,0,2,1,
%T 2,0,1,0,0,2,1,1,0,1,2,0,2,1,2,0,2,1,0,1,1,2,0,0,1,0,2,1,2,0,0,2,1,1,
%U 1,2,0,0,2,1,2,0,1,0,0,2,1,1,0,1,2,0,2,1,1,2,0,0,0,2,1,1,1,2,0,0,0
%N A Thue-Morse-Stern sequence.
%C a(2n+1) = a(n).
%F a(n)=mod(-1+sum{k=0..floor(n/2), mod(binomial(n-k, k), 2)}, 3); a(n)=mod(-1+A002487(n+1), 3).
%Y Cf. A010060.
%K easy,nonn
%O 0,5
%A _Paul Barry_, Dec 10 2004