cp's OEIS Frontend

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.

A049949 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) = 1, a(2) = 2, and a(3) = 1.

This page as a plain text file.
%I A049949 #12 Nov 12 2019 11:15:54
%S A049949 1,2,1,6,11,27,49,99,197,492,934,1846,3676,7347,14689,29379,58757,
%T A049949 146892,279094,550846,1098021,2194212,4387512,8774582,17548869,
%U A049949 35097640,70195230,140390438,280780860,561561715,1123123425,2246246851
%N A049949 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) = 1, a(2) = 2, and a(3) = 1.
%p A049949 s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
%p A049949 a := proc(n) option remember;
%p A049949 `if`(n < 4, [1, 2, 1][n], s(n - 1) + a(2^ceil(log[2](n - 1)) + 2 - n)):
%p A049949 end proc:
%p A049949 seq(a(n), n = 1..34); # _Petros Hadjicostas_, Nov 12 2019
%Y A049949 Cf. A006257, A049933, A049937, A049945.
%K A049949 nonn
%O A049949 1,2
%A A049949 _Clark Kimberling_
%E A049949 Name edited by _Petros Hadjicostas_, Nov 12 2019