OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
FORMULA
E.g.f.: exp(1)*(Ei(1,1-x)-Ei(1,1))/(1-x). - Vladeta Jovovic, May 05 2007
a(n) = Integral_{x=1..oo} exp(1-x)*(x^n*log(x) - n!/x) dx. - Groux Roland, Mar 12 2011
From Vladimir Reshetnikov, Oct 28 2015: (Start)
a(n) = exp(1)*(H(n)*n! + (Ei(-1)-gamma)*n! + hypergeom([n+1,n+1],[n+2,n+2],-1)/(n+1)^2), where H(n)*n! = A000254(n), -Ei(-1) is A099285, gamma is A001620.
Recurrence: a(0) = 0, a(1) = 1, a(2) = 4, a(n) = 2*n*a(n-1) + (2-n^2)*a(n-2) + (n-2)^2*a(n-3).
(End)
a(n) = n!*e*Sum_{k=1..n} Gamma(k,1)/k!. - Robert Israel, Oct 28 2015
MAPLE
f:= gfun:-rectoproc({a(0) = 0, a(1) = 1, a(2) = 4, a(n) = 2*n*a(n-1) + (2-n^2)*a(n-2) + (n-2)^2*a(n-3)}, a(n), remember):
seq(f(n), n=0..50); # Robert Israel, Oct 28 2015
MATHEMATICA
Round@Table[E n! Sum[Gamma[k, 1]/k!, {k, 1, n}], {n, 0, 20}]
Round@Table[E ((HarmonicNumber[n] + ExpIntegralEi[-1] - EulerGamma) n! + HypergeometricPFQ[{n+1, n+1}, {n+2, n+2}, -1]/(n+1)^2), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 28 2015 *)
PROG
(PARI) a(n) = n!*sum(i=1, n, 1/i*sum(j=0, i-1, 1/j!))
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Apr 26 2004
STATUS
approved