OFFSET
1,1
COMMENTS
In other words, the primorial numbers that are considered are those of the form (p + q)/2 where p and q are consecutive primes. Note that the initial values of (p - q)/2 are 1, 1, 1, 23, 239, 191, 331, 373, 1021.
EXAMPLE
5 is a term because 2*3*5*7*11 = 2310 = (2309 + 2311)/2.
8 is a term because 2*3*5*7*11*13*17*19 = 9699690 = (9699667 + 9699713)/2.
MAPLE
P:= 2: count:= 0:
for n from 2 to 500 do
P:= P*ithprime(n);
# first try d=1
if isprime(P+1) then
good:= isprime(P-1);
elif isprime(P-1) then good:= false
else
for d from ithprime(n+1) by 2 do
if igcd(d, P) > 1 then next fi;
if isprime(P+d) then
good:= isprime(P-d); break
elif isprime(P-d) then
good:= false; break
fi
od;
fi;
if good then
count:= count+1;
A[count]:= n;
fi
od:
seq(A[i], i=1..count); # Robert Israel, Aug 29 2016
MATHEMATICA
prim[n_] := Times @@ Prime[Range[n]]; Select[Range[2, 100], Total[NextPrime[(p = prim[#]), {-1, 1}]] == 2*p &] (* Amiram Eldar, May 19 2024 *)
PROG
(PARI) a002110(n) = prod(k=1, n, prime(k));
for(n=2, 1e3, if((nextprime(a002110(n)) - a002110(n)) == (a002110(n) - precprime(a002110(n))), print1(n, ", ")))
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Altug Alkan, Mar 21 2016
STATUS
approved