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 A049970 #29 May 06 2022 13:12:16 %S A049970 1,3,2,7,16,30,62,123,251,496,994,1987,3979,7967,15948,31928,63917, %T A049970 127712,255426,510851,1021707,2043423,4086860,8173752,16347565, %U A049970 32695258,65390761,130782020,261565033,523132058,1046268104,2092544189 %N A049970 a(n) = a(1) + a(2) + ... + 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) = 3, and a(3) = 2. %F A049970 a(n) ~ c * 2^n, where c = 0.487208413167251561410300158795277398357249626073353318217181284278722123325... - _Vaclav Kotesovec_, Apr 26 2020 %t A049970 a[1] = 1; a[2] = 3; a[3] = 2; a[n_] := a[n] = Sum[a[k], {k, 1, n - 1}] + a[n - 1 - 2^Floor[Log[2, n - 2]]]; Table[a[n], {n, 1, 32}] (* _Vaclav Kotesovec_, Apr 26 2020 *) %o A049970 (PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa + va[n - 1 - 2^ceil(-1 + log(n-1)/log(2))]; sa += va[n]; ); va; } \\ _Petros Hadjicostas_, Apr 26 2020 (with nn > 2) %Y A049970 Cf. A049922 (similar, but with minus a(m)), A049923 (similar, but with minus a(2*m)), A049971 (similar, but with plus a(2*m)). %K A049970 nonn %O A049970 1,2 %A A049970 _Clark Kimberling_ %E A049970 Name edited by _Petros Hadjicostas_, Apr 25 2020