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 A050039 #18 May 15 2020 10:24:53 %S A050039 1,1,4,5,10,11,16,27,54,55,60,71,98,153,224,377,754,755,760,771,798, %T A050039 853,924,1077,1454,2209,2980,3833,4910,7119,10952,18071,36142,36143, %U A050039 36148,36159,36186,36241,36312,36465,36842,37597,38368 %N A050039 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(2) = 4. %H A050039 Ivan Neretin, <a href="/A050039/b050039.txt">Table of n, a(n) for n = 1..8193</a> %t A050039 Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 1, 4}, Flatten@Table[2 k, {n, 5}, {k, 2^n}]] (* _Ivan Neretin_, Sep 06 2015 *) %o A050039 (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 4; for(n=4, nn, va[n] = va[n-1] + va[2*(n - 1 - 2^logint(n-2, 2))]); va; } \\ _Petros Hadjicostas_, May 15 2020 %Y A050039 Cf. A050027, A050031, A050035, A050043, A050047, A050051, A050055, A050059, A050063, A050067, A050071 (similar, but with different initial conditions). %K A050039 nonn %O A050039 1,3 %A A050039 _Clark Kimberling_ %E A050039 Name edited by _Petros Hadjicostas_, May 15 2020