A006157 a(n+1) = (n-1)*a(n) + n*n!.
1, 5, 28, 180, 1320, 10920, 100800, 1028160, 11491200, 139708800, 1836172800, 25945920000, 392302310400, 6320426112000, 108101081088000, 1956280854528000, 37347179950080000, 750144785854464000, 15813863053148160000, 349121438173347840000
Offset: 2
References
- 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 = 2..445
- J. Francon, Histoires de fichiers, RAIRO Informatique Théorique et Applications, 12 (1978), 49-62.
- J. Francon, Histoires de fichiers, RAIRO Informatique Théorique et Applications, 12 (1978), 49-62. (Annotated scanned copy)
Crossrefs
Cf. A014484.
Programs
-
Magma
[(2*n-1)*Factorial(n)/6: n in [2..40]]; // G. C. Greubel, Jan 08 2025
-
Mathematica
Table[(2n-1)/6*n!,{n,2,30}] (* Harvey P. Dale, Jan 06 2014 *)
-
Python
def A006157(n): return (2*n-1)*factorial(n)//6 print([A006157(n) for n in range(2,41)]) # G. C. Greubel, Jan 08 2025
Formula
a(n) = (2n-1)/6 * n!.
E.g.f.: x^2*(3-x)/(6*(1-x)^2). - Emeric Deutsch and Ira M. Gessel, Sep 07 2004
Extensions
More terms from Harvey P. Dale, Jan 06 2014
Comments