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.
%I A050054 #15 Nov 19 2019 05:51:31 %S A050054 1,2,4,5,7,8,10,14,19,20,22,26,31,38,46,56,70,71,73,77,82,89,97,107, %T A050054 121,140,160,182,208,239,277,323,379,380,382,386,391,398,406,416,430, %U A050054 449,469,491,517,548,586,632 %N A050054 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) = 1, a(2) = 2, and a(3) = 4. %H A050054 Ivan Neretin, <a href="/A050054/b050054.txt">Table of n, a(n) for n = 1..8193</a> %p A050054 a := proc(n) option remember; %p A050054 `if`(n < 4, [1, 2, 4][n], a(n - 1) + a(-2^ceil(-1+log[2](n - 1)) + n - 1)): %p A050054 end proc: %p A050054 seq(a(n), n = 1..40); # _Petros Hadjicostas_, Nov 18 2019 %t A050054 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 2, 4}, Flatten@Table[k, {n, 5}, {k, 2^n}]] (* _Ivan Neretin_, Sep 08 2015 *) %Y A050054 Cf. similar sequences with different initial conditions listed in A050034. %K A050054 nonn %O A050054 1,2 %A A050054 _Clark Kimberling_ %E A050054 Name edited by _Petros Hadjicostas_, Nov 18 2019