|
|
A049972
|
|
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 and a(2) = a(3) = 3.
|
|
0
|
|
|
1, 3, 3, 8, 18, 34, 70, 155, 362, 655, 1312, 2639, 5330, 10952, 22854, 49726, 116976, 211099, 422200, 844415, 1688882, 3378056, 6757062, 13518142, 27053808, 54201738, 108708700, 218684082, 442436344, 905169434, 1891993760
(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, 3, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 3)):
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|