OFFSET
0,3
COMMENTS
Equals row sums of triangle A137948 starting with offset 1. - Gary W. Adamson, Feb 28 2008
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..250
G. V. Milovanovich and A. Petojevich, Generalized Factorial Functions, Numbers and Polynomials, Math. Balkanica, Vol. 16 (2002), Fasc. 1-4.
Alexsandar Petojevic, The Function vM_m(s; a; z) and Some Well-Known Sequences, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7.
FORMULA
a(n) = (n-1) * !n - n! + 1, !n = Sum_{k=0..n-1} k!. - Joe Keane (jgk(AT)jgk.org)
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
MAPLE
b:= proc(n) option remember; `if`(n<0, [0$2],
(q-> (f-> [f[2]+q, q]+f)(b(n-1)))(n!))
end:
a:= n-> b(n-1)[1]:
seq(a(n), n=0..25); # Alois P. Heinz, Feb 13 2022
MATHEMATICA
Join[{0}, Accumulate@ Accumulate@ (Range[0, 19]!)] (* Robert G. Wilson v *)
PROG
(PARI) a(n)=(n-1)*round(n!/exp(1))-n!+1 \\ Charles R Greathouse IV, Feb 24 2011
(Magma) [(k-1)*(&+[Factorial(j): j in [0..k-1]]) - Factorial(k) + 1: k in [1..25]]; // G. C. Greubel, Sep 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved