OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..50
EXAMPLE
a(4) = 6232: all permutations of 4321111111, 432211111, 43222111, 4322221, 43321111, 4332211, 433321, 4432111, 443221, 543211, 64321.
MAPLE
b:= proc(n, i, p, m) option remember; `if`(n=0, p!,
`if`(i<1, 0, (t-> add(b(n-i*j, i-1, p+j, t)/(j+
`if`(t=0, 1, 0))!, j=0..n/i))(`if`(i>m, m, 0))))
end:
a:= n-> b(n*(n-1)/2$2, n$2):
seq(a(n), n=0..15);
MATHEMATICA
b[n_, i_, p_, m_] := b[n, i, p, m] = If[n == 0, p!,
If[i < 1, 0, Function[t, [b[n - i*j, i - 1, p + j, t]/(j +
If[t == 0, 1, 0])!, {j, 0, n/i}]][If[i > m, m, 0]]]];
a[n_] := b[n(n-1)/2, n(n-1)/2, n, n];
Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Sep 08 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 21 2020
STATUS
approved