login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of multisets of exactly n nonempty words with a total of 2n letters over 2n-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.
2

%I #13 Nov 23 2023 10:37:52

%S 1,2,7,22,73,240,818,2824,10004,36252,134594,512632,2002797,8037634,

%T 33122211,140287074,610344666,2728599114,12524559427,59014996342,

%U 285169596358,1412357461074,7161541766341,37150562120334,196945057245451,1066104659977212

%N Number of multisets of exactly n nonempty words with a total of 2n letters over 2n-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="/A293809/b293809.txt">Table of n, a(n) for n = 0..800</a>

%F G.f.: Product_{j>=1} 1/(1-x^j)^A000085(j+1).

%F Euler transform of j-> A000085(j+1).

%F a(n) = A293808(2n,n).

%e a(0) = 1: {}.

%e a(1) = 2: {aa}, {ab}.

%e a(2) = 7: {a,aaa}, {a,aab}, {a,aba}, {a,abc}, {aa,aa}, {aa,ab}, {ab,ab}.

%p g:= proc(n) option remember; `if`(n<2, 1, g(n-1)+(n-1)*g(n-2)) end:

%p a:= proc(n) option remember; `if`(n=0, 1, add(add(d*

%p g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)

%p end:

%p seq(a(n), n=0..30);

%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[d*g[d+1], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];

%t Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Nov 23 2023, after _Alois P. Heinz_ *)

%Y Cf. A000085, A293808.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Oct 16 2017