%I #55 Feb 13 2022 14:45:27
%S 0,1,3,7,17,51,205,1079,6993,53227,462341,4500255,48454969,571411283,
%T 7321388397,101249656711,1502852293025,23827244817339,401839065437653,
%U 7182224591785967,135607710526966281,2696935204638786595,56349204870460046909,1234002202313888987223
%N Apply partial sum operator twice to factorials.
%C Equals row sums of triangle A137948 starting with offset 1. - _Gary W. Adamson_, Feb 28 2008
%C If s(n) is a sequence defined as s(0)=a, s(1)=b, s(n) = n*(s(n-1) - s(n-2)), n>1, then s(n) = n*b - (a(n)-1)*a. - _Gary Detlefs_, Feb 23 2011
%H G. C. Greubel, <a href="/A014144/b014144.txt">Table of n, a(n) for n = 0..250</a>
%H G. V. Milovanovich and A. Petojevich, <a href="http://www.math.bas.bg/infres/MathBalk/MB-16/MB-16-113-130.pdf">Generalized Factorial Functions, Numbers and Polynomials</a>, Math. Balkanica, Vol. 16 (2002), Fasc. 1-4.
%H Alexsandar Petojevic, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL5/Petojevic/petojevic5.html">The Function vM_m(s; a; z) and Some Well-Known Sequences</a>, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7.
%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%F a(n) = (n-1) * !n - n! + 1, !n = Sum_{k=0..n-1} k!. - Joe Keane (jgk(AT)jgk.org)
%F a(n) = convolution(A000142, A001477). - _Peter Luschny_, Jan 21 2012
%F G.f.: x*G(0)/(1-x)^2, where G(k)= 1 + (2*k + 1)*x/( 1 - 2*x*(k+1)/(2*x*(k+1) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 24 2013
%p b:= proc(n) option remember; `if`(n<0, [0$2],
%p (q-> (f-> [f[2]+q, q]+f)(b(n-1)))(n!))
%p end:
%p a:= n-> b(n-1)[1]:
%p seq(a(n), n=0..25); # _Alois P. Heinz_, Feb 13 2022
%t Join[{0}, Accumulate@ Accumulate@ (Range[0, 19]!)] (* _Robert G. Wilson v_ *)
%o (PARI) a(n)=(n-1)*round(n!/exp(1))-n!+1 \\ _Charles R Greathouse IV_, Feb 24 2011
%o (Magma) [(k-1)*(&+[Factorial(j): j in [0..k-1]]) - Factorial(k) + 1: k in [1..25]]; // _G. C. Greubel_, Sep 03 2018
%Y Cf. A000142, A003422, A137948.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_