|
|
A140315
|
|
Numbers n such that n!/n#-1 and n!/n#+1 is a twin prime pair.
|
|
4
|
|
|
|
OFFSET
|
4,1
|
|
COMMENTS
|
4,5 and 280,281 result in the same respective twin prime pairs. Using gmp, testing n < 4000, the last 3-prp found was the 8897 digit 3-prp, 3337!/3337#-1.
|
|
LINKS
|
|
|
FORMULA
|
n# is the primorial function A034386(n).
|
|
EXAMPLE
|
8!/8#-1 = 191,8!/8#-1 = 193. 191 and 193 form a twin prime pair.
|
|
MATHEMATICA
|
Primorial[n_] := Product[Prime[i], {i, 1, PrimePi[n]}];
Select[Range[
1000], (p = (#! / Primorial[#]);
PrimeQ[p + 1] && PrimeQ[p - 1]) &] (* Robert Price, Oct 11 2019 *)
|
|
PROG
|
(PARI) g(n) = for(x=1, n, y=x!/primorial(x)-1; z=nextprime(y+1); if(ispseudoprime(y)&&z-y==2, print1(x", "))) primorial(n) = \ The product of primes <= n using the pari primelimit. { local(p1, x); if(n==0||n==1, return(1)); p1=1; forprime(x=2, n, p1*=x); return(p1) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
hard,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|