%I #14 Feb 11 2019 01:27:07
%S 0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,1,1,1,1,1,1,1,0,0,
%T 0,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,
%U 0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1
%N a(n) = floor(S2(n)/3) mod 2, where S2(n) denotes the binary weight of n.
%C A generalized Thue-Morse sequence.
%H Nathaniel Johnston, <a href="/A135133/b135133.txt">Table of n, a(n) for n = 0..10000</a>
%H Ricardo Astudillo, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL6/Astudillo/astudillo12.html">On a class of Thue-Morse type sequences</a>, Journal of Integer Sequences, Vol. 6 (2003), Article 03.4.2.
%p S2 := proc(n) return add(d, d=convert(n,base,2)): end: A135133 := proc(n) return floor(S2(n)/3) mod 2: end: seq(A135133(n),n=0..104); # _Nathaniel Johnston_, May 06 2011
%t Table[Mod[Floor[(Plus @@ IntegerDigits[n, 2])/3], 2], {n, 0, 50}] (* _G. C. Greubel_, Sep 28 2016 *)
%Y Cf. A000120, A010060.
%K nonn,base,easy
%O 0,1
%A _Ctibor O. Zizka_, Feb 12 2008