login
A361651
Number T(n,k) of permutations p of [n] such that p(i), p(i+k), p(i+2k),... form an up-down sequence for i in [k]; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
3
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, 0, 7936, 10080, 13440, 15120, 22680, 45360, 90720, 181440, 362880
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
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
Columns k=0-3 give: A000007, A000111, A361648, A367336.
Main diagonal gives A000142.
T(2n,n) gives A000680.
Sequence in context: A261216 A308107 A323167 * A222753 A274568 A233399
KEYWORD
nonn,look,tabl
AUTHOR
Alois P. Heinz, Mar 19 2023
STATUS
approved