login
a(n) = a(n - 1) + (n - 1)*a(n - 2).
1

%I #29 Jan 05 2021 22:01:22

%S 1,2,3,7,16,44,124,388,1256,4360,15664,59264,231568,942736,3953120,

%T 17151424,76448224,350871008,1650490816,7966168960,39325494464,

%U 198648873664,1024484257408,5394759478016,28957897398400

%N a(n) = a(n - 1) + (n - 1)*a(n - 2).

%C Equals the eigensequence of an infinite lower triangular matrix with (1, 1, 1, ...) in the main diagaonal, (1, 1, 2, 3, 4, 5, ...) in the subdiagonal and the rest zeros. - _Gary W. Adamson_, Apr 13 2009

%H G. C. Greubel, <a href="/A122031/b122031.txt">Table of n, a(n) for n = 0..795</a>

%F E.g.f.: (1/2)*exp(x + x^2/2)*(2 - sqrt(2*exp(1)*Pi)*erf(1/sqrt(2)) + sqrt(2*exp(1)*Pi)*erf((1+x)/sqrt(2))). - Paul Abbott (paul(AT) physics.uwa.edu.au)

%F a(n) ~ (1/sqrt(2) + sqrt(Pi)/2*exp(1/2) * (1 - erf(1/sqrt(2)))) * n^(n/2)*exp(sqrt(n) - n/2 - 1/4) * (1+7/(24*sqrt(n))). - _Vaclav Kotesovec_, Dec 27 2012

%t a[0] = 1; a[1] = 2; a[n_] := a[n] = a[n - 1] + (n - 1)*a[n - 2] Table[a[n], {n, 0, 30}]

%t Table[n!*SeriesCoefficient[1/2*Exp[x+x^2/2]*(2-Sqrt[2*E*Pi]*Erf[1/Sqrt[2]]+Sqrt[2*E*Pi]*Erf[(1+x)/Sqrt[2]]),{x,0,n}],{n,0,20}] (* _Vaclav Kotesovec_ after Paul Abbott, Dec 27 2012 *)

%t RecurrenceTable[{a[0]==1,a[1]==2,a[n]==a[n-1]+(n-1)a[n-2]},a,{n,30}] (* _Harvey P. Dale_, Feb 21 2015 *)

%Y Cf. A000898, A062267, A121966, A122021, A122022.

%K nonn

%O 0,2

%A _Roger L. Bagula_, Sep 13 2006

%E Edited by _N. J. A. Sloane_, Sep 17 2006

%E Offset corrected by _Vaclav Kotesovec_, Dec 27 2012