OFFSET
0,5
COMMENTS
FORMULA
T(2n,k) = [n!*C(n,k)]^2; T(2n+1,k) = n!*(n+1)!*C(n,k)*C(n+1,k).
EXAMPLE
T(3,1) = 4 because we have 123, 132, 312 and 321.
Triangle starts:
1;
1;
1, 1;
2, 4;
4, 16, 4;
12, 72, 36;
36, 324, 324, 36;
...
MAPLE
T:=proc(n, k) if `mod`(n, 2) = 0 then factorial((1/2)*n)^2*binomial((1/2)*n, k)^2 else factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial((1/2)*n-1/2, k)*binomial((1/2)*n+1/2, k) end if end proc: for n from 0 to 11 do seq(T(n, k), k =0..floor((1/2)*n)) end do; # yields sequence in triangular form
MATHEMATICA
T[n_, k_]:=If[EvenQ[n], Floor[(n/2)!Binomial[n/2, k]]^2, ((n-1)/2)!((n+1)/2)!Binomial[(n-1)/2, k]Binomial[(n+1)/2, k]]; Table[T[n, k], {n, 0, 11}, {k, 0, Floor[n/2]}]//Flatten (* Stefano Spezia, Jul 12 2024 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Nov 30 2008
STATUS
approved