%I #17 Sep 08 2022 08:45:41
%S 1,-1,2,0,0,2,1,0,3,2,2,8,4,8,2,13,30,40,20,15,2,80,192,210,152,60,24,
%T 2,579,1344,1477,994,469,140,35,2,4738,10800,11672,7888,3660,1232,280,
%U 48,2,43387,97434,104256,70152,32958,11268,2856,504,63,2,439792,976000,1036050,695760,328920,115056,30300,6000,840,80,2
%N Triangle T(n, k) = coefficients of p(n,x), where p(n,x) = Sum_{j=0..n} (2*n*(n-j)!/(2*n-j)) * binomial(2*n-j, j) * (x-1)^j and p(0,x) = 1, read by rows.
%D J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 197-199
%H G. C. Greubel, <a href="/A156996/b156996.txt">Rows n = 0..50 of the triangle, flattened</a>
%H I. Kaplansky and J. Riordan, <a href="/A000166/a000166_1.pdf">The problème des ménages</a>, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
%H Anthony C. Robin, <a href="http://www.jstor.org/stable/40378205">90.72 Circular Wife Swapping</a>, The Mathematical Gazette, Vol. 90, No. 519 (Nov., 2006), pp. 471-478.
%H L. Takacs, <a href="http://dx.doi.org/10.1016/S0012-365X(81)80024-6">On the probleme des menages</a>, Discr. Math. 36 (3) (1981) 289-297, Table 1.
%F T(n, k) = coefficients of p(n,x), where p(n,x) = Sum_{j=0..n} (2*n*(n-j)!/(2*n-j)) * binomial(2*n-j, j) * (x-1)^j and p(0,x) = 1.
%F Sum_{k=0..n} T(n, k) = n!.
%F From _G. C. Greubel_, May 14 2021: (Start)
%F T(n, 0) = A000179(n).
%F T(n, k) = Sum_{j=k..n} (-1)^(j+k)*(2*n*(n-j)!/(2*n-j))*binomial(j, k)*binomial(2*n-j, j), with T(0, k) = 1. (End)
%e Triangle begins as:
%e 1;
%e -1, 2;
%e 0, 0, 2;
%e 1, 0, 3, 2;
%e 2, 8, 4, 8, 2;
%e 13, 30, 40, 20, 15, 2;
%e 80, 192, 210, 152, 60, 24, 2;
%e 579, 1344, 1477, 994, 469, 140, 35, 2;
%e 4738, 10800, 11672, 7888, 3660, 1232, 280, 48, 2;
%e 43387, 97434, 104256, 70152, 32958, 11268, 2856, 504, 63, 2;
%e 439792, 976000, 1036050, 695760, 328920, 115056, 30300, 6000, 840, 80, 2;
%t (* first program *)
%t Table[CoefficientList[If[n==0, 1, Sum[Binomial[2*n-k, k]*(n-k)!*(2*n/(2*n-k))*(x- 1)^k, {k,0,n}]], x], {n,0,12}]//Flatten
%t (* Second program *)
%t T[n_, k_]:= If[n==0, 1, Sum[(-1)^(j-k)*(2*n*(n-j)!/(2*n-j))*Binomial[j, k]*Binomial[2*n-j, j], {j,k,n}]];
%t Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, May 14 2021 *)
%o (Magma)
%o A156996:= func< n,k | n eq 0 select 1 else (&+[(-1)^(j-k)*(2*n*Factorial(n-j)/(2*n-j))*Binomial(j, k)*Binomial(2*n-j, j): j in [k..n]]) >;
%o [A156996(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, May 14 2021
%o (Sage)
%o def A156996(n,k): return 1 if (n==0) else sum( (-1)^(j-k)*(2*n*factorial(n-j)/(2*n-j))*binomial(j, k)*binomial(2*n-j, j) for j in (k..n) )
%o flatten([[A156996(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, May 14 2021
%Y Cf. A000179, A094314, A156995.
%K sign,tabl
%O 0,3
%A _Roger L. Bagula_, Feb 20 2009
%E Edited by _G. C. Greubel_, May 14 2021