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.

A132371 a(n) = n! - Sum_{j=1..n-1} j!.

Original entry on oeis.org

1, 1, 3, 15, 87, 567, 4167, 34407, 316647, 3219687, 35878887, 435046887, 5704064487, 80428314087, 1213746099687, 19521187251687, 333363035571687, 6024361885107687, 114864714882483687, 2304476522241459687, 48529614677597619687, 1070348458111786419687
Offset: 1

Views

Author

Ben Branman, Nov 09 2007

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • Sage
    [factorial(n) - sum(factorial(j) for j in (1..n-1)) for n in (1..30)] # G. C. Greubel, May 02 2021

Formula

From G. C. Greubel, May 02 2021: (Start)
a(n) = A000142(n) - A007489(n-1).
a(n) = n! - A003422(n) + 1. (End)

Extensions

Corrected and extended by N. J. A. Sloane, Nov 11 2007
Better definition from Emeric Deutsch, May 26 2008