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.

A049913 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) = 4.

This page as a plain text file.
%I A049913 #10 Nov 13 2019 01:38:27
%S A049913 1,2,4,5,11,18,37,76,153,231,501,1021,2049,4104,8209,16420,32841,
%T A049913 49263,106737,217579,437213,875454,1751428,3503126,7006330,14012737,
%U A049913 28025513,56051045,112102097,224204200,448408401,896816804,1793633609
%N A049913 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) = 4.
%p A049913 s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
%p A049913 a := proc(n) option remember;
%p A049913 `if`(n < 4, [1,2,4][n], s(n - 1) - a(2^ceil(log[2](n - 1)) + 2 - n)):
%p A049913 end proc:
%p A049913 seq(a(n), n = 1..34); # _Petros Hadjicostas_, Nov 12 2019
%K A049913 nonn
%O A049913 1,2
%A A049913 _Clark Kimberling_
%E A049913 Name edited by _Petros Hadjicostas_, Nov 12 2019