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
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 26 2020
STATUS
approved