login
A152664
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} for which k is the maximal number of initial even entries (0 <= k <= floor(n/2)).
3
1, 1, 1, 4, 2, 12, 8, 4, 72, 36, 12, 360, 216, 108, 36, 2880, 1440, 576, 144, 20160, 11520, 5760, 2304, 576, 201600, 100800, 43200, 14400, 2880, 1814400, 1008000, 504000, 216000, 72000, 14400, 21772800, 10886400, 4838400, 1814400, 518400, 86400
OFFSET
1,4
COMMENTS
Sum of entries in row n is n! (A000142).
Row n has 1 + floor(n/2) entries.
T(n,0) = A052558(n-1).
Sum_{k=0..ceiling(n/2)} k*T(n,k) = A152665(n).
FORMULA
T(2n+1,k) = n!(n+1)!binomial(2*n-k,n);
T(2n,k) = (n!)^2*binomial(2n-k-1,n-1).
EXAMPLE
T(3,0)=4 because we have 123, 132, 312 and 321.
T(4,2)=4 because we have 2413, 2431, 4213 and 4231.
Triangle starts:
1;
1, 1;
4, 2;
12, 8, 4;
72, 36, 12;
360, 216, 108, 36;
MAPLE
T := proc (n, k) if `mod`(n, 2) = 1 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-k-1, (1/2)*n-1/2) else factorial((1/2)*n)^2*binomial(n-k-1, (1/2)*n-1) end if end proc: for n to 11 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Dec 13 2008
STATUS
approved