login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A083905
G.f.: 1/(1-x) * sum(k>=0, (-1)^k*x^2^(k+1)/(1+x^2^k)).
2
0, 1, 0, 0, -1, 1, 0, 1, 0, 2, 1, 0, -1, 1, 0, 0, -1, 1, 0, -1, -2, 0, -1, 1, 0, 2, 1, 0, -1, 1, 0, 1, 0, 2, 1, 0, -1, 1, 0, 2, 1, 3, 2, 1, 0, 2, 1, 0, -1, 1, 0, -1, -2, 0, -1, 1, 0, 2, 1, 0, -1, 1, 0, 0, -1, 1, 0, -1, -2, 0, -1, 1, 0, 2, 1, 0, -1, 1, 0, -1, -2, 0, -1, -2, -3, -1
OFFSET
1,10
COMMENTS
For all n, a(3*A006288(n)) = 0 as proved in Russian forum dxdy.ru - see link.
FORMULA
a(1)=0, a(2n) = -a(n)+1, a(2n+1) = -a(n).
a(n) = A030300(n) - A065359(n).
PROG
(PARI) for(n=1, 100, l=ceil(log(n)/log(2)); t=polcoeff(1/(1-x)*sum(k=0, l, (-1)^k*(x^2^(k+1))/(1+x^2^k)) + O(x^(n+1)), n); print1(t", "))
(PARI) a(n) = sum(i=0, logint(n, 2)-1, if(!bittest(n, i), (-1)^i)); \\ Kevin Ryde, May 24 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Jun 18 2003
STATUS
approved