cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A350568 a(n)/n! is the average number of key comparisons required to perform an indirect sort of n records with distinct keys using a two-way merge (A. D. Woodall's mergesort).

This page as a plain text file.
%I A350568 #9 Jan 12 2022 17:36:14
%S A350568 2,19,130,992,8145,73665,725630,7840280,92297011,1176802235,
%T A350568 16129154724,236335661166,3685509077329,60981635041557
%N A350568 a(n)/n! is the average number of key comparisons required to perform an indirect sort of n records with distinct keys using a two-way merge (A. D. Woodall's mergesort).
%C A350568 There are six places in the Algol 60 procedure mergesort where the keys are compared. The sequence is the sum of the counts of these comparisons, taken over all n! possible orders of the records.
%C A350568 The following table shows the maximum and average number of key comparisons.
%C A350568 .
%C A350568    n  Worst case
%C A350568    |  A350567(n)
%C A350568    |   |  Average
%C A350568    |   |  a(n)/n!
%C A350568    |   |    |    Average/
%C A350568    |   |    |   (n*log(n))
%C A350568    2   1   1.000  0.721
%C A350568    3   4   3.167  0.961
%C A350568    4   6   5.417  0.977
%C A350568    5  10   8.267  1.027
%C A350568    6  13  11.313  1.052
%C A350568    7  17  14.616  1.073
%C A350568    8  20  17.997  1.082
%C A350568    9  25  21.606  1.093
%C A350568   10  29  25.435  1.105
%C A350568   11  34  29.481  1.118
%C A350568   12  38  33.672  1.129
%C A350568   13  43  37.953  1.138
%C A350568   14  47  42.276  1.144
%C A350568   15  52  46.634  1.148
%D A350568 D. E. Knuth, The Art of Computer Programming Second Edition. Vol. 3, Sorting and Searching. Chapter 5.2.4 Sorting by Merging, Pages 164-166. Addison-Wesley, Reading, MA, 1998.
%H A350568 A. D. Woodall, <a href="https://doi.org/10.1093/comjnl/13.1.110">An internal sorting procedure using a two-way merge</a>, Algorithm 45, The Computer Journal, Volume 13, Number 1, February 1970, Algorithms Supplement, pp. 110-111.
%Y A350568 Cf. A001768, A001855, A350567, A350569.
%K A350568 nonn,more
%O A350568 2,1
%A A350568 _Hugo Pfoertner_, Jan 09 2022