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 A049897 #14 Nov 15 2019 07:48:40 %S A049897 1,1,4,5,10,16,33,69,138,208,452,921,1848,3701,7403,14809,29618,44428, %T A049897 96262,196226,394305,789537,1579543,3159330,6318730,12637529,25275094, %U A049897 50550205,101100416,202200837,404401675,808803353,1617606706 %N A049897 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2^(p+1) + 2 - n 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) = 4. %p A049897 s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc: %p A049897 a := proc(n) option remember; %p A049897 `if`(n < 4, [1, 1, 4][n], s(n - 1) - a(2^ceil(log[2](n - 1)) + 2 - n)): %p A049897 end proc: %p A049897 seq(a(n), n = 1..40); # _Petros Hadjicostas_, Nov 14 2019 %Y A049897 Cf. A049885, A049893, A049913, A049917, A049921. %K A049897 nonn %O A049897 1,3 %A A049897 _Clark Kimberling_ %E A049897 Name edited by _Petros Hadjicostas_, Nov 14 2019