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 A049946 #10 Apr 26 2020 02:20:06 %S A049946 1,1,4,7,14,28,56,115,233,460,920,1843,3689,7385,14784,29596,59251, %T A049946 118388,236776,473555,947113,1894233,3788480,7576988,15154035, %U A049946 30308188,60616603,121233666,242468255,484938356,969880408,1939768215 %N A049946 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) = a(2) = 1 and a(3) = 4. %p A049946 s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc: %p A049946 a := proc(n) option remember; %p A049946 `if`(n < 4, [1, 1, 4][n], s(n - 1) + a(-2^ceil(-1 + log[2](n - 1)) + n - 1)): %p A049946 end proc: %p A049946 seq(a(n), n = 1..40); # _Petros Hadjicostas_, Apr 25 2020 %K A049946 nonn %O A049946 1,3 %A A049946 _Clark Kimberling_ %E A049946 Name edited by _Petros Hadjicostas_, Apr 25 2020