A293735 Number of multisets of nonempty words with a total of n letters over quinary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.
1, 1, 3, 7, 20, 54, 163, 492, 1571, 5122, 17262, 59483, 209958, 755615, 2770994, 10330036, 39103166, 150073289, 583329574, 2293822828, 9116935874, 36593731182, 148221246775, 605427601519, 2492286544749, 10334197803358, 43140208034891, 181224681022614
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
g:= proc(n) option remember; `if`(n<3, [1, 1, 2][n+1], ((3*n^2+17*n+15)*g(n-1) +(n-1)*(13*n+9)*g(n-2) -15*(n-1)*(n-2)*g(n-3)) / ((n+4)*(n+6))) end: a:= proc(n) option remember; `if`(n=0, 1, add(add(g(d) *d, d=numtheory[divisors](j))*a(n-j), j=1..n)/n) end: seq(a(n), n=0..35);
-
Mathematica
g[n_] := g[n] = If[n < 3, {1, 1, 2}[[n+1]], ((3n^2+17n+15) g[n-1] + (n-1)(13n+9) g[n-2] - 15(n-1)(n-2) g[n-3]) / ((n+4)(n+6))]; a[n_] := a[n] = If[n == 0, 1, Sum[Sum[g[d] d, {d, Divisors[j]}] a[n-j], {j, 1, n}]/n]; a /@ Range[0, 35] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)
Formula
G.f.: Product_{j>=1} 1/(1-x^j)^A049401(j).
a(n) ~ c * 5^n / n^5, where c = 542.824729617782144... - Vaclav Kotesovec, May 30 2019
Comments