OFFSET
0,3
MAPLE
F := proc(n) option remember; if n = 0 then return 1 fi;
expand(add(binomial(n, k)*F(n-k)*x, k = 1..n)) end:
a := n -> (-1)^n*subs(x = (-1)^n*n, F(n)):
seq(a(n), n = 0..17);
MATHEMATICA
F[n_][x_] := If[n == 0, 1, Sum[k! StirlingS2[n, k] x^k, {k, 0, n}]];
a[n_] := (-1)^n F[n][(-1)^n*n];
Table[a[n], {n, 0, 16}] (* Jean-François Alcover, May 09 2024 *)
PROG
(SageMath)
@cached_function
def F(n):
R.<x> = PolynomialRing(ZZ)
if n == 0: return R(1)
return R(sum(binomial(n, k)*F(n - k)*x for k in (1..n)))
def a(n):
return (-1)^n*F(n).substitute(x = (-1)^n*n)
print([a(n) for n in range(17)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, May 21 2021
STATUS
approved