%I #5 Mar 31 2021 04:33:59
%S 0,-1,0,2,0,2,2,0,0,2,2,0,2,0,0,0,0,2,2,0,2,0,0,0,2,0,0,0,0,0,0,0,0,2,
%T 2,0,2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,
%U 2,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0
%N G.f.: Theta^2-Theta, where Theta = Sum_{k>=0} x^(2^k).
%C If we omit the "-x" term and divide by 2, we get the characteristic function of the numbers with binary weight 2 (A018900, A151774).
%t w[n_] := IntegerDigits[n, 2] // Total;
%t a[n_] := If[n == 1, -1, 2 Boole[w[n] == 2]];
%t a /@ Range[0, 104] (* _Jean-François Alcover_, Mar 31 2021 *)
%Y Cf. A000079, A073267, A151759, A151760, A151761, A151762, A018900, A151774.
%K sign
%O 0,4
%A _N. J. A. Sloane_, Jun 22 2009
|