OFFSET
0,3
FORMULA
a(n) = (3*n-6)*a(n-3)+(4-4*n)*a(n-2)+(3+n)*a(n-1) for n >= 3.
E.g.f.: exp(x+2)*(Ei(1,2-2*x)-Ei(1,2)). - Robert Israel, Dec 17 2017
MAPLE
a := proc(n) option remember; if n=0 then 0 elif n=1 then 1 elif n=2 then 5 else
(3*n-6)*a(n-3)+(4-4*n)*a(n-2)+(3+n)*a(n-1) fi end: seq(a(n), n=0..21);
MATHEMATICA
a[n_] := E^3 Sum[Gamma[k + 1, 3], {k, 0, n - 1}]; Table[a[n], {n, 0, 21}]
PROG
(PARI) a=vector(1000); a[1]=1; a[2]=5; a[3]=22; for(n=4, #a, a[n] = (n+3)*a[n-1]+(4-4*n)*a[n-2]+(3*n-6)*a[n-3]); va=concat(0, vector(1000, n, a[n])) \\ Altug Alkan, Dec 17 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 17 2017
STATUS
approved