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.

A006157 a(n+1) = (n-1)*a(n) + n*n!.

This page as a plain text file.
%I A006157 M3950 #33 Jan 09 2025 08:02:40
%S A006157 1,5,28,180,1320,10920,100800,1028160,11491200,139708800,1836172800,
%T A006157 25945920000,392302310400,6320426112000,108101081088000,
%U A006157 1956280854528000,37347179950080000,750144785854464000,15813863053148160000,349121438173347840000
%N A006157 a(n+1) = (n-1)*a(n) + n*n!.
%C A006157 Number of ascending runs of length at least two in all permutations of [n]. Example: a(3)=5 because we have (123), (13)2, 3(12), 2(13), (23)1 and 321, where the ascending runs of length at least 2 are shown between parentheses. - _Emeric Deutsch_ and _Ira M. Gessel_, Sep 07 2004
%D A006157 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006157 G. C. Greubel, <a href="/A006157/b006157.txt">Table of n, a(n) for n = 2..445</a>
%H A006157 J. Francon, <a href="http://www.numdam.org/item?id=ITA_1978__12_1_49_0">Histoires de fichiers</a>, RAIRO Informatique Théorique et Applications, 12 (1978), 49-62.
%H A006157 J. Francon, <a href="/A006157/a006157.pdf">Histoires de fichiers</a>, RAIRO Informatique Théorique et Applications, 12 (1978), 49-62. (Annotated scanned copy)
%F A006157 a(n) = (2n-1)/6 * n!.
%F A006157 E.g.f.: x^2*(3-x)/(6*(1-x)^2). - _Emeric Deutsch_ and _Ira M. Gessel_, Sep 07 2004
%t A006157 Table[(2n-1)/6*n!,{n,2,30}] (* _Harvey P. Dale_, Jan 06 2014 *)
%o A006157 (Magma) [(2*n-1)*Factorial(n)/6: n in [2..40]]; // _G. C. Greubel_, Jan 08 2025
%o A006157 (Python)
%o A006157 def A006157(n): return (2*n-1)*factorial(n)//6
%o A006157 print([A006157(n) for n in range(2,41)]) # _G. C. Greubel_, Jan 08 2025
%Y A006157 Cf. A014484.
%K A006157 nonn,easy
%O A006157 2,2
%A A006157 _N. J. A. Sloane_, _Simon Plouffe_
%E A006157 More terms from _Harvey P. Dale_, Jan 06 2014