login
A386254
Number of words of length n over an infinite alphabet such that for any letter k appearing within a word the letter k appears at least k times.
2
1, 1, 2, 6, 18, 60, 240, 1085, 5012, 23730, 121440, 685707, 4144668, 25614589, 159141892, 1012740885, 6805631232, 48872707006, 369227821608, 2853779791619, 22131042288980, 172055270717463, 1362017827326860, 11208504802237327, 96939147303239304, 875473007351905045
OFFSET
0,3
LINKS
FORMULA
E.g.f.: Product_{k>=1} (1 + Sum_{j>=k} x^j / j!).
EXAMPLE
a(3) = 6 counts: (1,1,1), (1,2,2), (2,1,2), (2,2,1), (2,2,2), (3,3,3).
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+add(b(n-j, min(n-j, i-1))/j!, j=i..n)))
end:
a:= n-> n!*b(n$2):
seq(a(n), n=0..25); # Alois P. Heinz, Jul 17 2025
MATHEMATICA
terms=26; CoefficientList[Series[Product[1+Sum[x^j/j!, {j, k, terms}], {k, terms}], {x, 0, terms-1}], x]Range[0, terms-1]! (* Stefano Spezia, Jul 17 2025 *)
PROG
(PARI) D_x(N) = {my(x='x+O('x^(N+1))); Vec(serlaplace(prod(k=1, N, 1 + sum(i=k, N, x^i/i!))))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Jul 16 2025
STATUS
approved