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!)
A049954 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = n - 1 - 2^p 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

%S 1,2,2,6,13,25,51,102,208,411,823,1646,3296,6599,13210,26446,52943,

%T 105785,211571,423142,846288,1692583,3385178,6770382,13540815,

%U 27081736,54163675,108327762,216656347,433314344,866631991,1733270593

%N a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = n - 1 - 2^p 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) - 1) + n - 1)); end proc:

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

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

%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 | 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 October 4 21:22 EDT 2022. Contains 357240 sequences. (Running on oeis4.)