login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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
1, 1, 3, 6, 12, 24, 48, 98, 199, 393, 786, 1574, 3151, 6308, 12628, 25280, 50610, 101123, 202246, 404494, 808991, 1617988, 3235988, 6472000, 12944050, 25888201, 51776596, 103553585, 207107958, 414217493, 828438143, 1656882606, 3313777864, 6627530449, 13255060898, 26510121798, 53020243599 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Petros Hadjicostas, Table of n, a(n) for n = 1..3323

FORMULA

From Petros Hadjicostas, Oct 25 2019: (Start)

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

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

(End)

EXAMPLE

From Petros Hadjicostas, Oct 25 2019: (Start)

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

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.

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.

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.

(End)

MAPLE

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

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

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

     end:

seq(a(n), n=1..50);  # Petros Hadjicostas, Oct 25 2019

CROSSREFS

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

Sequence in context: A170684 A003945 A007283 * A200463 A099844 A165929

Adjacent sequences:  A049939 A049940 A049941 * A049943 A049944 A049945

KEYWORD

nonn

AUTHOR

Clark Kimberling

EXTENSIONS

More terms from Petros Hadjicostas, Oct 25 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 22 22:19 EDT 2021. Contains 343197 sequences. (Running on oeis4.)