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!)
A049944 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), with a(1) = a(2) = 1 and a(3) = 4. 0

%I #16 Nov 06 2019 03:37:34

%S 1,1,4,7,17,31,65,143,334,604,1211,2435,4918,10105,21087,45881,107931,

%T 194776,389555,779123,1558294,3116857,6234591,12472889,24961947,

%U 50010738,100303100,201774939,408226175,835179706,1745700565,3799324205,8936122800,16126545036,32253090075

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

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

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

%F a(n) = a(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(A006257(4-2)) + a(1) + a(2) + a(3) = a(1) + a(1) + a(2) + a(3) = 7.

%e a(5) = a(A006257(5-2)) + a(1) + a(2) + a(3) + a(4) = a(3) + a(1) + a(2) + a(3) + a(4) = 17.

%e a(6) = a(2*6 - 3 - 2^ceiling(log_2(6-1))) + a(1) + a(2) + a(3) + a(4) + a(5) = a(1) + a(1) + a(2) + a(3) + a(4) + a(5) = 31. (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, 4, s(n - 1) + a(2*n - 4 - Bits:-Iff(n - 2, n - 2))));

%p end proc;

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

%Y Cf. A006257.

%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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)