%I #19 May 30 2016 13:48:47
%S 3,31,45361,3991681,
%T 2516506653355019284889240277665777045474566836669417196965412366518489408149127168000000000000001
%N Primes of the form n! + (n+1)! + 1.
%C The next term has 595 digits. - _Harvey P. Dale_, May 30 2016
%e a(2) = 3! + 4! + 1 = 6 + 24 + 1 = 31.
%e a(3) = 7! + 8! + 1 = 5040 + 40320 + 1 = 45361.
%p 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);
%t lst={};Do[p=n!+(n+1)!+1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jan 27 2009 *)
%t Select[Total[#]+1&/@Partition[Range[0,300]!,2,1],PrimeQ] (* _Harvey P. Dale_, May 30 2016 *)
%o (PARI) for(n=0, 1e3, if(isprime(k=n!+(n+1)!+1), print1(k", "))) \\ _Charles R Greathouse IV_, Feb 14 2011
%Y Indices in A087147. - _Dmitry Kamenetsky_, Oct 21 2008
%K nonn
%O 1,1
%A _Paolo P. Lava_ and _Giorgio Balzarotti_, May 25 2006
%E First term inserted (because 0! + 1! + 1 = 3 is prime) by _Dmitry Kamenetsky_, Oct 21 2008
|