cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A050049 #38 Nov 14 2019 10:43:28
%S A050049 1,2,3,5,6,11,14,16,17,33,47,58,64,69,72,74,75,149,221,290,354,412,
%T A050049 459,492,509,525,539,550,556,561,564,566,567,1133,1697,2258,2814,3364,
%U A050049 3903,4428,4937,5429,5888,6300,6654,6944,7165,7314
%N 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.
%C A050049 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
%C A050049 From _Petros Hadjicostas_, Nov 13 2019: (Start)
%C A050049 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.
%C A050049 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)
%H A050049 Ivan Neretin, <a href="/A050049/b050049.txt">Table of n, a(n) for n = 1..8193</a>
%e A050049 From _Petros Hadjicostas_, Nov 13 2019: (Start)
%e A050049 We explain _Amarnath Murthy_'s process (see the Comments above).
%e A050049 a(3) = a(2) + a(1) = 3. [Now a(3) is the last term available.]
%e A050049 a(4) = a(3) + a(2) = 5.
%e A050049 a(5) = a(3) + a(2) + a(1) = 6. [Now a(5) is the last term available.]
%e A050049 a(6) = a(5) + a(4) = 11.
%e A050049 a(7) = a(5) + a(4) + a(3) = 14.
%e A050049 a(8) = a(5) + a(4) + a(3) + a(2) = 16.
%e A050049 a(9) = a(5) + ... + a(1) = 17. [Now a(9) is the last term available.]
%e A050049 a(10) = a(9) + a(8) = 33.
%e A050049 a(11) = a(9) + a(8) + a(7) = 47.
%e A050049 ...
%e A050049 a(17) = a(9) + a(8) + ... + a(1) = 75. [Now a(17) is the last term available.]
%e A050049 a(18) = a(17) + a(16) = 149. (End)
%p A050049 a := proc(n) option remember;
%p A050049 `if`(n < 3, [1, 2][n], a(n - 1) + a(2^ceil(log[2](n - 1)) + 2 - n)); end proc;
%p A050049 seq(a(n), n = 1..50); # _Petros Hadjicostas_, Nov 13 2019
%t A050049 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 *)
%Y A050049 Cf. A000051 (index of "available" terms as described above), A110428 (a multiplicative version of this sequence).
%Y A050049 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).
%K A050049 nonn
%O A050049 1,2
%A A050049 _Clark Kimberling_
%E A050049 Name edited by _Petros Hadjicostas_, Nov 13 2019