|
|
A049948
|
|
a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1, a(2) = 2, and a(3) = 1.
|
|
0
|
|
|
1, 2, 1, 5, 10, 20, 40, 89, 208, 377, 754, 1517, 3064, 6296, 13138, 28586, 67246, 121355, 242710, 485429, 970888, 1941944, 3884434, 7771178, 15552430, 31158968, 62493400, 125714978, 254343502, 520355000, 1087650970, 2367152042
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MAPLE
|
s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
a := proc(n) option remember;
`if`(n < 4, [1, 2, 1][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 3)):
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|