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

%I #19 May 06 2022 13:12:16

%S 1,2,3,8,22,38,82,194,544,896,1798,3626,7408,15518,33766,79424,222754,

%T 366086,732178,1464386,2928928,5858558,11719846,23451584,46967074,

%U 94220810,189539920,383474012,784541050,1639851326,3568955854

%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) = 1, a(2) = 2, and a(3) = 3.

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

%p s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:

%p a := proc(n) option remember;

%p `if`(n < 4, [1, 2, 3][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)):

%p end proc:

%p seq(a(n), n = 1..40); # _Petros Hadjicostas_, Apr 25 2020

%Y 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)).

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Apr 25 2020

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 16 01:01 EDT 2024. Contains 371696 sequences. (Running on oeis4.)