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!)
A049959 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) = 1, a(2) = 2, and a(3) = 3. 4
1, 2, 3, 8, 22, 38, 82, 194, 544, 896, 1798, 3626, 7408, 15518, 33766, 79424, 222754, 366086, 732178, 1464386, 2928928, 5858558, 11719846, 23451584, 46967074, 94220810, 189539920, 383474012, 784541050, 1639851326, 3568955854 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = 2*A049935(n) for n > 3. - Petros Hadjicostas, Apr 27 2020
MAPLE
s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
a := proc(n) option remember;
`if`(n < 4, [1, 2, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):
end proc:
seq(a(n), n = 1..40); # Petros Hadjicostas, Apr 25 2020
CROSSREFS
Cf. A049910 (similar, but with minus a(m/2)), A049911 (similar, but with minus a(m)), A049935, A049958 (similar, but with plus a(m/2)).
Sequence in context: A238329 A272333 A098119 * A006545 A089402 A127940
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by Petros Hadjicostas, Apr 25 2020
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 30 20:18 EDT 2024. Contains 372141 sequences. (Running on oeis4.)