login
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
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, 3, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 3)):
end proc:
seq(a(n), n = 1..40); # Petros Hadjicostas, Nov 15 2019
CROSSREFS
Sequence in context: A328976 A059197 A049974 * A027376 A190659 A202536
KEYWORD
nonn
EXTENSIONS
Name edited by Petros Hadjicostas, Nov 15 2019
STATUS
approved