|
|
A049954
|
|
a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = n - 1 - 2^p 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, 6, 13, 25, 51, 102, 208, 411, 823, 1646, 3296, 6599, 13210, 26446, 52943, 105785, 211571, 423142, 846288, 1692583, 3385178, 6770382, 13540815, 27081736, 54163675, 108327762, 216656347, 433314344, 866631991, 1733270593
(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) - 1) + n - 1)); end proc:
|
|
CROSSREFS
|
Cf. A049906 (similar, but with minus a(m)), A049907 (similar, but with minus a(2*m)), A049955 (similar, but with plus a(2*m)).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|