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.

A050029 a(n) = a(n-1) + a(m) for n >= 4, 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) = a(2) = 1 and a(3) = 2.

This page as a plain text file.
%I A050029 #18 Nov 08 2019 09:44:35
%S A050029 1,1,2,3,4,7,9,10,11,21,30,37,41,44,46,47,48,95,141,185,226,263,293,
%T A050029 314,325,335,344,351,355,358,360,361,362,723,1083,1441,1796,2147,2491,
%U A050029 2826,3151,3465,3758,4021,4247,4432,4573,4668,4716
%N A050029 a(n) = a(n-1) + a(m) for n >= 4, 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) = a(2) = 1 and a(3) = 2.
%H A050029 Ivan Neretin, <a href="/A050029/b050029.txt">Table of n, a(n) for n = 1..8193</a>
%F A050029 From _Petros Hadjicostas_, Nov 08 2019: (Start)
%F A050029 a(n) = a(2^ceiling(log_2(n-1)) + 2 - n) + a(n-1) for n >= 4.
%F A050029 a(n) = a(n - 1 - A006257(n-2)) + a(n-1) for n >= 4. (End)
%p A050029 a := proc(n) option remember;
%p A050029 `if`(n < 4, [1, 1, 2][n], a(n - 1) + a(Bits:-Iff((n - 2) $ 2) + 3 - n));
%p A050029 end proc;
%p A050029 seq(a(n), n = 1 .. 50); # _Petros Hadjicostas_, Nov 07 2019
%t A050029 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 2}, Flatten@Table[k, {n, 5}, {k, 2^n, 1, -1}]] (* _Ivan Neretin_, Sep 06 2015 *)
%Y A050029 Cf. A006257, A050025 (similar, but with different initial conditions).
%K A050029 nonn
%O A050029 1,3
%A A050029 _Clark Kimberling_
%E A050029 Name edited by _Petros Hadjicostas_, Nov 07 2019