OFFSET
1
LINKS
A. Aksenov, The Newman phenomenon and Lucas sequence, arXiv:1108.5352, chapter 6.
EXAMPLE
a(7) = -1 because 7 is 21 (has one 2s) in base 3, and (-1)^1 = -1.
a(8) = 1 because 8 is 22 (has two 2s) in base 3, and (-1)^2 = 1.
MAPLE
MATHEMATICA
Table[(-1)^DigitCount[n, 3, 2], {n, 90}] (* Alonso del Arte, Sep 08 2012 *)
CROSSREFS
KEYWORD
sign,easy,base
AUTHOR
R. J. Mathar, Sep 08 2012
STATUS
approved