OFFSET
0,6
COMMENTS
Number T(n,k) of permutations p of [n] such that p(i) < p(i+k) > p(i+2k) < ... for i <= k.
T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = n! for k>=n.
LINKS
Alois P. Heinz, Rows n = 0..150, flattened
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 1, 2;
0, 2, 3, 6;
0, 5, 6, 12, 24;
0, 16, 20, 30, 60, 120;
0, 61, 80, 90, 180, 360, 720;
0, 272, 350, 420, 630, 1260, 2520, 5040;
0, 1385, 1750, 2240, 2520, 5040, 10080, 20160, 40320;
...
MAPLE
b:= proc(u, o) option remember; `if`(u+o=0, 1,
add(b(o-1+j, u-j), j=1..u))
end:
T:= (n, k)-> `if`(n=0, 1, `if`(k=0, 0, (l-> mul(b(s, 0), s=l)*
combinat[multinomial](n, l[]))([floor((n+i)/k)$i=0..k-1]))):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[o-1+j, u-j], {j, 1, u}]];
T[n_, k_] := If[n == 0, 1, If[k == 0, 0, Function[l, Product[b[s, 0], {s, l}]*multinomial[n, l]][Table[Floor[(n+i)/k], {i, 0, k-1}]]]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Nov 22 2023, after Alois P. Heinz *)
CROSSREFS
AUTHOR
Alois P. Heinz, Mar 19 2023
STATUS
approved