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!)
A049961 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 3, where m = 2^(p+1) + 2 - n and p is the smallest number such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1 and a(2) = 2. 0

%I #12 Nov 13 2019 01:38:52

%S 1,2,4,9,17,42,79,156,311,777,1477,2917,5809,11610,23215,46428,92855,

%T 232137,441061,870517,1735233,3467574,6933708,13866716,27732966,

%U 55465777,110931477,221862917,443725809,887451610,1774903215

%N a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 3, where m = 2^(p+1) + 2 - n and p is the smallest number such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = 1 and a(2) = 2.

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

%p end proc:

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

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Name edited by _Petros Hadjicostas_, Nov 12 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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)