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 A050031 #20 May 11 2020 02:29:16 %S A050031 1,1,2,3,6,7,10,17,34,35,38,45,62,97,142,239,478,479,482,489,506,541, %T A050031 586,683,922,1401,1890,2431,3114,4515,6946,11461,22922,22923,22926, %U A050031 22933,22950,22985,23030,23127,23366,23845,24334 %N A050031 a(n) = a(n-1) + a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) 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 A050031 Ivan Neretin, <a href="/A050031/b050031.txt">Table of n, a(n) for n = 1..8193</a> %t A050031 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 2}, Flatten@Table[2 k, {n, 5}, {k, 2^n}]] (* _Ivan Neretin_, Sep 06 2015 *) %o A050031 (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 2; for(n=4, nn, va[n] = va[n-1] + va[2*(n - 1 - 2^logint(n-2, 2))]); va; } \\ _Petros Hadjicostas_, May 10 2020 %Y A050031 Cf. A050027, A050035, A050039, A050043, A050047, A050051, A050055, A050059, A050063, A050067, A050071 (similar, but with different initial conditions). %K A050031 nonn %O A050031 1,3 %A A050031 _Clark Kimberling_ %E A050031 Name edited by _Petros Hadjicostas_, May 10 2020