OFFSET
0,3
COMMENTS
a(0) = 1 by convention.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..275
Wikipedia, Permutation
MAPLE
b:= proc(n, l, m) option remember; `if`(n=0, 1/(m-l)!, add((j-1)!
*b(n-j, min(l, j), max(m, j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..23);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 27 2023
STATUS
approved