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.

A000033 Coefficients of ménage hit polynomials.

Original entry on oeis.org

0, 2, 3, 4, 40, 210, 1477, 11672, 104256, 1036050, 11338855, 135494844, 1755206648, 24498813794, 366526605705, 5851140525680, 99271367764480, 1783734385752162, 33837677493828171, 675799125332580020, 14173726082929399560, 311462297063636041906
Offset: 1

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A058087.

Programs

  • Haskell
    fac = a000142
    a n = sum $ map f [2..n]
      where f k = g k `div` h k
            g k = (-1)^k * n * fac (2*n-k-1) * fac (n-k)
            h k = fac (2*n-2*k) * fac (k-2)
    -- James Spahlinger, Oct 08 2012
    
  • Magma
    [0] cat [&+[(-1)^k*n*Factorial(2*n-k-1)*Factorial(n-k)/(Factorial(2*n-2*k)*Factorial(k-2)): k in [2..n]]: n in [2..25]]; // Vincenzo Librandi, Jun 11 2019
    
  • Mathematica
    Table[n*Sum[(-1)^k*(2*n-k-1)!*(n-k)!/((2*n-2*k)!*(k-2)!),{k,2,n}],{n,1,20}] (* Vaclav Kotesovec, Oct 26 2012 *)
  • SageMath
    def A000033(n): return n*sum((-1)^k*(2*n-3-2*k)*factorial(n-k-2)*binomial(2*n-k-3, k) for k in range(n-1)) # G. C. Greubel, Jul 10 2025

Formula

a(n) = coefficient of t^2 in polynomial p(t) = Sum_{k=0..n} 2*n*C(2*n-k,k)*(n-k)!*(t-1)^k/(2*n-k).
a(n) = Sum_{k=2..n} (-1)^k*n*(2*n-k-1)!*(n-k)!/((2*n-2*k)!*(k-2)!). - David W. Wilson, Jun 22 2006
a(n) = n*A000426(n) - Vladeta Jovovic, Dec 27 2007
Recurrence: (n-3)*(n-2)*(2*n-5)*(2*n-7)*a(n) = (n-3)*(n-2)*n*(2*n-7)^2*a(n-1) + (n-4)*(n-3)*n*(2*n-3)^2*a(n-2) + (n-2)*n*(2*n-5)*(2*n-3)*a(n-3). - Vaclav Kotesovec, Oct 26 2012
a(n) ~ 2/e^2*n!. - Vaclav Kotesovec, Oct 26 2012
From Mark van Hoeij, Jun 09 2019: (Start)
a(n) = round(2*(exp(-2)*n*(4*BesselK(n,2) - (2*n-5)*BesselK(n-1,2)) - (-1)^n)), for n > 9.
a(n) = (3/2)*(A000159(n+1)*n/(n+1) - A000159(n))/(n-1) for n > 2. (End)
Conjecture: a(n) + 2*a(n+p) + a(n+2*p) is divisible by p for any prime p. - Mark van Hoeij, Jun 10 2019

Extensions

Extended to 34 terms by N. J. A. Sloane, May 25 2005
Edited and further extended by David W. Wilson, Dec 27 2007