login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.
4

%I #25 May 06 2022 13:12:15

%S 1,1,1,2,3,7,13,21,28,76,151,297,580,1105,1989,3170,4275,11719,23437,

%T 46869,93724,187393,374565,748322,1494579,2980609,5926068,11711612,

%U 22862295,43492303,78253603,124726515,168218818,461164150

%N a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 4, where m = 2*n - 2 - 2^(p+1) and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.

%C The fact that a(n) = (1/2)*A049911(n) for n > 3 follows from the facts that a(1) + a(2) + a(3) = (1/2)*Sum_{i=1..3} A049911(i) and that the smallest possible value of 2*n - 2 - 2^ceiling(log_2(n-1)) is 2, but a(2) = (1/2)*A049911(2), and by using mathematical induction. - _Petros Hadjicostas_, Apr 26 2020

%F a(n) = (1/2)*A049911(n) for n > 3. - _Petros Hadjicostas_, Apr 27 2020

%o (PARI) lista(nn) = { my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[2*n - 2 - 2^ceil(log(n-1)/log(2))]; sa += va[n]; ); va; } \\ _Petros Hadjicostas_, Apr 26 2020 (with nn > 2)

%Y Cf. A049886 (similar, but with minus a(m/2)), A049911, A049934 (similar, but with plus a(m/2)), A049935 (similar, but with plus a(m)).

%K nonn

%O 1,4

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Apr 26 2020