OFFSET
0,4
FORMULA
For n>=2, a(n) = (1 + 2^(n-1) * (n-2)) * (n-2)!. - Vaclav Kotesovec, Jul 01 2022
For n>=2, a(n) = n!*Sum_{k, 0, n - 2} (binomial(n - 2, k)/(k + 2)). - Detlef Meya, Apr 12 2024
MAPLE
egf := (1 - x)*log((1 - x)/(1 - 2*x)): ser := series(egf, x, 23):
seq(n!*coeff(ser, x, n), n = 0..21);
# Alternative:
a := n -> local k; n! * ifelse(n < 2, n, (2^(n - 1)*(n - 2) + 1) / (n*(n - 1))):
seq(a(n), n = 0..21); # Peter Luschny, Apr 12 2024
MATHEMATICA
a[0]:=0; a[1]:=1; a[n_]:=n!*Sum[Binomial[n-2, k]/(k+2), {k, 0, n-2}];
Flatten[Table[a[n], {n, 0, 21}]] (* Detlef Meya, Apr 12 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 01 2022
STATUS
approved