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!)
A049963 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), with a(1) = 1, a(2) = 2 and a(3) = 4. 3
1, 2, 4, 9, 25, 43, 93, 220, 617, 1016, 2039, 4112, 8401, 17598, 38292, 90070, 252612, 415156, 830319, 1660672, 3321521, 6643838, 13290772, 26595030, 53262532, 106850150, 214945816, 434874798, 889700788, 1859656696 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The number m in the definition of the sequence equals 2*n - 2 - x, where x is the smallest power of 2 >= n-1. It turns out that m = 1 + A006257(n-2), where the sequence b(n) = A006257(n) satisfies b(2*n) = 2*b(n) - 1 and b(2*n + 1) = 2*b(n) + 1, and it is related to the so-called Josephus problem. - Petros Hadjicostas, Sep 25 2019
LINKS
FORMULA
a(n) = a(1 + A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 4 with a(1) = 1, a(2) = 2 and a(3) = 4. - Petros Hadjicostas, Sep 25 2019
EXAMPLE
From Petros Hadjicostas, Sep 25 2019: (Start)
a(4) = a(1 + A006257(4-2)) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 9.
a(7) = a(1 + A006257(7-2)) + a(1) + a(2) + a(3) + a(4) + a(5) + a(6) = a(4) + a(1) + a(2) + a(3) + a(4) + a(5) + a(6) = 93.
(End)
MAPLE
a := proc(n) local i; option remember; if n < 4 then return [1, 2, 4][n]; end if; add(a(i), i = 1 .. n - 1) + a(2*n - 3 - Bits:-Iff(n - 2, n - 2)); end proc;
seq(a(n), n = 1..40); # Petros Hadjicostas, Sep 25 2019, courtesy of Peter Luschny
CROSSREFS
Cf. A049914 (similar, but with minus a(m/2)), A049915 (similar, but with minus a(m)), A049962 (similar, but with plus a(m/2)).
Sequence in context: A013091 A013168 A013183 * A368458 A114110 A337693
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Sep 25 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.)