OFFSET
0,2
REFERENCES
R. K. Guy, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..250
D. Deford, Seating rearrangements on arbitrary graphs, 2013. (See Table 1)
D. Deford, Seating rearrangements on arbitrary graphs, involve, Vol. 7 (2014), No. 6, 787-805. (See Table 1)
FORMULA
a(n) = n^2*a(n-1) + 1.
The following formulas will need adjusting, since I have changed the offset. - N. J. A. Sloane, Dec 17 2013
a(n+1) = Nearest integer to BesselI(0, 2)*n!*n!, n >= 1.
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
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
MAPLE
a[0]:= 1:
for n from 1 to 30 do a[n]:= n^2*a[n-1] + 1 od:
seq(a[i], i=0..30); # Robert Israel, Dec 15 2014
MATHEMATICA
a = 1; lst = {a}; Do[a = a * n^2 + 1; AppendTo[lst, a], {n, 1, 14}]; lst (* Zerinvary Lajos, Jul 08 2009 *)
Table[Sum[(n!/(n - k)!)^2, {k, 0, n}], {n, 0, 50}] (* G. C. Greubel, Aug 15 2017 *)
PROG
(PARI) a(n)=sum(k=0, n, (k!*binomial(n, k))^2 ); \\ Joerg Arndt, Dec 14 2014
(Sage)
def A006040_list(len):
L = [1]
for k in range(1, len): L.append(L[-1]*k^2+1)
return L
A006040_list(18) # Peter Luschny, Dec 15 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Offset changed by N. J. A. Sloane, Dec 17 2013
STATUS
approved