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!)
A049937 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = 2^(p+1) + 2 - n and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = 1 and a(3) = 2. 8

%I #16 Nov 07 2019 05:11:48

%S 1,1,2,5,10,24,45,89,178,444,844,1667,3320,6635,13267,26533,53066,

%T 132664,252062,497492,991669,1981685,3962547,7924694,15849122,

%U 31698155,63396266,126792511,253585008,507170011,1014340019,2028680037,4057360074,10143400184,19272460350,38037750692

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

%F From _Petros Hadjicostas_, Nov 06 2019: (Start)

%F a(n) = a(2^ceiling(log_2(n-1)) + 2 - n) + Sum_{i = 1..n-1} a(i) for n >= 4.

%F a(n) = a(n - 1 - A006257(n-2)) + Sum_{i = 1..n-1} a(i) for n >= 4. (End)

%e From _Petros Hadjicostas_, Nov 06 2019: (Start)

%e a(4) = a(2^ceiling(log_2(4-1)) + 2 - 4) + a(1) + a(2) + a(3) = a(2) + a(1) + a(2) + a(3) = 5.

%e a(5) = a(2^ceiling(log_2(5-1)) + 2 - 5) + a(1) + a(2) + a(3) + a(4) = a(1) + a(1) + a(2) + a(3) + a(4) = 10.

%e a(6) = a(2^ceiling(log_2(6-1)) + 2 - 6) + a(1) + a(2) + a(3) + a(4) + a(5) = a(4) + a(1) + a(2) + a(3) + a(4) + a(5) = 24.

%e a(7) = a(7 - 1 - A006257(7-2)) + Sum_{i = 1..6} a(i) = a(3) + Sum_{i = 1..6} a(i) = 45.

%e a(8) = a(8 - 1 - A006257(8-2)) + Sum_{i = 1..7} a(i) = a(2) + Sum_{i = 1..7} a(i) = 89. (End)

%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, `if`(n < 4, 2, s(n - 1) + a(Bits:-Iff(n - 2, n - 2) + 3 - n)));

%p end proc;

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

%Y Cf. A006257, A049933, A049945.

%K nonn

%O 1,3

%A _Clark Kimberling_

%E Name edited by and more terms from _Petros Hadjicostas_, Nov 06 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 20 03:59 EDT 2024. Contains 371798 sequences. (Running on oeis4.)