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!)
A050049 a(n) = a(n-1) + a(m) for n >= 3, 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) = 1 and a(2) = 2. 12
1, 2, 3, 5, 6, 11, 14, 16, 17, 33, 47, 58, 64, 69, 72, 74, 75, 149, 221, 290, 354, 412, 459, 492, 509, 525, 539, 550, 556, 561, 564, 566, 567, 1133, 1697, 2258, 2814, 3364, 3903, 4428, 4937, 5429, 5888, 6300, 6654, 6944, 7165, 7314 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(1) = 1 and a(2) = 2; subsequent terms are generated like this: if a(s) is the last term available, say a(2), then a(s+1) = a(s) + a(s-1), a(s+2) = a(s) + a(s-1) + a(s-2), ..., a(2*s-1) = a(s) + a(s-1) + a(s-2) + ... + a(2) + a(1), a(2*s) = a(2*s-1) + a(2*s-2), and so on. - Amarnath Murthy, Aug 01 2005
From Petros Hadjicostas, Nov 13 2019: (Start)
We explain further the process introduced by Amarnath Murthy above. The terms a(s) that are the "last term[s] available" are those that correspond to s = A000051(k) = 2^k + 1 for k >= 0. Thus, they are the terms a(2), a(3), a(5), a(9), a(17), a(33), and so on. See the example below.
In the Mathematica program below, the author of the program starts with a(1) = 1, a(2) = 2, and a(3) = 3, but that is not necessary. We may start with a(1) = 1 and a(2) = 2 and still get the same sequence. (End)
LINKS
EXAMPLE
From Petros Hadjicostas, Nov 13 2019: (Start)
We explain Amarnath Murthy's process (see the Comments above).
a(3) = a(2) + a(1) = 3. [Now a(3) is the last term available.]
a(4) = a(3) + a(2) = 5.
a(5) = a(3) + a(2) + a(1) = 6. [Now a(5) is the last term available.]
a(6) = a(5) + a(4) = 11.
a(7) = a(5) + a(4) + a(3) = 14.
a(8) = a(5) + a(4) + a(3) + a(2) = 16.
a(9) = a(5) + ... + a(1) = 17. [Now a(9) is the last term available.]
a(10) = a(9) + a(8) = 33.
a(11) = a(9) + a(8) + a(7) = 47.
...
a(17) = a(9) + a(8) + ... + a(1) = 75. [Now a(17) is the last term available.]
a(18) = a(17) + a(16) = 149. (End)
MAPLE
a := proc(n) option remember;
`if`(n < 3, [1, 2][n], a(n - 1) + a(2^ceil(log[2](n - 1)) + 2 - n)); end proc;
seq(a(n), n = 1..50); # Petros Hadjicostas, Nov 13 2019
MATHEMATICA
Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 2, 3}, Flatten@Table[k, {n, 5}, {k, 2^n, 1, -1}]] (* Ivan Neretin, Sep 07 2015 *)
CROSSREFS
Cf. A000051 (index of "available" terms as described above), A110428 (a multiplicative version of this sequence).
Cf. similar sequences with different initial conditions: A050025 (1,1,1), A050029 (1,1,2), A050033 (1,1,3), A050037 (1,1,4), A050041 (1,2,1), A050045 (1,2,2), A050053 (1,2,4), A050057 (1,3,1), A050061 (1,3,2), A050065 (1,3,3), A050069 (1,3,4).
Sequence in context: A104012 A164830 A039037 * A132581 A238542 A184640
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Nov 13 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 July 13 02:50 EDT 2024. Contains 374265 sequences. (Running on oeis4.)