OFFSET
0,5
LINKS
J.-P. Allouche and J. Shallit, The Ring of k-regular Sequences, II
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.
Ralf Stephan, Some divide-and-conquer sequences ...
Ralf Stephan, Table of generating functions
FORMULA
a(n) = (n+2*A065359(n))/3; a(n) is asymptotic to n/3. - Benoit Cloitre, Oct 04 2003
From Ralf Stephan, Oct 17 2003: (Start)
a(0)=0, a(2n) = -a(n) + n, a(2n+1) = -a(n) + n + 1.
G.f.: (1/2) * 1/(1-x) * Sum_{k>=0} (-1)^k*t/(1-t^2) where t=x^2^k. (End)
a(0)=0 then a(n) = ceiling(n/2)-a(n-ceiling(n/2)). - Benoit Cloitre, May 03 2004
PROG
(PARI) a(n)=if(n<1, 0, ceil(n/2)-a(n-ceil(n/2)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 01 2003
EXTENSIONS
More terms from John W. Layman and Robert G. Wilson v, Oct 02 2003
STATUS
approved