|
|
A094112
|
|
Triangle read by rows: T(n,k) is the number of permutations p of [n] in which the length of the longest initial segment avoiding the 123-, the 132- and the 231-pattern is equal to k.
|
|
1
|
|
|
1, 0, 2, 0, 3, 3, 0, 12, 8, 4, 0, 60, 40, 15, 5, 0, 360, 240, 90, 24, 6, 0, 2520, 1680, 630, 168, 35, 7, 0, 20160, 13440, 5040, 1344, 280, 48, 8, 0, 181440, 120960, 45360, 12096, 2520, 432, 63, 9, 0, 1814400, 1209600, 453600, 120960, 25200, 4320, 630, 80, 10, 0
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Row sums are the factorial numbers (A000142).
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = n!/[(k-2)!k] for 2<=k<=n-1; T(n, n)=n; T(n, 1)=0 for n>=2; T(n, k)=0 for k>n.
G.f.: sum(T(n, k)t^k z^n/n!, n, k>=1) = z[(t-1)exp(tz)+1]/(1-z).
|
|
EXAMPLE
|
T(4,3)=8 because the permutations 2134, 2143, 3124, 3142, 3241, 4123, 4132 and 4231 do not avoid all three patterns 123, 132 and 231, but their initial segments of length three, namely 213, 214, 312, 314, 324, 412, 413 and 423, do.
Triangle begins:
1;
0,2;
0,3,3;
0,12,8,4;
0,60,40,15,5;
0,360,240,90,24,6;
...
|
|
MAPLE
|
T:=proc(n, k) if n=1 and k=1 then 1 elif n=1 then 0 elif k=1 then 0 elif k=n then n elif k>1 and k<n then n!/(k-2)!/k else 0 fi end: seq(seq(T(n, k), k=1..n), n=1..11);
|
|
MATHEMATICA
|
T[n_, k_] := Which[n == 1 && k == 1, 1, n == 1, 0, k == 1, 0, k == n, n, k > 1 && k < n, n!/(k-2)!/k, True, 0]; Table[T[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 22 2019, from PARI *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|