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”).

A050043
a(n) = 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) = 2, and a(3) = 1.
11
1, 2, 1, 3, 6, 8, 11, 19, 38, 40, 43, 51, 70, 110, 161, 271, 542, 544, 547, 555, 574, 614, 665, 775, 1046, 1590, 2145, 2759, 3534, 5124, 7883, 13007, 26014, 26016, 26019, 26027, 26046, 26086, 26137, 26247, 26518, 27062, 27617
OFFSET
1,2
LINKS
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 2, 1}, Flatten@Table[2 k, {n, 5}, {k, 2^n}]] (* Ivan Neretin, Sep 06 2015 *)
PROG
(PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 1; for(n=4, nn, va[n] = va[n-1] + va[2*(n - 1 - 2^logint(n-2, 2))]); va; } \\ Petros Hadjicostas, May 15 2020
CROSSREFS
Cf. A050027, A050031, A050035, A050039, A050047, A050051, A050055, A050059, A050063, A050067, A050071 (similar, but with different initial conditions).
Sequence in context: A021472 A258047 A053225 * A113396 A294284 A295678
KEYWORD
nonn
EXTENSIONS
Name edited by Petros Hadjicostas, May 15 2020
STATUS
approved