|
|
A057706
|
|
Smaller of twin primes whose average is a primorial number.
|
|
5
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
According to Caldwell, the next term, if it exists, has more than 100000 digits. - T. D. Noe, May 08 2012
|
|
LINKS
|
|
|
EXAMPLE
|
(5+7)/2 = 6 = 2*3, (29+31)/2 = 30 = 2*3*5, (2309+2311)/2 = 2310 = 2*3*5*7*11.
|
|
MATHEMATICA
|
Select[FoldList[Times, Prime@ Range@ 40], AllTrue[# + {-1, 1}, PrimeQ] &] - 1 (* Michael De Vlieger, Jul 15 2017 *)
|
|
PROG
|
(Python)
from sympy import isprime, prime, primerange
def auptoprimorial(limit):
phash, alst = 1, []
for p in primerange(1, prime(limit)+1):
phash *= p
if isprime(phash-1) and isprime(phash+1): alst.append(phash-1)
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,bref
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|