OFFSET
0,3
COMMENTS
a(n) is the number of words of length n over an infinite alphabet such that for any letter k appearing within a word, exactly k occurrences of that letter are marked. - John Tyler Rascoe, Jul 16 2025
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..612 (first 101 terms from John Tyler Rascoe)
FORMULA
E.g.f.: exp( Sum_{k>=1} ( Sum_{d|k} (-1)^(d+1) * exp(d*x) / (d * ((k/d)!)^d) ) * x^k ).
E.g.f.: Product_{k>=1} (1 + Sum_{j>=k} binomial(j,k) * x^j / j!).
EXAMPLE
a(3) = 10 counts: (1#,1,1), (1,1#,1), (1,1,1#), (1#,2#,2#), (2#,1#,2#), (2#,2#,1#), (2#,2#,2), (2#,2,2#), (2,2#,2#), (3#,3#,3#). - John Tyler Rascoe, Jul 16 2025
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))/i!/(j-i)!, j=i..n)))
end:
a:= n-> n!*b(n$2):
seq(a(n), n=0..22); # Alois P. Heinz, Jul 17 2025
MATHEMATICA
nmax = 22; CoefficientList[Series[Product[(1 + Exp[x] x^k/k!), {k, 1, nmax}], {x, 0, nmax}], x] Range[0, nmax]!
PROG
(PARI)
C_x(N) = {my(x='x+O('x^(N+1))); Vec(serlaplace(prod(k=1, N, 1 + exp(x)*x^k/k!)))} \\ John Tyler Rascoe, Jul 16 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Aug 10 2021
STATUS
approved
