OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..55
FORMULA
a(n) = Sum_{j=0..n} A112492(n, j), n >= 0.
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, (k+1)^(n-k)*T[n-1, k-1] + k!*T[n-1, k]];
a[n_]:= a[n]= Sum[T[n, k], {k, 0, n}]; (* T = A112492 *)
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jul 24 2023 *)
PROG
(Magma)
T:= func< n, k | (-1)*Factorial(k+1)^(n-k)*(&+[(-1)^j*Binomial(k+1, j)/j^(n-k) : j in [1..k+1]]) >; // T = A112492
A111885:= func< n | (&+[T(n, k): k in [0..n]]) >;
[A111885(n): n in [0..40]]; // G. C. Greubel, Jul 24 2023
(SageMath)
@CachedFunction
def T(n, k): # T = A112492
if (k==0 or k==n): return 1
else: return (k+1)^(n-k)*T(n-1, k-1) + factorial(k)*T(n-1, k)
def A111885(n): return sum(T(n, k) for k in range(n+1))
[A111885(n) for n in range(31)] # G. C. Greubel, Jul 24 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Sep 12 2005
STATUS
approved