|
|
A152667
|
|
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k runs of even entries (n >= 2, 1 <= k <= floor(n/2)). For example, the permutation 321756498 has 3 runs of even entries: 2, 64 and 8.
|
|
3
|
|
|
2, 6, 12, 12, 48, 72, 144, 432, 144, 720, 2880, 1440, 2880, 17280, 17280, 2880, 17280, 129600, 172800, 43200, 86400, 864000, 1728000, 864000, 86400, 604800, 7257600, 18144000, 12096000, 1814400, 3628800, 54432000, 181440000, 181440000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
COMMENTS
|
Sum of entries in row n is n! (=A000142(n)). Row n contains floor(n/2) entries.
|
|
LINKS
|
|
|
FORMULA
|
T(2n,k) = (n!)^2 * binomial(n+1,k) binomial(n-1,k-1);
T(2n+1,k) = n!*(n+1)!*binomial(n-1,k-1)*binomial(n+2,k) (n >= 1).
|
|
EXAMPLE
|
T(4,2) = 12 because we have 1234, 3214, 1432, 3412, 2134, 2314 and their reverses.
Triangle starts:
2;
6;
12, 12;
48, 72;
144, 432, 144;
720, 2880, 1440;
|
|
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-1, k-1)*binomial(n+2, 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 .. floor((1/2)*n)) end do; # yields sequence in triangular form
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|