The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050027 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) = a(2) = a(3) = 1. 12
1, 1, 1, 2, 4, 5, 7, 12, 24, 25, 27, 32, 44, 69, 101, 170, 340, 341, 343, 348, 360, 385, 417, 486, 656, 997, 1345, 1730, 2216, 3213, 4943, 8156, 16312, 16313, 16315, 16320, 16332, 16357, 16389, 16458, 16628, 16969, 17317, 17702 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
MAPLE
a := proc(n) option remember;
`if`(n < 4, [1, 1, 1][n], a(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):
end proc:
seq(a(n), n = 1..40); # Petros Hadjicostas, Nov 18 2019
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 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] = 1; 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 10 2020
CROSSREFS
Sequence in context: A121817 A359337 A116432 * A123643 A328845 A240842
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Nov 18 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 02:27 EDT 2024. Contains 372847 sequences. (Running on oeis4.)