login
A104001
Triangle T(n,k) read by rows: number of permutations in S_n avoiding all k-length patterns starting with fixed m, 2<k<=n, 1<=m<=k.
2
2, 4, 6, 8, 18, 24, 16, 54, 96, 120, 32, 162, 384, 600, 720, 64, 486, 1536, 3000, 4320, 5040, 128, 1458, 6144, 15000, 25920, 35280, 40320, 256, 4374, 24576, 75000, 155520, 246960, 322560, 362880, 512, 13122, 98304, 375000, 933120, 1728720, 2580480, 3265920, 3628800
OFFSET
3,1
FORMULA
T(n, k) = (k-2)! * (k-1)^(n+1-k).
From G. C. Greubel, Nov 29 2022: (Start)
T(n, 3) = A000079(n-2).
T(n, 4) = 6*A000244(n-4).
T(n, 5) = 4!*A000302(n-5).
T(2*n-3, n) = A152684(n-1). (End)
EXAMPLE
Triangle begins as:
2;
4, 6;
8, 18, 24;
16, 54, 96, 120;
32, 162, 384, 600, 720;
64, 486, 1536, 3000, 4320, 5040;
128, 1458, 6144, 15000, 25920, 35280, 40320;
MATHEMATICA
Table[(k-1)!*(k-1)^(n-k), {n, 3, 15}, {k, 3, n}]//Flatten (* G. C. Greubel, Nov 29 2022 *)
PROG
(Magma) [Factorial(k-1)*(k-1)^(n-k): k in [3..n], n in [3..15]]; // G. C. Greubel, Nov 29 2022
(SageMath)
def A104001(n, k): return factorial(k-1)*(k-1)^(n-k)
flatten([[A104001(n, k) for k in range(3, n+1)] for n in range(3, 16)]) # G. C. Greubel, Nov 29 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Ralf Stephan, Feb 26 2005
STATUS
approved