login

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”).

a(n) = a(1) + a(2) + ... + a(n-1) + a(m), 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.
0

%I #23 Oct 26 2019 02:15:54

%S 1,1,3,6,12,29,55,108,216,539,1025,2024,4031,8056,16109,32216,64432,

%T 161079,306051,604049,1204073,2406139,4811279,9622072,19243821,

%U 38487534,76975015,153950004,307899991,615799976,1231599949,2463199896,4926399792,12315999479,23400399011

%N a(n) = a(1) + a(2) + ... + a(n-1) + a(m), 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.

%F From _Petros Hadjicostas_, Oct 06 2019: (Start)

%F a(n) = a(2 - n + 2^ceiling(log_2(n-1))) + Sum_{i = 1..n-1} a(i) for n >= 3.

%F a(n) = a(n - 1 - A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 3.

%F (End)

%e From _Petros Hadjicostas_, Oct 06 2019: (Start)

%e a(3) = a(2 - 3 + 2^ceiling(log_2(3-1))) + a(1) + a(2) = a(1) + a(1) + a(2) = 3.

%e a(4) = a(2 - 4 + 2^ceiling(log_2(4-1))) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 6.

%e a(5) = a(5 - 1 - A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = a(1) + a(1) + a(2) + a(3) + a(4) = 12.

%e (End)

%p a := proc(n) local i; option remember; if n < 3 then return [1, 1][n]; end if; add(a(i), i = 1 .. n - 1) + a(3 - n + Bits:-Iff(n - 2, n - 2)); end proc;

%p seq(a(n), n = 1 .. 35); # _Petros Hadjicostas_, Oct 06 2019

%Y Cf. A006257.

%K nonn

%O 1,3

%A _Clark Kimberling_

%E More terms from _Petros Hadjicostas_, Oct 06 2019