login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239100 Solution to the problem of finding the number of comparisons needed for optimal merging of 3 elements with n elements. 2
0, 1, 1, 2, 3, 4, 6, 8, 10, 13, 17, 22, 28, 37, 47, 59, 75, 96, 120, 153, 194, 242, 309, 391, 487, 619, 784, 976, 1241, 1570, 1954, 2485, 3143, 3911, 4971, 6288, 7824, 9945, 12578, 15650, 19893, 25159, 31303, 39787, 50320, 62608, 79577, 100642, 125218, 159157 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..50.

F. K. Hwang, Optimal merging of 3 elements with n elements, SIAM J. Comput. 9 (1980), no. 2, 298--320. MR0568816 (82c:68022).

FORMULA

For r >= 3, a(3r) = floor(43*2^(r-2)/7)-2,

a(3r+1) = floor(107*2^(r-3)/7)-2,

a(3r+2) = floor((17*2^r-6)/7)-1; initial terms are shown in sequence.

PROG

(PARI) a(n) = if (n<9, v=[0, 1, 1, 2, 3, 4, 6, 8]; v[n], ndt = n\3; nmt = n%3; if (nmt==0, 43*2^(ndt-2)\7 - 2, if (nmt == 1, 107*2^(ndt-3)\7 - 2, (17*2^ndt-6)\7 - 1))); \\ Michel Marcus, Mar 26 2014

CROSSREFS

Cf. A200310, A200111.

Sequence in context: A005434 A027589 A039851 * A243225 A220851 A028290

Adjacent sequences:  A239097 A239098 A239099 * A239101 A239102 A239103

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Mar 24 2014

EXTENSIONS

More terms from Michel Marcus, Mar 26 2014

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 December 12 12:30 EST 2019. Contains 329958 sequences. (Running on oeis4.)