A179854 Number of 0's (mod 3) in the binary expansion of n.
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, 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, 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
Offset: 1
Keywords
References
- J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003.
Programs
-
Maple
s1:=[]; for n from 0 to 200 do t1:=convert(n,base,2); t2:=subs(1=NULL,t1); s1:=[op(s1),nops(t2) mod 3]; od: s1;
Formula
a(2n) = a(n) + 1 mod 3, a(2n+1) = a(n). - Michel Dekking, Sep 30 2020
Comments