OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
FORMULA
From Vaclav Kotesovec, Oct 21 2012: (Start)
E.g.f.: (1+exp(x)*x^2)/(1-x).
Recurrence: (n-2)*a(n) = (n-1)*n*a(n-1) - (n-1)*n*a(n-2).
a(n) ~ n!*(1+e).
(End)
a(n) = n!*(1+Sum_{k=0..n-2} 1/k!), for n>1. - Vaclav Kotesovec, Oct 28 2012
MATHEMATICA
a=1; Table[a=(a+n)*(n+1), {n, 0, 60}] (* Vladimir Joseph Stephan Orlovsky, Nov 20 2009 *)
Rest[CoefficientList[Series[-(1+E^x*x^2)/(x-1), {x, 0, 20}], x]*Range[0, 20]!] (* Vaclav Kotesovec, Oct 21 2012 *)
Flatten[{1, Table[n!*(1+Sum[1/k!, {k, 0, n-2}]), {n, 2, 20}]}] (* Vaclav Kotesovec, Oct 28 2012 *)
nxt[{n_, a_}]:={n+1, (n+1)(a+n)}; NestList[nxt, {0, 1}, 30][[;; , 2]] (* Harvey P. Dale, Apr 16 2024 *)
PROG
(PARI) x='x+O('x^66); Vec(serlaplace((1+exp(x)*x^2)/(1-x))) \\ Joerg Arndt, May 10 2013
(PARI) a(n)=if(n==0, 1, n*(a(n-1) + n-1) ); \\ Joerg Arndt, May 11 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 12 2003
EXTENSIONS
More terms from Ray Chandler, Sep 13 2003
Corrected offset, Joerg Arndt, May 10 2013
STATUS
approved