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!)
A050038 a(n) = a(n-1) + a(m) for n >= 4, where m = n - 1 - 2^p and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = 1 and a(3) = 4. 3
1, 1, 4, 5, 6, 7, 8, 12, 17, 18, 19, 23, 28, 34, 41, 49, 61, 62, 63, 67, 72, 78, 85, 93, 105, 122, 140, 159, 182, 210, 244, 285, 334, 335, 336, 340, 345, 351, 358, 366, 378, 395, 413, 432, 455, 483, 517, 558 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 4}, Flatten@Table[k, {n, 5}, {k, 2^n}]] (* Ivan Neretin, Sep 08 2015 *)
PROG
(PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 4; for(n=4, nn, va[n] = va[n-1] + va[n - 1 - 2^logint(n-2, 2)]); va; } \\ Petros Hadjicostas, May 15 2020
CROSSREFS
Cf. similar sequences with different initial conditions: A050026 (1,1,1), A050030 (1,1,2), A050034 (1,1,3), A050038 (1,1,4), A050042 (1,2,1), A050046 (1,2,2), A050054 (1,2,4), A050058 (1,3,1), A050062 (1,3,2), A050066 (1,3,3), A050070 (1,3,4).
Sequence in context: A073073 A213525 A047567 * A285218 A059709 A344580
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, May 15 2020
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 June 12 10:35 EDT 2024. Contains 373331 sequences. (Running on oeis4.)