login
A049953
a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2^(p+1) + 2 - n 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.
0
1, 2, 2, 7, 13, 32, 59, 118, 235, 587, 1115, 2203, 4387, 8768, 17531, 35062, 70123, 175307, 333083, 657403, 1310425, 2618666, 5236244, 10471960, 20943568, 41887019, 83773979, 167547931, 335095843, 670191680, 1340383355, 2680766710, 5361533419, 13403833547, 25467283739, 50264375803
OFFSET
1,2
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)):
end proc:
seq(a(n), n = 1..34); # Petros Hadjicostas, Nov 13 2019
CROSSREFS
Sequence in context: A366584 A019144 A362318 * A364313 A156435 A344048
KEYWORD
nonn
EXTENSIONS
Name edited by and more terms from Petros Hadjicostas, Nov 13 2019
STATUS
approved