| MATHEMATICA
|
h[l_] := With[{n = Length[l]}, Total[l]!/Product[ Product[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i + 1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
b[n_, l_] := If[n < 1, h[l], b[n - 1, l] + b[n - 1, Append[l, n]]];
a[n_] := If[n == 0, 1, b[n - 1, {n}]];
Table[a[n], {n, 0, 12}] (* Jean-François Alcover, Nov 02 2022, after Alois P. Heinz *)
|