OFFSET
0,5
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
Wikipedia, Permutation
FORMULA
EXAMPLE
a(4) = 5: (1)(243), (143)(2), (142)(3), (132)(4), (1234).
MAPLE
b:= proc(n) option remember; series(`if`(n=0, 1, add((x+
(j-1)!-1)*binomial(n-1, j-1)*b(n-j), j=1..n)), x, 2)
end:
a:= n-> coeff(b(n), x, 1):
seq(a(n), n=0..23);
MATHEMATICA
b[n_] := b[n] = Series[If[n == 0, 1, Sum[(x+
(j-1)!-1)*Binomial[n-1, j-1]*b[n-j], {j, 1, n}]], {x, 0, 2}];
a[n_] := Coefficient[b[n], x, 1];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 15 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 30 2021
STATUS
approved