|
|
A022905
|
|
a(n) = M(n) + m(n) for n >= 2, where M(n) = max{ a(i) + a(n-i): i = 1..n-1 }, m(n) = min{ a(i) + a(n-i): i = 1..n-1 }.
|
|
3
|
|
|
1, 4, 10, 19, 34, 55, 85, 124, 178, 247, 337, 448, 589, 760, 970, 1219, 1522, 1879, 2305, 2800, 3385, 4060, 4846, 5743, 6781, 7960, 9310, 10831, 12562, 14503, 16693, 19132, 21874, 24919, 28321, 32080, 36265, 40876, 45982, 51583, 57769
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + 1 + a(floor(n/2)) + a(ceiling(n/2))) for n>1, a(1) = 1. - Alois P. Heinz, Sep 17 2013
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n=1, 1,
a(n-1)+1+a(floor(n/2))+a(ceil(n/2)))
end:
|
|
MATHEMATICA
|
|
|
PROG
|
(Python)
from itertools import islice
from collections import deque
def A022905_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield 1
while True:
a += b
aqueue.append(a)
if f:
yield (3*a-1)//2
b = aqueue.popleft()
f = not f
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|