login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049884 a(n) = a(1) + a(2) + ... + a(n-1) - a(m) for n >= 3, where m = 2*n - 3 - 2^(p+1) and p is the unique integer such that 2^p < n-1 <= 2^(p+1), with a(1) = a(2) = 1. 0
1, 1, 1, 2, 4, 8, 16, 29, 46, 107, 214, 425, 838, 1646, 3124, 5624, 8962, 21047, 42094, 84185, 168358, 336686, 673204, 1345784, 2689282, 5372726, 10712320, 21298376, 42091906, 82167734, 156312430, 281245274, 448270024, 1052852477 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = -a(A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 3 with a(1) = a(2) = 1. - Petros Hadjicostas, Sep 24 2019
EXAMPLE
From Petros Hadjicostas, Sep 24 2019:
a(3) = -a(A006257(3-2)) + a(1) + a(2) = -1 + 1 + 1 = 1.
a(4) = -a(A006257(4-2)) + a(1) + a(2) + a(3) = -1 + 1 + 1 + 1 = 2.
a(5) = -a(A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = -1 + 1 + 1 + 1 + 2 = 4.
a(6) = -a(A006257(6-2)) + a(1) + a(2) + a(3) + a(4) + a(5) = 8.
(End)
MAPLE
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(2*n - 4 - Bits:-Iff(n - 2, n - 2)); end proc;
seq(a(n), n = 1 .. 37); # Petros Hadjicostas, Sep 24 2019, courtesy of Peter Luschny
CROSSREFS
Cf. A006257.
Sequence in context: A355968 A177269 A018726 * A085583 A160786 A054154
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Sep 24 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)