login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A049941
a(n) = a(1) + a(2) + ... + a(n-1) + a(m), 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) = a(2) = 1.
0
1, 1, 3, 6, 12, 29, 55, 108, 216, 539, 1025, 2024, 4031, 8056, 16109, 32216, 64432, 161079, 306051, 604049, 1204073, 2406139, 4811279, 9622072, 19243821, 38487534, 76975015, 153950004, 307899991, 615799976, 1231599949, 2463199896, 4926399792, 12315999479, 23400399011
OFFSET
1,3
FORMULA
From Petros Hadjicostas, Oct 06 2019: (Start)
a(n) = a(2 - n + 2^ceiling(log_2(n-1))) + Sum_{i = 1..n-1} a(i) for n >= 3.
a(n) = a(n - 1 - A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 3.
(End)
EXAMPLE
From Petros Hadjicostas, Oct 06 2019: (Start)
a(3) = a(2 - 3 + 2^ceiling(log_2(3-1))) + a(1) + a(2) = a(1) + a(1) + a(2) = 3.
a(4) = a(2 - 4 + 2^ceiling(log_2(4-1))) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 6.
a(5) = a(5 - 1 - A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = a(1) + a(1) + a(2) + a(3) + a(4) = 12.
(End)
MAPLE
a := proc(n) local i; option remember; if n < 3 then return [1, 1][n]; end if; add(a(i), i = 1 .. n - 1) + a(3 - n + Bits:-Iff(n - 2, n - 2)); end proc;
seq(a(n), n = 1 .. 35); # Petros Hadjicostas, Oct 06 2019
CROSSREFS
Cf. A006257.
Sequence in context: A025208 A245774 A369148 * A219634 A252696 A288147
KEYWORD
nonn
EXTENSIONS
More terms from Petros Hadjicostas, Oct 06 2019
STATUS
approved