OFFSET
1,1
COMMENTS
The first term that occurs for more than one pair (q,r) is a(11)=1447, which corresponds to (q,r) = (5, 179) and (11, 101).
The first term that occurs for more than two pairs (q,r) is a(2579)=15108791, which corresponds to (q,r) = (17, 755437), (37, 377717), and (2797, 5393).
LINKS
Robert Israel, Table of n, a(n) for n = 1..6030
EXAMPLE
a(3)=439 is in the sequence because q=5 and r=53 are distinct primes with 439=3*q+3*r+q*r and 439, 2*439-3*q=863, 2*439-3*r=719 and 2*439-q*r=613 are all primes.
MAPLE
N:= 10^5: # to get all terms <= N
Primes:= select(isprime, [seq(i, i=3..nextprime(N/8), 2)]):
filter:= proc(p, q, r)
isprime(p*q+2*p*r+2*q*r) and isprime(2*p*q+p*r+2*q*r) and isprime(2*p*q+2*p*r+q*r)
end proc:
p:= 3: R:= {}:
for iq from 2 do
q:= Primes[iq];
if 2*p*q + q^2 >= N then break fi;
for ir from iq+1 do
r:= Primes[ir];
s:= p*q + q*r + p*r;
if s > N then break fi;
if isprime(s) and filter(p, q, r) then
R:= R union {s};
fi;
od od:
sort(convert(R, list));
MATHEMATICA
M = 10^5; (* to get all terms <= M *)
filterQ[p_, q_, r_] := PrimeQ[p q + 2 p r + 2 q r] && PrimeQ[2 p q + p r + 2 q r] && PrimeQ[2 p q + 2 p r + q r];
primes = Select[Table[i, {i, 3, NextPrime[M/8], 2}], PrimeQ];
p = 3; R = {};
For[iq = 2, True, iq++, q = primes[[iq]]; If[2 p q + q^2 >= M, Break[]]; For[ir = iq + 1, True, ir++, r = primes[[ir]]; s = p q + q r + p r; If[s > M, Break[]]; If[PrimeQ[s] && filterQ[p, q, r], R = Union[R, {s}]]]];
R (* Jean-François Alcover, Aug 12 2020, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Oct 28 2019
STATUS
approved