OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Hsien-Kuei Hwang, S. Janson, 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; ACM Transactions on Algorithms, accepted for publication (July, 2017).
FORMULA
G.f. g(x) satisfies g(x) = (x^2+x^3)/(1-x) + (x + 2 + 1/x)*g(x^2). - Robert Israel, Nov 26 2017
MAPLE
f:= proc(n) option remember;
procname(floor(n/2)) + procname(ceil(n/2))+2 end proc:
f(1):= 0: f(2):= 1:
map(f, [$1..200]); # Robert Israel, Nov 26 2017
PROG
(PARI) first(n) = { my(res = vector(n)); res[1] = 0; res[2] = 1; for(i = 3, n, res[i] = res[floor(i/2)] + res[ceil(i/2)] + 2); res; } \\ Iain Fox, Nov 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 26 2017
STATUS
approved