login
Primes of the form 3*n! + 1.
1

%I #16 Jul 20 2018 12:44:09

%S 7,19,73,2161,15121,1088641,10886401,18681062401,

%T 77556050216654929920001,46533630129992957952000001,

%U 789392510801080590501654036480000001

%N Primes of the form 3*n! + 1.

%H Harry J. Smith, <a href="/A062551/b062551.txt">Table of n, a(n) for n=1,...,15</a>

%t lst={};Do[p=3*n!+1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jan 28 2009 *)

%t Select[3*Range[40]! +1,PrimeQ] (* _Harvey P. Dale_, Jul 20 2018 *)

%o (PARI) for(n=1,40, if(isprime(3*n!+1),print(3*n!+1)))

%o (PARI) { n=0; for (m=0, 10^5, if(isprime(a=3*m! + 1), write("b062551.txt", n++, " ", a); if (n==15, break)) ) } \\ _Harry J. Smith_, Aug 08 2009

%K nonn

%O 1,1

%A _Jason Earls_, Jul 10 2001