OFFSET
0,4
COMMENTS
MATHEMATICA
w[n_] := IntegerDigits[n, 2] // Total;
a[n_] := If[n == 1, -1, 2 Boole[w[n] == 2]];
a /@ Range[0, 104] (* Jean-François Alcover, Mar 31 2021 *)
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 22 2009
STATUS
approved