OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..415
FORMULA
a(n) = exp(n) * Sum_{k>=0} (-n)^k*k^n/k!. - Ilya Gutkovskiy, Jul 13 2019
a(n) = Sum_{k=0..n} (-n)^k * Stirling2(n,k). - Seiichi Manyama, Jul 28 2019
a(n) = BellPolynomial(n, -n). - Peter Luschny, Dec 23 2021
MAPLE
b:= proc(n, k) option remember; `if`(n=0, 1,
-(1+add(binomial(n-1, j-1)*b(n-j, k), j=1..n-1))*k)
end:
a:= n-> b(n$2):
seq(a(n), n=0..30); # Alois P. Heinz, Sep 25 2017
MATHEMATICA
Table[n!*SeriesCoefficient[E^(n*(1 - E^x)), {x, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Sep 25 2017 *)
a[n_] := BellB[n, -n]; Table[a[n], {n, 0, 20}] (* Peter Luschny, Dec 23 2021 *)
PROG
(Ruby)
def ncr(n, r)
return 1 if r == 0
(n - r + 1..n).inject(:*) / (1..r).inject(:*)
end
def A(k, n)
ary = [1]
(1..n).each{|i| ary << k * (0..i - 1).inject(0){|s, j| s + ncr(i - 1, j) * ary[j]}}
ary
end
def A292866(n)
(0..n).map{|i| A(-i, i)[-1]}
end
p A292866(20)
(PARI) {a(n) = sum(k=0, n, (-n)^k*stirling(n, k, 2))} \\ Seiichi Manyama, Jul 28 2019
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Sep 25 2017
STATUS
approved