login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A294456 a(1)=0, a(2)=1; thereafter a(n) = a(floor(n/2)) + a(ceiling(n/2)) + 2. 2
0, 1, 3, 4, 6, 8, 9, 10, 12, 14, 16, 18, 19, 20, 21, 22, 24, 26, 28, 30, 32, 34, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
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
Sequence in context: A183867 A182829 A112800 * A062969 A175035 A025063
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 26 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)