%I #23 Jun 07 2018 03:53:33
%S 1,1,3,7,20,54,164,500,1630,5472,19257,70133,265858,1042346,4235031,
%T 17760943,76913277,342919431,1573637985,7415371293,35860511131,
%U 177641956111,900782461170,4668600610346,24714284921937,133467868645017,734844788634269,4120752558254581
%N Number of multisets of nonempty words with a total of n letters over n-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
%H Alois P. Heinz, <a href="/A293110/b293110.txt">Table of n, a(n) for n = 0..800</a>
%F G.f.: Product_{j>=1} 1/(1-x^j)^A000085(j).
%e a(0) = 1: {}.
%e a(1) = 1: {a}
%e a(2) = 3: {a,a}, {aa}, {ab}.
%e a(3) = 7: {a,a,a}, {a,aa}, {a,ab}, {aaa}, {aab}, {aba}, {abc}.
%p g:= proc(n) option remember;
%p `if`(n<2, 1, g(n-1)+(n-1)*g(n-2))
%p end:
%p a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d)
%p *d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
%p end:
%p seq(a(n), n=0..40);
%t g[n_] := g[n] = If[n < 2, 1, g[n - 1] + (n - 1)*g[n - 2]];
%t a[n_] := a[n] = If[n == 0, 1, Sum[Sum[g[d]*d, {d, Divisors[j]}]*a[n - j], {j, 1, n}]/n];
%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Jun 07 2018, from Maple *)
%Y Main diagonal of A293108.
%Y Row sums of A293109 and of A293808.
%Y Cf. A000085, A182172, A293114.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Sep 30 2017