login
A049967
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, a(2) = 3, and a(3) = 1.
3
1, 3, 1, 8, 21, 37, 79, 187, 524, 864, 1733, 3495, 7140, 14957, 32545, 76552, 214699, 352849, 705703, 1411435, 2823020, 5646717, 11296065, 22603592, 45268779, 90813855, 182686296, 369607874, 756172623, 1580555509, 3439905037
OFFSET
1,2
PROG
(PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 1; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa + va[2*(n - 1 - 2^logint(n-2, 2))]; sa += va[n]; ); va; } \\ Petros Hadjicostas, May 03 2020
CROSSREFS
Cf. A049918 (similar, but with minus a(m/2)), A049919 (similar, but with minus a(m)), A049966 (similar, but with plus a(m/2)).
Sequence in context: A075847 A193602 A221125 * A221780 A221723 A082171
KEYWORD
nonn
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 24 2020
STATUS
approved