A058087
Triangle read by rows, giving coefficients of the ménage hit polynomials ordered by descending powers. T(n, k) for 0 <= k <= n.
Original entry on oeis.org
1, 2, -1, 2, 0, 0, 2, 3, 0, 1, 2, 8, 4, 8, 2, 2, 15, 20, 40, 30, 13, 2, 24, 60, 152, 210, 192, 80, 2, 35, 140, 469, 994, 1477, 1344, 579, 2, 48, 280, 1232, 3660, 7888, 11672, 10800, 4738, 2, 63, 504, 2856, 11268, 32958, 70152, 104256, 97434, 43387
Offset: 0
The triangle begins:
1;
2, -1;
2, 0, 0;
2, 3, 0, 1;
2, 8, 4, 8, 2;
2, 15, 20, 40, 30, 13;
2, 24, 60, 152, 210, 192, 80;
2, 35, 140, 469, 994, 1477, 1344, 579;
2, 48, 280, 1232, 3660, 7888, 11672, 10800, 4738;
2, 63, 504, 2856, 11268, 32958, 70152, 104256, 97434, 43387;
The polynomials start:
[0] 1;
[1] 2*x - 1;
[2] 2*x^2;
[3] 2*x^3 + 3*x^2 + 1;
[4] 2*x^4 + 8*x^3 + 4*x^2 + 8*x + 2;
[5] 2*x^5 + 15*x^4 + 20*x^3 + 40*x^2 + 30*x + 13.
- I. Kaplansky and J. Riordan, The probleme des menages, Scripta Mathematica, 1946, 12 (2), 113-124.
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 198.
- Tolman, L. Kirk, "Extensions of derangements", Proceedings of the West Coast Conference on Combinatorics, Graph Theory and Computing, Humboldt State University, Arcata, California, September 5-7, 1979. Vol. 26. Utilitas Mathematica Pub., 1980. See Table I. - N. J. A. Sloane, Jul 06 2014
- G. C. Greubel, Rows n = 0..50 of the triangle, flattened
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
- Anthony C. Robin, 90.72 Circular Wife Swapping, The Mathematical Gazette, Vol. 90, No. 519 (Nov., 2006), pp. 471-478.
Essentially a mirror image of
A094314.
-
U := proc(n) if n = 0 then return 1 fi;
add((2*n/(2*n-k))*binomial(2*n-k, k)*(n-k)!*(x-1)^k, k=0..n) end:
W := proc(r, s) coeff(U(r), x, s ) end:
T := (n, k) -> W(n, n-k): seq(seq(T(n, k), k=0..n), n=0..9);
-
u[n_] := Sum[ 2*n/(2*n-k)*Binomial[2*n-k, k]*(n-k)!*(x-1)^k, {k, 0, n}]; w[r_, s_] := Coefficient[u[r], x, s]; a[n_, k_] := w[n, n-k]; a[0, 0]=1; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 10 2012, translated from Maple *)
T[n_, k_]:= If[n==0, 1, Sum[(-1)^j*(2*n*(k-j)!/(n+k-j))*Binomial[j+n-k, n - k]*Binomial[n+k-j, n-k+j], {j, 0, k}]];
Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 15 2021 *)
-
U(n,t)=sum(k=0,n, ((2*n/(2*n-k))*binomial(2*n-k,k)*(n-k)!*(t-1)^k));
print1(1,", "); for(n=1,9,forstep(k=n,0,-1,print1(polcoef(U(n,'x),k),", "))) \\ Hugo Pfoertner, Aug 30 2020
-
def A058087(n,k): return 1 if (n==0) else sum( (-1)^j*(2*n*factorial(k-j)/(n+k-j))*binomial(j+n-k, n-k)*binomial(n+k-j, n-k+j) for j in (0..k) )
flatten([[A058087(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 15 2021
-
a = [[1]]
for n in range(1, 10):
g = expand(
sum((x - 1)^ k * (2*n) * binomial(2*n-k, k) * factorial(n-k) / (2*n-k)
for k in range(0, n + 1)
)
)
coeffs = g.coefficients(sparse=False)
coeffs.reverse()
a.append(coeffs) # William P. Orrick, Aug 12 2020
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
- 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).
-
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
-
[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
-
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 *)
-
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
A000159
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 8, 20, 152, 994, 7888, 70152, 695760, 7603266, 90758872, 1174753372, 16386899368, 245046377410, 3910358788256, 66323124297872, 1191406991067168, 22596344660865282, 451208920617687720, 9461897733571886372, 207894669895136763704, 4776019866458134139042
Offset: 3
- 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).
- Sean A. Irvine, Table of n, a(n) for n = 3..250
- Belgacem Bouras, A New Characterization of Catalan Numbers Related to Hankel Transforms and Fibonacci Numbers, Journal of Integer Sequences, 16 (2013), #13.3.3.
- M. Dougherty, C. French, B. Saderholm, W. Qian, Hankel Transforms of Linear Combinations of Catalan Numbers, J. Int. Seq. 14 (2011) # 11.5.1.
A000181
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 15, 60, 469, 3660, 32958, 328920, 3614490, 43341822, 563144725, 7880897892, 118177520295, 1890389939000, 32130521850972, 578260307815920, 10985555094348948, 219687969344126490, 4613039009310624795, 101479234383619208204, 2333872309936442446905
Offset: 4
- 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).
A094314
Triangle read by rows: T(n,k) = number of ways of seating n couples around a circular table so that exactly k married couples are adjacent (0 <= k <= n).
Original entry on oeis.org
1, 0, 1, 0, 0, 2, 1, 0, 3, 2, 2, 8, 4, 8, 2, 13, 30, 40, 20, 15, 2, 80, 192, 210, 152, 60, 24, 2, 579, 1344, 1477, 994, 469, 140, 35, 2, 4738, 10800, 11672, 7888, 3660, 1232, 280, 48, 2, 43387, 97434, 104256, 70152, 32958, 11268, 2856, 504, 63, 2, 439792, 976000, 1036050, 695760, 328920, 115056, 30300, 6000, 840, 80, 2
Offset: 0
Triangle begins:
1;
0, 1;
0, 0, 2;
1, 0, 3, 2;
2, 8, 4, 8, 2;
13, 30, 40, 20, 15, 2;
80, 192, 210, 152, 60, 24, 2;
579, 1344, 1477, 994, 469, 140, 35, 2;
4738, 10800, 11672, 7888, 3660, 1232, 280, 48, 2;
...
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. See Table 1.
- Tolman, L. Kirk, "Extensions of derangements", Proceedings of the West Coast Conference on Combinatorics, Graph Theory and Computing, Humboldt State University, Arcata, California, September 5-7, 1979. Vol. 26. Utilitas Mathematica Pub., 1980. See Table I.
- Alois P. Heinz, Rows n = 0..140, flattened
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
- Anthony C. Robin, 90.72 Circular Wife Swapping, The Mathematical Gazette, Vol. 90, No. 519 (Nov., 2006), pp. 471-478.
- L. Takacs, On the probleme des menages, Discr. Math. 36 (3) (1981) 289-297, Table 1.
Essentially a mirror image of
A058087, which has much more information.
-
T[n_, k_]:= If[n<2, (1+(-1)^(n-k))/2, Sum[(-1)^j*(2*n*(n-k-j)!/(2*n-k-j))* Binomial[k+j, k]*Binomial[2*n-k-j, k+j], {j, 0, n-k}]];
Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 15 2021 *)
-
def A094314(n,k): return (1+(-1)^(n+k))/2 if (n<2) else sum( (-1)^j*(2*n*factorial(n-k-j)/(2*n-k-j))*binomial(k+j, k)*binomial(2*n-k-j, k+j) for j in (0..n-k) )
flatten([[A094314(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 15 2021
A000185
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 24, 140, 1232, 11268, 115056, 1284360, 15596208, 204710454, 2888897032, 43625578836, 702025263328, 11993721979336, 216822550325472, 4135337882588880, 82986434235959712, 1747976804189353962, 38559791049947726328, 889047923669760546140
Offset: 5
- 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).
A058089
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 35, 280, 2856, 30300, 349734, 4351368, 58217640, 834296862, 12759002305, 207501063952, 3577028170736, 65167077604440, 1251273416561196, 25258559758736880, 534813397441926960, 11852765770416416538, 274422835213034666655
Offset: 6
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
A058090
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 48, 504, 6000, 73260, 951984, 13152984, 193295952, 3016469790, 49879061920, 871884630672, 16072938332064, 311769325656312, 6349343550308640, 135485465497382160, 3023380765038115680, 70429101211136913498, 1709801309366361996624
Offset: 7
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
Showing 1-8 of 8 results.
Comments