OFFSET
0,6
COMMENTS
LINKS
Altug Alkan, Table of n, a(n) for n = 0..10240
Altug Alkan, A scatterplot of a(n) for n <= 5*2^13
FORMULA
G.f. g(x) satisfies g(x) + 2*g(x^2)*(1+x+x^2) = x + x^2 + x^3 + x^4 + 2*x^5. - Robert Israel, Aug 20 2018
MAPLE
A[0]:= 0: A[1]:= 1:
for n from 1 to 50 do
A[2*n]:= A[2*n-1]-2*A[n];
A[2*n+1]:= n - 2*A[n]
od:
seq(A[i], i=0..101); # Robert Israel, Aug 20 2018
PROG
(PARI) a(n)=if(n<=1, n, if(n%2==0, a(n-1)-2*a(n/2), (n-1)/2-2*a((n-1)/2)));
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 19 2018
STATUS
approved