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 A050042 #21 May 15 2020 10:24:58 %S A050042 1,2,1,2,4,5,7,8,10,11,13,14,16,20,25,32,40,41,43,44,46,50,55,62,70, %T A050042 80,91,104,118,134,154,179,211,212,214,215,217,221,226,233,241,251, %U A050042 262,275,289,305,325,350,382 %N A050042 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) = 1. %H A050042 Ivan Neretin, <a href="/A050042/b050042.txt">Table of n, a(n) for n = 1..8193</a> %t A050042 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 2, 1}, Flatten@Table[k, {n, 5}, {k, 2^n}]] (* _Ivan Neretin_, Sep 08 2015 *) %o A050042 (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 1; for(n=4, nn, va[n] = va[n-1] + va[n - 1 - 2^logint(n-2, 2)]); va; } \\ _Petros Hadjicostas_, May 15 2020 %Y A050042 Cf. similar sequences, with different initial conditions, listed in A050034. %K A050042 nonn %O A050042 1,2 %A A050042 _Clark Kimberling_ %E A050042 Name edited by _Petros Hadjicostas_, May 15 2020