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

 


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

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

%S 1,2,2,7,19,33,71,168,471,776,1557,3140,6415,13438,29240,68778,192896,

%T 317016,634037,1268100,2536335,5073278,10148920,20308138,40671616,

%U 81591470,164134024,332073226,679381312,1420045956,3090573668

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

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

%p a := proc(n) option remember; `if`(n < 4, [1, 2, 2][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 2)); end proc:

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

%Y Cf. A049906 (similar, but with minus a(m/2)), A049907 (similar, but with minus a(m)), A049954 (similar, but with plus a(m/2)).

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Apr 23 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 23 11:59 EDT 2024. Contains 376164 sequences. (Running on oeis4.)