cp's OEIS Frontend

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.

A006040 a(n) = Sum_{i=0..n} (n!/(n-i)!)^2.

Original entry on oeis.org

1, 2, 9, 82, 1313, 32826, 1181737, 57905114, 3705927297, 300180111058, 30018011105801, 3632179343801922, 523033825507476769, 88392716510763573962, 17324972436109660496553, 3898118798124673611724426, 997918412319916444601453057, 288398421160455852489819933474
Offset: 0

Views

Author

Keywords

References

  • R. K. Guy, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of array A099597.
Cf. A073701.

Programs

  • 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 *)
  • 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

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

Extensions

Offset changed by N. J. A. Sloane, Dec 17 2013