%I #20 Sep 30 2020 09:05:55
%S 0,1,0,2,1,1,0,0,2,2,1,2,1,1,0,1,0,0,2,0,2,2,1,0,2,2,1,2,1,1,0,2,1,1,
%T 0,1,0,0,2,1,0,0,2,0,2,2,1,1,0,0,2,0,2,2,1,0,2,2,1,2,1,1,0,0,2,2,1,2,
%U 1,1,0,2,1,1,0,1,0,0,2,2,1,1,0,1,0,0,2,1,0,0,2,0,2,2,1,2,1,1,0,1,0,0,2,1,0,0,2,0,2,2,1,1,0,0,2,0,2,2,1,0
%N Number of 0's (mod 3) in the binary expansion of n.
%C A ternary analog of A059448.
%C Offset is 1 to avoid the ambiguity at n=0.
%C Inspired by Chapter 1 of Allouche and Shallit.
%C From _Michel Dekking_, Sep 30 2020: (Start)
%C Let tau be the "twisted" 3-symbol length 2 Thue-Morse morphism given by
%C tau(0) = 10, tau(1) = 21, tau (2) = 02.
%C The name of tau is in analogy with the comments from A297531. The "ordinary" 3-symbol length 2 Thue-Morse morphism is the morphism mu given by
%C mu(0) = 01, mu(1) = 12, mu(2) = 20.
%C The unique fixed point of mu is the sequence A071858 = 01121220...
%C We have mu^3 = tau^3.
%C The sequence a = (a(n)) satisfies
%C a = 0 tau(a).
%C This follows directly from the recursion formulas
%C a(2n) = a(n) + 1 mod 3, a(2n+1) = a(n).
%C (End)
%D J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003.
%F a(2n) = a(n) + 1 mod 3, a(2n+1) = a(n). - _Michel Dekking_, Sep 30 2020
%p s1:=[];
%p for n from 0 to 200 do
%p t1:=convert(n,base,2); t2:=subs(1=NULL,t1); s1:=[op(s1),nops(t2) mod 3]; od:
%p s1;
%Y Cf. A059448. Related to A071858.
%K nonn
%O 1,4
%A _N. J. A. Sloane_, Jan 11 2011
|