login
A332721
Number of compositions of n^2 with parts <= n, such that each element of [n] is used at least once.
6
1, 1, 3, 72, 5752, 1501620, 1171326960, 2571831080160, 15245263511750160, 236246829658682027760, 9325247205993698149853760, 917699267902161951609308035200, 221117091698491444413008381486903040, 128433050637127079872089064922773889126400
OFFSET
0,3
LINKS
FORMULA
a(n) = A373118(n^2,n). - Alois P. Heinz, May 26 2024
EXAMPLE
a(2) = 3: 112, 121, 211.
a(3) = 72: 111123, 111132, 111213, 111231, 111312, 111321, 112113, 112131, 112311, 113112, 113121, 113211, 121113, 121131, 121311, 123111, 131112, 131121, 131211, 132111, 211113, 211131, 211311, 213111, 231111, 311112, 311121, 311211, 312111, 321111, 11223, 11232, 11322, 12123, 12132, 12213, 12231, 12312, 12321, 13122, 13212, 13221, 21123, 21132, 21213, 21231, 21312, 21321, 22113, 22131, 22311, 23112, 23121, 23211, 31122, 31212, 31221, 32112, 32121, 32211, 1233, 1323, 1332, 2133, 2313, 2331, 3123, 3132, 3213, 3231, 3312, 3321.
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (p+n)!
/(n+1)!, add(b(n-i*j, i-1, p+j)/(j+1)!, j=0..n/i))
end:
a:= n-> b(n*(n-1)/2, n$2):
seq(a(n), n=0..15);
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!/(n + 1)!, Sum[b[n - i*j, i - 1, p + j]/(j + 1)!, {j, 0, n/i}]];
a[n_] := b[n(n - 1)/2, n, n];
Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 21 2020
STATUS
approved