OFFSET
1,2
COMMENTS
FORMULA
T(2n,k) = (n!)^2*binomial(n+1,k)*binomial(n-1,k-1).
T(2n+1,k) = n!*(n+1)!*binomial(n,k-1)*binomial(n+1,k).
EXAMPLE
T(3,2)=2 because we have 123 and 321.
T(4,2)=12 because we have 1234, 1432, 3214, 3412, 1243, 3241 and their reverses.
Triangle starts:
1;
2;
4,2;
12,12;
36,72,12;
144,432,144;
576,2592,1728,144.
MAPLE
ae := proc (n, k) options operator, arrow: factorial(n)^2*binomial(n+1, k)*binomial(n-1, k-1) end proc: ao := proc (n, k) options operator, arrow: factorial(n)*factorial(n+1)*binomial(n, k-1)*binomial(n+1, k) end proc: T := proc (n, k) if `mod`(n, 2) = 0 then ae((1/2)*n, k) else ao((1/2)*n-1/2, k) end if end proc: for n to 12 do seq(T(n, k), k = 1 .. ceil((1/2)*n)) end do; # yields sequence in triangular form
MATHEMATICA
T[n_?EvenQ, k_] := (n/2)!^2*Binomial[n/2 - 1, k - 1]*Binomial[n/2 + 1, k]; T[n_?OddQ, k_] := ((n - 1)/2 + 1)!*((n - 1)/2)!*Binomial[(n - 1)/2 + 1, k]*Binomial[(n - 1)/2, k - 1]; Table[T[n, k], {n, 1, 12}, {k, 1, Floor[(n + 1)/2]}] // Flatten (* Jean-François Alcover, Nov 13 2016 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Dec 14 2008
STATUS
approved