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

%I #30 May 06 2022 13:12:16

%S 1,1,3,6,12,24,48,98,199,393,786,1574,3151,6308,12628,25280,50610,

%T 101123,202246,404494,808991,1617988,3235988,6472000,12944050,

%U 25888201,51776596,103553585,207107958,414217493,828438143,1656882606,3313777864,6627530449,13255060898,26510121798,53020243599

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

%H Petros Hadjicostas, <a href="/A049942/b049942.txt">Table of n, a(n) for n = 1..3323</a>

%F From _Petros Hadjicostas_, Oct 25 2019: (Start)

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

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

%F (End)

%e From _Petros Hadjicostas_, Oct 25 2019: (Start)

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

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

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

%e a(6) = a(6 - 1 - 2^ceiling(-1 + 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) = 24.

%e (End)

%p s := proc(n) option remember; `if`(n<1, 0, a(n)+s(n-1)) end:

%p a := proc(n) option remember; `if`(n<3, 1, s(n-1)+

%p a(n-3/2-1/2*Bits:-Iff(n-2, n-2)))

%p end:

%p seq(a(n), n=1..50); # _Petros Hadjicostas_, Oct 25 2019

%Y Cf. A006257, A049894 (similar, but with minus a(m)), A049895 (similar, but with minus a(2*m)), A049943 (similar, but with plus a(2*m)).

%K nonn

%O 1,3

%A _Clark Kimberling_

%E More terms from _Petros Hadjicostas_, Oct 25 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.)