A088256 Primorial numbers k such that both k-1 and k+1 are prime.
6, 30, 2310
Offset: 1
Examples
210 = primorial(4) is not a member as 209 is composite.
Links
- Chris K. Caldwell, The Top Twenty: Primorial, in the Prime Pages.
- PrimeGrid, PRPNet: Primorial Prime Search - Server Statistics.
Programs
-
Maple
f:= proc(n) local P; P:= mul(seq(ithprime(i),i=1..n)); if isprime(P+1) and isprime(P-1) then P else NULL fi end proc: map(f, [$1..300]); # Robert Israel, Aug 31 2016
-
Mathematica
Select[Times @@ # & /@ Prime@ Range@ Range@ 700, Times @@ Boole@ PrimeQ@ {# - 1, # + 1} == 1 &] (* Michael De Vlieger, Aug 31 2016 *) Select[FoldList[Times,Prime[Range[20]]],AllTrue[#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Mar 31 2023 *)
-
PARI
lista(nn) = for (n=1, nn, pr = prod(i=1, n, prime(i)); if (isprime(pr-1) && isprime(pr+1), print1(pr, ", "))); \\ Michel Marcus, Aug 31 2016
Extensions
Corrected by Ray Chandler, Sep 28 2003
Comments