login
A132371
a(n) = n! - Sum_{j=1..n-1} j!.
3
1, 1, 3, 15, 87, 567, 4167, 34407, 316647, 3219687, 35878887, 435046887, 5704064487, 80428314087, 1213746099687, 19521187251687, 333363035571687, 6024361885107687, 114864714882483687, 2304476522241459687, 48529614677597619687, 1070348458111786419687
OFFSET
1,3
LINKS
FORMULA
From G. C. Greubel, May 02 2021: (Start)
a(n) = A000142(n) - A007489(n-1).
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