reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
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}]];
g[n_, i_, l_] := If[n == 0 || i == 1, h[Join[l, Table[1, {n}]]], Sum[g[n - i*j, i - 1, Join[l, Table[i, {j}]]], {j, 0, n/i}]];
a[n_] := g[n, n, {n}];
a /@ Range[0, 25] (* Jean-François Alcover, Jan 02 2021, after Alois P. Heinz *)
approved
editing
Vaclav Kotesovec, <a href="/A267436/b267436_1.txt">Table of n, a(n) for n = 0..70</a> (terms 0..55 from Alois P. Heinz)
editing
approved
Alois P. Heinz, Vaclav Kotesovec, <a href="/A267436/b267436_1.txt">Table of n, a(n) for n = 0..70</a> (terms 0..55</a> from Alois P. Heinz)
approved
editing
editing
approved
Also the number of 2n-length words w over n-ary alphabet {a1,a2,...,an} such that for every prefix z of w we have #(z,a1) >= #(z,a2) >= ... >= #(z,an) >= 1, where #(z,x) counts the letters x in word z. The a(2) = 5 words of length 4 over alphabet {a,b} are: aaab, aaba, abaa, aabb, abab.