OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
FORMULA
a(n) = Sum_{i=0..n} i! * [x^i] exp(exp(x)-(n-i)*x-1).
a(n) = Sum_{0<=j<=i<=n} binomial(i,j)*(i-n)^(i-j)*Bell(j).
a(n) mod 2 = A059841(n).
MAPLE
a:= n-> add(add(binomial(i, j)*(i-n)^(i-j)*combinat[bell](j), j=0..i), i=0..n):
seq(a(n), n=0..25);
# second Maple program:
a:= n-> add(i!*coeff(series(exp(exp(x)-(n-i)*x-1), x, i+1), x, i), i=0..n):
seq(a(n), n=0..25);
# third Maple program:
b:= proc(n, m) option remember;
`if`(n=0, 1, b(n-1, m+1)+m*b(n-1, m))
end:
a:= n-> add(b(i, i-n), i=0..n):
seq(a(n), n=0..25);
PROG
(Python)
from math import comb
from sympy import bell
def A361380(n): return sum(comb(i, j)*(i-n)**(i-j)*bell(j) for i in range(n+1) for j in range(i+1)) # Chai Wah Wu, Apr 05 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 09 2023
STATUS
approved