login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A340037
Primes p such that (p^2+q^2)/2 and (q^2 + 2*p*q - p^2)/2 are prime, where q is the next prime after p.
1
3, 5, 13, 199, 419, 421, 1187, 1319, 1693, 1783, 2029, 2069, 2861, 3041, 3559, 3881, 4493, 4523, 4957, 5153, 6359, 7187, 7193, 8171, 8293, 8623, 8719, 8783, 9629, 10631, 12601, 13829, 13831, 15013, 15817, 16183, 16339, 17519, 18169, 18593, 18773, 18913, 19219, 19301, 19379, 19597, 20201, 20533
OFFSET
1,1
COMMENTS
p*q, (q^2-p^2)/2 and (p^2+q^2)/2 are the sides of a right triangle whose hypotenuse and sum of the other two sides are prime.
LINKS
EXAMPLE
a(3) = 13 is a term because it is prime, the next prime is 17, and (13^2+17^2)/2 = 229 and (17^2+2*13*17-13^2)/2 = 281 are prime.
MAPLE
R:= NULL: count:= 0: q:= 3:
while count < 100 do
p:= q; q:= nextprime(q);
if isprime((p^2+q^2)/2) and isprime((q^2+2*p*q-p^2)/2) then
count:= count+1; R:= R, p;
fi
od:
R;
PROG
(PARI) isok(p) = if ((p>2) && isprime(p), my(q=nextprime(p+1)); isprime((p^2+q^2)/2) && isprime((q^2 + 2*p*q - p^2)/2)) \\ Michel Marcus, Dec 27 2020
CROSSREFS
Sequence in context: A087170 A123370 A110407 * A062698 A200769 A128341
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 26 2020
STATUS
approved