Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Nov 16 2019 03:29:09
%S 1,1,3,4,6,14,26,49,78,181,360,717,1414,2776,5270,9486,15116,35501,
%T 71000,141997,283974,567896,1135510,2269966,4536076,9062306,18068728,
%U 35924482,70997428,138594290,263655928,474383156,756107812
%N a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 3 - 2^(p+1) 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) = 3.
%p s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
%p a := proc(n) option remember;
%p `if`(n < 4, [1, 1, 3][n], s(n - 1) - a(-2^ceil(log[2](n - 1)) + 2*n - 3)):
%p end proc:
%p seq(a(n), n = 1..40); # _Petros Hadjicostas_, Nov 15 2019
%K nonn
%O 1,3
%A _Clark Kimberling_
%E Name edited by _Petros Hadjicostas_, Nov 15 2019