A139439 Numbers n such that primorial(n)/2 + 4 is prime.
1, 2, 3, 4, 7, 18, 21, 70, 76, 323, 340, 556, 572, 3433, 5457, 5897, 10820
Offset: 1
Programs
-
Mathematica
k=1/2;a={};Do[k=k*Prime[n];If[PrimeQ[k+4], Print[n];AppendTo[a, n]], {n, 600}];a (* Vladimir Joseph Stephan Orlovsky, Aug 20 2008; corrected by Ray Chandler, Jun 16 2013 *) Position[#/2+4&/@FoldList[Times, Prime[Range[600]]],?(PrimeQ[#]&)]// Flatten (* The program generates the first 13 terms of the sequence. To generate more, increase the Range constant,but the program may take a long time to run.*) (* _Harvey P. Dale, Mar 20 2021 *)
-
PARI
n=0; t=1/2; forprime(p=2,1e9, n++; t*=p; if(ispseudoprime(t+4), print1(n", "))) \\ Charles R Greathouse IV, Apr 28 2015
Extensions
a(1)=1 inserted and a(12)-a(13) from Ray Chandler, Jun 16 2013
a(14)-a(16) from Robert Price, Nov 11 2016
Comments