%I #19 Sep 08 2022 08:46:08
%S 19,101,35999,327599,3306239,81430271999,24779106953279078399999,
%T 10501089199335077511167999999,
%U 1372369506422963989169318155460666934165503999999999,117024364553755119629556890816711613171571359743999999999
%N Primes of the form n! - (n + 1)! + (n + 2)! - 1.
%C The term a(11) has 129 digits which is too large to show in data section.
%C a(15) has 1081 digits, hence not included in b-file.
%C The first 20 primes are for n = 2, 3, 6, 7, 8, 12, 21, 25, 40, 43, 83, 107, 132, 139, 478, 505, 931, 1516, 1739, 5208. - _Jens Kruse Andersen_, Aug 10 2014
%H K. D. Bajpai, <a href="/A245528/b245528.txt">Table of n, a(n) for n = 1..14</a>
%e m = 2: m! - (m + 1)! + (m + 2)! - 1 = 19 which is prime, hence appears in the sequence.
%e m = 6: m! - (m + 1)! + (m + 2)! - 1 = 35999 which is prime, hence appears in the sequence.
%t Select[Table[n! - (n + 1)! + (n + 2)! - 1, {n, 200}], PrimeQ[#] &]
%o (PARI)
%o for(n=1,200,s=n!-(n+1)!+(n+2)!-1;if(ispseudoprime(s),print1(s,", "))) \\ _Derek Orr_, Aug 10 2014
%o (Magma) [a: n in [0..100] | IsPrime(a) where a is Factorial(n) - Factorial(n + 1) + Factorial(n + 2) - 1 ]; // _Vincenzo Librandi_, Aug 11 2014
%Y Cf. A000040, A049984, A049432.
%K nonn,easy,less
%O 1,1
%A _K. D. Bajpai_, Jul 25 2014