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!.

This page as a plain text file.
%I A132371 #18 May 03 2021 01:25:06
%S A132371 1,1,3,15,87,567,4167,34407,316647,3219687,35878887,435046887,
%T A132371 5704064487,80428314087,1213746099687,19521187251687,333363035571687,
%U A132371 6024361885107687,114864714882483687,2304476522241459687,48529614677597619687,1070348458111786419687
%N A132371 a(n) = n! - Sum_{j=1..n-1} j!.
%H A132371 G. C. Greubel, <a href="/A132371/b132371.txt">Table of n, a(n) for n = 1..440</a>
%F A132371 From _G. C. Greubel_, May 02 2021: (Start)
%F A132371 a(n) = A000142(n) - A007489(n-1).
%F A132371 a(n) = n! - A003422(n) + 1. (End)
%p A132371 seq(factorial(n)-(sum(factorial(j),j=1..n-1)),n=1..22); # _Emeric Deutsch_, May 26 2008
%t A132371 With[{fctrls=Range[30]!},Table[fctrls[[n]]-Total[Take[fctrls, n-1]], {n,30}]] (* _Harvey P. Dale_, Feb 27 2012 *)
%t A132371 Table[n! -Sum[j!, {j, n-1}], {n, 30}] (* _G. C. Greubel_, May 02 2021 *)
%o A132371 (Magma) A132371:= func< n | n eq 1 select 1 else  Factorial(n) - (&+[Factorial(j): j in [1..n-1]]) >;
%o A132371 [A132371(n): n in [1..30]]; // _G. C. Greubel_, May 02 2021
%o A132371 (Sage) [factorial(n) - sum(factorial(j) for j in (1..n-1)) for n in (1..30)] # _G. C. Greubel_, May 02 2021
%Y A132371 Cf. A000142, A003422, A007489, A140709.
%K A132371 nonn
%O A132371 1,3
%A A132371 _Ben Branman_, Nov 09 2007
%E A132371 Corrected and extended by _N. J. A. Sloane_, Nov 11 2007
%E A132371 Better definition from _Emeric Deutsch_, May 26 2008