A118913 Primes of the form k! + (k+1)! + 1.
3, 31, 45361, 3991681, 2516506653355019284889240277665777045474566836669417196965412366518489408149127168000000000000001
Offset: 1
Keywords
Examples
a(2) = 3! + 4! + 1 = 6 + 24 + 1 = 31. a(3) = 7! + 8! + 1 = 5040 + 40320 + 1 = 45361.
Crossrefs
Indices in A087147. - Dmitry Kamenetsky, Oct 21 2008
Programs
-
Maple
P:=proc(n) local i, j; for i from 1 by 1 to n do j:=i!+(i+1)!+1; if isprime(j) then print(j); fi; od; end: P(200);
-
Mathematica
lst={};Do[p=n!+(n+1)!+1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 27 2009 *) Select[Total[#]+1&/@Partition[Range[0,300]!,2,1],PrimeQ] (* Harvey P. Dale, May 30 2016 *)
-
PARI
for(n=0, 1e3, if(isprime(k=n!+(n+1)!+1), print1(k", "))) \\ Charles R Greathouse IV, Feb 14 2011
Extensions
First term inserted (because 0! + 1! + 1 = 3 is prime) by Dmitry Kamenetsky, Oct 21 2008
Comments