login
A049887
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
1, 1, 1, 2, 3, 7, 13, 21, 28, 76, 151, 297, 580, 1105, 1989, 3170, 4275, 11719, 23437, 46869, 93724, 187393, 374565, 748322, 1494579, 2980609, 5926068, 11711612, 22862295, 43492303, 78253603, 124726515, 168218818, 461164150
OFFSET
1,4
COMMENTS
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
FORMULA
a(n) = (1/2)*A049911(n) for n > 3. - Petros Hadjicostas, Apr 27 2020
PROG
(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)
CROSSREFS
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)).
Sequence in context: A067834 A070754 A325875 * A048216 A003509 A238432
KEYWORD
nonn
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 26 2020
STATUS
approved