%I #44 Oct 26 2020 21:08:40
%S 2,3,7,22,89,446,2677,18740,149921,1349290,13492901,148421912,
%T 1781062945,23153818286,324153456005,4862301840076,77796829441217,
%U 1322546100500690,23805829809012421,452310766371236000,9046215327424720001,189970521875919120022
%N a(n) = n*a(n-1) + 1, a(0) = 2.
%H Vincenzo Librandi, <a href="/A038159/b038159.txt">Table of n, a(n) for n = 0..200</a>
%F a(n) = A033540(n+1) + 1.
%F a(n) = n! * (1 + Sum(1/k!, k=0..n)) = A000522(n) + n!. - _Michael Somos_, Mar 26 1999
%F E.g.f.: (1+exp(x))/(1-x).
%F a(n) = floor(n!*(e+1)), n>0. - _Gary Detlefs_, Jul 18 2010
%F D-finite with recurrence: a(n) +(-n-1)*a(n-1) +(n-1)*a(n-2)=0. - _R. J. Mathar_, Feb 16 2014
%F 0 = +a(n)*(+a(n+1) -3*a(n+2) +a(n+3)) +a(n+1)*(+a(n+1) -a(n+3)) +a(n+2)*(+a(n+2)) if n>=0. - _Michael Somos_, Oct 23 2017
%e G.f. = 2 + 3*x + 7*x^2+ 22*x^3 + 89*x^4 + 446*x^5 + 2677*x^6 + 18740*x^7 + ...
%t a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 + Exp[x]) / (1 - x), {x, 0, n}]] (* _Michael Somos_, Sep 04 2013 *)
%t Range[0, 20]! CoefficientList[Series[(1 + Exp[x])/(1 - x), {x, 0, 20}], x] (* _Vincenzo Librandi_, Feb 17 2014 *)
%o (PARI) {a(n) = if( n<0, 0, n! * sum(k=0, n, 1/k!, 1))}; /* _Michael Somos_, Sep 04 2013 */
%Y Cf. A000522, A033540.
%K nonn
%O 0,1
%A _N. J. A. Sloane_