OFFSET
1,1
COMMENTS
The term a(11) has 129 digits which is too large to show in data section.
a(15) has 1081 digits, hence not included in b-file.
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
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..14
EXAMPLE
m = 2: m! - (m + 1)! + (m + 2)! - 1 = 19 which is prime, hence appears in the sequence.
m = 6: m! - (m + 1)! + (m + 2)! - 1 = 35999 which is prime, hence appears in the sequence.
MATHEMATICA
Select[Table[n! - (n + 1)! + (n + 2)! - 1, {n, 200}], PrimeQ[#] &]
PROG
(PARI)
for(n=1, 200, s=n!-(n+1)!+(n+2)!-1; if(ispseudoprime(s), print1(s, ", "))) \\ Derek Orr, Aug 10 2014
(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
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
K. D. Bajpai, Jul 25 2014
STATUS
approved