OFFSET
0,3
COMMENTS
LINKS
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi 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, Svante Janson, Tsung-Hsi 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.
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
FORMULA
G.f.: (1/(1-x))*Sum{k=0..infinity, x^(2^k)/((1-x)*(1-x^(2^k)))}-x^2/(1-x)^3.
a(n) = Sum_{k=1..n} Sum_{j=0..n} floor(k/2^j) - binomial(n,2).
a(n) = A122247(n)-binomial(n,2).
PROG
(PARI) a(n) = sum(k=1, n, sum(j=0, n, k\2^j)) - binomial(n, 2); \\ Michel Marcus, Mar 09 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Aug 27 2006
STATUS
approved