OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..425
FORMULA
E.g.f.: Sum_{i>=0} x^i/(i! * (1 - Sum_{j=1..i-1} x^j/j!)).
EXAMPLE
a(5) = 96 counts the following words (number of permutations shown in brackets): (1,1,1,1,1) [1], (1,1,1,1,2) [5], (1,1,1,2,2) [10], (1,1,1,2,3) [20], (1,1,2,3,4) [60].
MAPLE
b:= proc(n, t) option remember; `if`(n=0, 1,
add(b(n-j, t)/j!, j=1..min(n, t)))
end:
a:= n-> n!*add(b(n-j, j-1)/j!, j=0..n):
seq(a(n), n=0..22); # Alois P. Heinz, Jul 19 2025
PROG
(PARI) B_x(N) = {my(x='x+O('x^N)); Vec(serlaplace( sum(i=0, N, x^i/(i!*(1-sum(j=1, i-1, x^j/j!))))))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Jul 19 2025
STATUS
approved
