OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..440
FORMULA
From G. C. Greubel, May 02 2021: (Start)
a(n) = n! - A003422(n) + 1. (End)
MAPLE
seq(factorial(n)-(sum(factorial(j), j=1..n-1)), n=1..22); # Emeric Deutsch, May 26 2008
MATHEMATICA
With[{fctrls=Range[30]!}, Table[fctrls[[n]]-Total[Take[fctrls, n-1]], {n, 30}]] (* Harvey P. Dale, Feb 27 2012 *)
Table[n! -Sum[j!, {j, n-1}], {n, 30}] (* G. C. Greubel, May 02 2021 *)
PROG
(Magma) A132371:= func< n | n eq 1 select 1 else Factorial(n) - (&+[Factorial(j): j in [1..n-1]]) >;
[A132371(n): n in [1..30]]; // G. C. Greubel, May 02 2021
(Sage) [factorial(n) - sum(factorial(j) for j in (1..n-1)) for n in (1..30)] # G. C. Greubel, May 02 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ben Branman, Nov 09 2007
EXTENSIONS
Corrected and extended by N. J. A. Sloane, Nov 11 2007
Better definition from Emeric Deutsch, May 26 2008
STATUS
approved