This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A179854 #20 Sep 30 2020 09:05:55 %S A179854 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 A179854 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 A179854 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 A179854 Number of 0's (mod 3) in the binary expansion of n. %C A179854 A ternary analog of A059448. %C A179854 Offset is 1 to avoid the ambiguity at n=0. %C A179854 Inspired by Chapter 1 of Allouche and Shallit. %C A179854 From _Michel Dekking_, Sep 30 2020: (Start) %C A179854 Let tau be the "twisted" 3-symbol length 2 Thue-Morse morphism given by %C A179854 tau(0) = 10, tau(1) = 21, tau (2) = 02. %C A179854 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 A179854 mu(0) = 01, mu(1) = 12, mu(2) = 20. %C A179854 The unique fixed point of mu is the sequence A071858 = 01121220... %C A179854 We have mu^3 = tau^3. %C A179854 The sequence a = (a(n)) satisfies %C A179854 a = 0 tau(a). %C A179854 This follows directly from the recursion formulas %C A179854 a(2n) = a(n) + 1 mod 3, a(2n+1) = a(n). %C A179854 (End) %D A179854 J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003. %F A179854 a(2n) = a(n) + 1 mod 3, a(2n+1) = a(n). - _Michel Dekking_, Sep 30 2020 %p A179854 s1:=[]; %p A179854 for n from 0 to 200 do %p A179854 t1:=convert(n,base,2); t2:=subs(1=NULL,t1); s1:=[op(s1),nops(t2) mod 3]; od: %p A179854 s1; %Y A179854 Cf. A059448. Related to A071858. %K A179854 nonn %O A179854 1,4 %A A179854 _N. J. A. Sloane_, Jan 11 2011