|
|
A049955
|
|
a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1 and a(2) = a(3) = 2.
|
|
3
|
|
|
1, 2, 2, 7, 19, 33, 71, 168, 471, 776, 1557, 3140, 6415, 13438, 29240, 68778, 192896, 317016, 634037, 1268100, 2536335, 5073278, 10148920, 20308138, 40671616, 81591470, 164134024, 332073226, 679381312, 1420045956, 3090573668
(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, 2][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)); end proc:
|
|
CROSSREFS
|
Cf. A049906 (similar, but with minus a(m/2)), A049907 (similar, but with minus a(m)), A049954 (similar, but with plus a(m/2)).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|