This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A006040 M1950 #43 Oct 08 2023 04:52:40 %S A006040 1,2,9,82,1313,32826,1181737,57905114,3705927297,300180111058, %T A006040 30018011105801,3632179343801922,523033825507476769, %U A006040 88392716510763573962,17324972436109660496553,3898118798124673611724426,997918412319916444601453057,288398421160455852489819933474 %N A006040 a(n) = Sum_{i=0..n} (n!/(n-i)!)^2. %D A006040 R. K. Guy, personal communication. %D A006040 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006040 G. C. Greubel, <a href="/A006040/b006040.txt">Table of n, a(n) for n = 0..250</a> %H A006040 D. Deford, <a href="http://www.math.dartmouth.edu/~ddeford/graphs.pdf">Seating rearrangements on arbitrary graphs</a>, 2013. (See Table 1) %H A006040 D. Deford, <a href="http://dx.doi.org/10.2140/involve.2014.7.787">Seating rearrangements on arbitrary graphs</a>, involve, Vol. 7 (2014), No. 6, 787-805. (See Table 1) %H A006040 R. K. Guy, <a href="/A001599/a001599_1.pdf">Letter to N. J. A. Sloane with attachment, Jun. 1991</a> %H A006040 <a href="/index/Be#Bessel">Index entries for sequences related to Bessel functions or polynomials</a> %F A006040 a(n) = n^2*a(n-1) + 1. %F A006040 The following formulas will need adjusting, since I have changed the offset. - _N. J. A. Sloane_, Dec 17 2013 %F A006040 a(n+1) = Nearest integer to BesselI(0, 2)*n!*n!, n >= 1. %F A006040 a(n+1) = n!^2*Sum_{k = 0..n} 1/k!^2. BesselI(0, 2*sqrt(x))/(1-x) = Sum_{n>=0} a(n+1)*x^n/n!^2. - _Vladeta Jovovic_, Aug 30 2002 %F A006040 Recurrence: a(1) = 1, a(2) = 2, a(n+1) = (n^2 + 1)*a(n) - (n - 1)^2*a(n-1), n >= 2. The sequence defined by b(n) := (n-1)!^2 satisfies the same recurrence with the initial conditions b(1) = 1, b(2) = 1. It follows that a(n+1) = n!^2*(1 + 1/(1 - 1/(5 - 4/(10 - ... - (n - 1)^2/(n^2 + 1))))). Hence BesselI(0,2) := Sum_{k >= 0} 1/k!^2 = 1 + 1/(1 - 1/(5 - 4/(10 - ... - (n - 1)^2/(n^2 + 1 - ...)))). Cf. A073701. - _Peter Bala_, Jul 09 2008 %p A006040 a[0]:= 1: %p A006040 for n from 1 to 30 do a[n]:= n^2*a[n-1] + 1 od: %p A006040 seq(a[i],i=0..30); # _Robert Israel_, Dec 15 2014 %t A006040 a = 1; lst = {a}; Do[a = a * n^2 + 1; AppendTo[lst, a], {n, 1, 14}]; lst (* _Zerinvary Lajos_, Jul 08 2009 *) %t A006040 Table[Sum[(n!/(n - k)!)^2, {k, 0, n}], {n, 0, 50}] (* _G. C. Greubel_, Aug 15 2017 *) %o A006040 (PARI) a(n)=sum(k=0, n, (k!*binomial(n, k))^2 ); \\ _Joerg Arndt_, Dec 14 2014 %o A006040 (Sage) %o A006040 def A006040_list(len): %o A006040 L = [1] %o A006040 for k in range(1,len): L.append(L[-1]*k^2+1) %o A006040 return L %o A006040 A006040_list(18) # _Peter Luschny_, Dec 15 2014 %Y A006040 Main diagonal of array A099597. %Y A006040 Cf. A073701. %K A006040 nonn,easy %O A006040 0,2 %A A006040 _N. J. A. Sloane_, _Simon Plouffe_ %E A006040 Offset changed by _N. J. A. Sloane_, Dec 17 2013