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.

Previous Showing 11-18 of 18 results.

A330895 Numerator of the variance of the random number of comparisons in quicksort applied to lists of length n.

Original entry on oeis.org

0, 0, 0, 2, 29, 46, 3049, 60574, 160599, 182789, 4913659, 1072364, 975570703, 1039388677, 5491155875, 92211937094, 6954047816459, 7225392149719, 2699717387790739, 2785123121790325, 573031978700759, 84009502802237, 45510401082365873, 46518885869845328
Offset: 0

Views

Author

Petros Hadjicostas, May 01 2020

Keywords

Examples

			The variances are: 0, 0, 0, 2/9, 29/36, 46/25, 3049/900, 60574/11025, 160599/19600, 182789/15876, 4913659/317520, 1072364/53361, ... = A330895/A330907.
		

References

  • D. E. Knuth, The Art of Computer Programming, Volume 3: Sorting and Searching, Addison-Wesley, 1973; see answer to Ex. 8(a) of Section 6.2.2.

Crossrefs

Programs

  • PARI
    lista(nn) = {my(va = vector(nn)); for(n=1, nn, va[n] = numerator(n*(7*n+13) - 2*(n+1)*sum(k=1, n, 1/k) - 4*(n+1)^2*sum(k=1, n, 1/k^2))); concat(0,va);}

Formula

a(n) = numerator(fr(n)), where fr(n) = n*(7*n + 13) - 2*(n + 1)*Sum_{k=1..n} 1/k - 4*(n + 1)^2*Sum_{k=1..n} 1/k^2.

A330907 Denominator of the variance of the random number of comparisons in quicksort applied to lists of length n.

Original entry on oeis.org

1, 1, 1, 9, 36, 25, 900, 11025, 19600, 15876, 317520, 53361, 38419920, 33127380, 144288144, 2029052025, 129859329600, 115831315600, 37529346254400, 33870234994596, 6144260316480, 799769421360, 387088399938240, 355503061748835, 40953952713465792, 37864231428870000, 316002721554520000, 2056839142975402500, 1612561888092715560000
Offset: 0

Views

Author

Petros Hadjicostas, May 01 2020

Keywords

Examples

			The variances are: 0, 0, 0, 2/9, 29/36, 46/25, 3049/900, 60574/11025, 160599/19600, 182789/15876, 4913659/317520, 1072364/53361, ... = A330895/A330907.
		

References

  • D. E. Knuth, The Art of Computer Programming, Volume 3: Sorting and Searching, Addison-Wesley, 1973; see answer to Ex. 8(a) of Section 6.2.2.

Crossrefs

Programs

  • Maple
    a := n -> denom(2*(n+1)*(harmonic(n,1) + 2*(n+1)*harmonic(n,2))):
    seq(a(n), n=0..28); # Peter Luschny, May 02 2020
  • PARI
    lista(nn) = {my(va = vector(nn)); for(n=1, nn, va[n] = denominator(n*(7*n+13) - 2*(n+1)*sum(k=1, n, 1/k) - 4*(n+1)^2*sum(k=1, n, 1/k^2))); concat(1, va); }

Formula

a(n) = denominator(fr(n)), where fr(n) = n*(7*n + 13) - 2*(n+1)*Sum_{k=1..n} (1/k) - 4*(n+1)^2*Sum_{k=1..n} (1/k^2).
a(n) = denominator(2*(n+1)*(H(n,1) + 2*(n+1)*H(n,2))), where H(n,s) are the generalized harmonic numbers. - Peter Luschny, May 02 2020

A093419 Denominators of row sums in triangle described in A093412.

Original entry on oeis.org

1, 1, 3, 6, 5, 10, 35, 140, 126, 1260, 1155, 13860, 12870, 12012, 45045, 360360, 340340, 2042040, 1939938, 369512, 117572, 2586584, 7436429, 178474296, 171609900, 1487285800, 1434168450, 40156716600, 38818159380, 1164544781400
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2004

Keywords

Crossrefs

Essentially the same as A096620.

Programs

  • Mathematica
    Do[s = i = n; j = 1; x = i; y = j; While[x/y != 1, i--; j++; x += i; y += j; s += x/y]; Print[Denominator[s]], {n, 1, 30}] (* Ryan Propper, Aug 16 2005 *)

Extensions

Corrected and extended by Ryan Propper, Aug 16 2005

A160049 Denominator of the Harary number for the path graph P_n.

Original entry on oeis.org

1, 1, 1, 3, 6, 5, 10, 35, 140, 126, 1260, 1155, 13860, 12870, 12012, 45045, 360360, 340340, 2042040, 1939938, 369512, 117572, 2586584, 7436429, 178474296, 171609900, 1487285800, 1434168450, 40156716600, 38818159380, 1164544781400
Offset: 1

Views

Author

Eric W. Weisstein, Apr 30 2009

Keywords

Comments

Is this the same as A096620? - R. J. Mathar, Jan 26 2010
Yes, except for offset, because n*(harmonic(n)-harmonic(n-1)) = 1 which is an integer. - Andrew Howroyd, Oct 31 2017

Examples

			0, 2, 5, 26/3, 77/6, 87/5, 223/10, 962/35, 4609/140, 4861/126, ...
		

Crossrefs

Cf. A160048.

Programs

  • PARI
    harmonic(n)=sum(k=1,n,1/k);
    a(n)=denominator(2*n*harmonic(n)); \\ Andrew Howroyd, Oct 31 2017

A335990 The moment generating function of the limiting distribution of the number of comparisons in quicksort can be written in the form M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2, where m(z) = Sum_{n >= 0} B(n)*z^n/n! for |z| < 1. This sequence gives the numerators of the rational numbers B(n) for n >= 0.

Original entry on oeis.org

1, 0, 7, 19, 565, 229621, 74250517, 30532750703, 90558126238639, 37973078754146051, 21284764359226368337, 1770024989560214080011109, 539780360793818428471498394131, 194520883210026428577888559667954807, 911287963487139630688627952818633149408727, 328394760901508739430228985010652235796369497219
Offset: 0

Views

Author

Petros Hadjicostas, Jul 03 2020

Keywords

Comments

Despite the fact that both the numerator and denominator in the formula M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) each have a Taylor expansion around t = 0 with a radius of convergence equal to 1/2, the moment generating function M(t) has a Taylor expansion around t = 0 with an infinite radius of convergence. This was proved in Rösler (1991).
The formula for M(t) appears as Theorem 6.1 in Tan and Hadjicostas (1993) and derives from the work of Hennequin (1991). Hennequin conjectured a cumulant formula for the limiting distribution of the number of comparisons in quicksort in his 1989 paper, and he proved it in his 1991 thesis.
The numbers (B(n): n >= 0), with B(0) = 1 and B(0) = 0, are given (for p >= 0) by the recurrence.
Sum_{r=0..p} Stirling1(p+2, r+1)*B(p-r)/(p-r)! + Sum_{r=0..p} F(r)*F(p-r) = 0, where F(r) = Sum_{i=0..r} Stirling1(r+1,i+1)*G(r-i) and G(k) = Sum_{a=0..k} (-1)^a*B(k-a)/(a!*(k-a)!*2^a).
The numbers A(n) = L_n(B(1),...,B(n)) = A330852(n)/A330860(n), where L_n(x_1,...,x_n) are the logarithmic polynomials of Bell, appear in Hennequin's cumulant formula.
Hoffman and Kuba (2019, 2020) gave an alternative proof of Hennequin's cumulant formula and gave an alternative calculation for the constants (-2)^n*A(n), which they denote by a_n. See also Finch (2020).
Hoffman and Kuba (2019-2020, Proposition 17) express the constants c(n) = B(n)*(-2)^n = A329001(n)/A330876(n) in terms of "tiered binomial coefficients". In terms of the constants c(n), the moment generating function equals M(t) = Sum_{n >= 0} (c(n)*t^n/n!)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2.
Tan and Hadjicostas (1993) proved that lim_{n -> infinity} B(n)/n! = nu, where nu = 0.589164... (approximately). Also, M(-1/2) = nu*exp(gamma), where gamma = A001620 (Euler's constant). (It seems that nu is close to Pi^(1/3) * exp(-1/3 - gamma), but we have no theoretical evidence for that.)
The PARI program below is based on a Maple program in Tan and Hadjicostas (1993).
The rest of the references give the theory of the limiting distribution of the number of comparisons in quicksort (and for that reason we omit any discussion of that topic).

Examples

			The first few fractions are 1/1, 0/1, 7/4, 19/8, 565/36, 229621/3456, 74250517/172800, 30532750703/10368000, 90558126238639/3810240000, ... = A335990/A335991.
		

References

  • Pascal Hennequin, Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche, Ph.D. Thesis, L'École Polytechnique Palaiseau (1991), p. 83.

Crossrefs

Cf. A001620, A063090, A067699, A093418, A096620, A115107, A288964, A288965, A288970, A288971, A329001 (numerators of B(n)*(-2)^n), A330852 (numerators of A(n)), A330860 (denominators of A(n)), A330876 (denominators of B(n)*(-2)^n), A335991 (denominators of B(n)).

Programs

  • Maple
    For a fast Maple program for the calculation of the numbers (B(n): n >= 0), see A330852.
  • PARI
    /* Very slow program due to recursion */
    g(k) = sum(a=0, k, (-1)^a*B(k - a)/(a!*(k - a)!*2^a));
    f(r) = sum(i=0, r, stirling(r + 1, i + 1, 1)*g(r - i));
    b(p) = (-1)^p*(sum(r=1, p, stirling(p + 2, r + 1, 1)*B(p - r)/(p - r)!) + sum(rr=1, p-1, f(rr)*f(p - rr)) + 2*(-1)^p*p!*sum(a=1, p, (-1)^a*B(p - a)/(a!*(p - a)!*2^a)) + 2*sum(i=1, p, stirling(p + 1, i + 1, 1)*g(p - i)))/(p - 1);
    B(m) = if(m==0, 1, if(m==1, 0, b(m)));
    a(n) = numerator(B(n));

Formula

a(n) = numerator(B(n)), where B(n) = (n-1)!*Sum_{k=0..n-1} A(k+1)*B(n-1-k)/(k!*(n-1-k)!) for n >= 1 with B(0) = 1 and A(n) = A330852(n)/A330860(n).
Also, B(n) = c(n)/(-2)^n = A329001(n)/A330876(n)/(-2)^n.

A335991 The moment generating function of the limiting distribution of the number of comparisons in quicksort can be written in the form M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2, where m(z) = Sum_{n >= 0} B(n)*z^n/n! for |z| < 1. This sequence gives the denominators of the rational numbers B(n) for n >= 0.

Original entry on oeis.org

1, 1, 4, 8, 36, 3456, 172800, 10368000, 3810240000, 177811200000, 9957427200000, 75278149632000000, 1912817782149120000000, 53023308921173606400000000, 17742659631203112173568000000000, 426249654980023566857797632000000000
Offset: 0

Views

Author

Petros Hadjicostas, Jul 03 2020

Keywords

Comments

Despite the fact that both the numerator and denominator in the formula M(t) = m(-2*t)/(exp(2*gamma*t)*Gamma(1 + 2*t)) each have a Taylor expansion around t = 0 with a radius of convergence equal to 1/2, the moment generating function M(t) has a Taylor expansion around t = 0 with an infinite radius of convergence. This was proved in Rösler (1991).
The formula for M(t) appears as Theorem 6.1 in Tan and Hadjicostas (1993) and derives from the work of Hennequin (1991). Hennequin conjectured a cumulant formula for the limiting distribution of the number of comparisons in quicksort in his 1989 paper, and he proved it in his 1991 thesis.
The numbers (B(n): n >= 0), with B(0) = 1 and B(0) = 0, are given (for p >= 0) by the recurrence
Sum_{r=0..p} Stirling1(p+2, r+1)*B(p-r)/(p-r)! + Sum_{r=0..p} F(r)*F(p-r) = 0, where F(r) = Sum_{i=0..r} Stirling1(r+1,i+1)*G(r-i) and G(k) = Sum_{a=0..k} (-1)^a*B(k-a)/(a!*(k-a)!*2^a).
The numbers A(n) = L_n(B(1),...,B(n)) = A330852(n)/A330860(n), where L_n(x_1,...,x_n) are the logarithmic polynomials of Bell, appear in Hennequin's cumulant formula.
Hoffman and Kuba (2019, 2020) gave an alternative proof of Hennequin's cumulant formula and gave an alternative calculation for the constants (-2)^n*A(n), which they denote by a_n. See also Finch (2020).
Hoffman and Kuba (2019-2020, Proposition 17) express the constants c(n) = B(n)*(-2)^n = A329001(n)/A330876(n) in terms of "tiered binomial coefficients". In terms of the constants c(n), the moment generating function equals M(t) = Sum_{n >= 0} (c(n)*t^n/n!)/(exp(2*gamma*t)*Gamma(1 + 2*t)) for |t| < 1/2.
Tan and Hadjicostas (1993) proved that lim_{n -> infinity} B(n)/n! = nu, where nu = 0.589164... (approximately). Also, M(-1/2) = nu*exp(gamma), where gamma = A001620 (Euler's constant).

Examples

			The first few fractions are 1/1, 0/1, 7/4, 19/8, 565/36, 229621/3456, 74250517/172800, 30532750703/10368000, 90558126238639/3810240000, ... = A335990/A335991.
		

References

  • Pascal Hennequin, Analyse en moyenne d'algorithmes, tri rapide et arbres de recherche, Ph.D. Thesis, L'École Polytechnique Palaiseau (1991), p. 83.

Crossrefs

Cf. A001620, A063090, A067699, A093418, A096620, A115107, A288964, A288965, A288970, A288971, A329001 (numerators of B(n)*(-2)^n), A330852 (numerators of A(n)), A330860 (denominators of A(n)), A330876 (denominators of B(n)*(-2)^n), A335990 (numerators of B(n)).

Programs

  • Maple
    # For a fast Maple program for the calculation of the numbers (B(n): n >= 0), see A330852.

Formula

a(n) = denominator(B(n)), where B(n) = (n-1)!*Sum_{k=0..n-1} A(k+1)*B(n-1-k)/(k!*(n-1-k)!) for n >= 1 with B(0) = 1 and A(n) = A330852(n)/A330860(n).
Also, B(n) = c(n)/(-2)^n = A329001(n)/A330876(n)/(-2)^n.

A196532 a(n) = (n+1)!*(H(n)+H(n+1)), where H(n) = Sum_{k=1..n} 1/k is the n-th harmonic number.

Original entry on oeis.org

1, 5, 20, 94, 524, 3408, 25416, 214128, 2012832, 20894400, 237458880, 2932968960, 39126516480, 560704273920, 8591147712000, 140160890419200, 2425888391270400, 44398288688947200, 856727919929548800
Offset: 0

Views

Author

Gary Detlefs, Oct 03 2011

Keywords

Comments

Denominator of a(n)/n! is listed in A096620.
a(n) - (n+1)*a(n-1) = A129326(n), n > 0. - Gary Detlefs, Oct 04 2011

Programs

  • Maple
    H:= n-> sum(1/k,k=1..n):seq((n+1)!*(H(n+1)+H(n)), n=0..20);
    # Alternative:
    f:= gfun:-rectoproc({a(n+3) = (3*n+8)*a(n+2)-(3*n+7)*(n+2)*a(n+1)+(n+1)*(n+2)^2*a(n),a(0)=1,a(1)=5,a(2)=20},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Mar 28 2018
  • Mathematica
    Table[(n+1)!Total[HarmonicNumber[{n,n+1}]],{n,0,20}] (* Harvey P. Dale, Jul 17 2013 *)

Formula

From Robert Israel, Mar 28 2018: (Start)
E.g.f.: (1+x - 2*log(1-x))/(1-x)^2.
a(n+3) = (3*n+8)*a(n+2) - (3*n+7)*(n+2)*a(n+1) + (n+1)*(n+2)^2*a(n). (End)

A368810 a(n) = numerator of Sum_{i=1..n} Sum_{j=1..n} (1/i + 1/j).

Original entry on oeis.org

2, 6, 11, 50, 137, 147, 363, 1522, 7129, 7381, 83711, 86021, 1145993, 1171733, 1195757, 4873118, 42142223, 42822903, 275295799, 279175675, 56574159, 19093197, 444316699, 1347822955, 34052522467, 34395742267, 312536252003, 315404588903, 9227046511387
Offset: 1

Views

Author

Mats Granvik, Jan 06 2024

Keywords

Crossrefs

Cf. A027611, A096620 (denominators), A193758.

Programs

  • Mathematica
    Numerator[Table[Sum[Sum[1/i + 1/j, {i, 1, n}], {j, 1, n}], {n, 1, 29}]]
  • Python
    from sympy import harmonic
    def A368810(n): return ((n<<1)*harmonic(n)).p # Chai Wah Wu, Feb 04 2024
Previous Showing 11-18 of 18 results.