OFFSET
0,4
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
J.-P. Allouche and Jeffrey Shallit, The Ring of k-regular Sequences, II
J.-P. Allouche and Jeffrey Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.
Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016.
Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47.
FORMULA
a(0)=0, a(2n+1) = -a(n)-a(n+1)+n^2+n, a(2n+1) = -2a(n)+n^2+2n+1. - Ralf Stephan, Oct 16 2003
MATHEMATICA
Join[{0}, Nest[Accumulate, (-1)^IntegerExponent[Range[100], 2], 2]] (* Paolo Xausa, Jun 04 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 01 2003
EXTENSIONS
More terms from Benoit Cloitre, Oct 04 2003
STATUS
approved
