OFFSET
1,3
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10001
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 39-40.
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
FORMULA
a(2^n-1) = A000217(2^n-1) for all n.
a(n) = Sum_{j=0..n} XORnos(j, floor(j/2)).
a(n) = b(n-1), with b(2n) = 2*(b(n) + b(n-1) + ceiling(n/2)), b(2n+1) = 4*b(n) + n + 1. - Ralf Stephan, Sep 13 2003
MATHEMATICA
Accumulate[Table[BitXor[n, Floor[n/2]], {n, 0, 100}]] (* Vladimir Joseph Stephan Orlovsky, Jul 19 2011 *)
PROG
(PARI) a(n) = sum(k=0, n, bitxor(k, k>>1)); \\ Michel Marcus, Oct 02 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Antti Karttunen, Jul 14 1999
STATUS
approved