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!)
A049948 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 3 - 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) = 1. 0

%I #10 Nov 16 2019 03:27:44

%S 1,2,1,5,10,20,40,89,208,377,754,1517,3064,6296,13138,28586,67246,

%T 121355,242710,485429,970888,1941944,3884434,7771178,15552430,

%U 31158968,62493400,125714978,254343502,520355000,1087650970,2367152042

%N a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2*n - 3 - 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) = 1.

%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, 1][n], s(n - 1) + a(-2^ceil(log[2](n - 1)) + 2*n - 3)):

%p end proc:

%p seq(a(n), n = 1..40); # _Petros Hadjicostas_, Nov 15 2019

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Nov 15 2019

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 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)