login
A081729
Expansion of Sum(k>=0, x^(2^k)) + 1/(1+x). First differences of A007456 (gossip sequence) for n>1.
3
1, 0, 2, -1, 2, -1, 1, -1, 2, -1, 1, -1, 1, -1, 1, -1, 2, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 2, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 2, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1
OFFSET
0,3
COMMENTS
For n>1: a(n) = 2, if n is power of 2; a(n) =- 1, if n odd; a(n) = 1 otherwise.
The absolute values of a(n) for n>=2 equal the q(n) sequence of the Eta triangle A160464. - Johannes W. Meijer, May 24 2009
LINKS
FORMULA
a(n) = A209229(n) + A033999(n). - Reinhard Zumkeller, Apr 03 2014
MATHEMATICA
Join[{1, 0}, Table[Which[IntegerQ[Log2[n]], 2, OddQ[n], -1, True, 1], {n, 2, 90}]] (* Harvey P. Dale, Jan 17 2023 *)
PROG
(Haskell)
a081729 n = a209229 n + a033999(n)
-- Reinhard Zumkeller, Apr 03 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Apr 06 2003
EXTENSIONS
Erroneous formula removed by Antti Karttunen, Sep 14 2017
STATUS
approved