OFFSET
1,1
COMMENTS
The short side is 6p+18, the middle side p^2+6p, the long side 6p+18+p^2.
The first few values have more terms == 3 (mod 4) than 1 (mod 4), but this does not appear to be the case for later terms. - Franklin T. Adams-Watters, May 22 2011
FORMULA
If p=6k+5, then the remainders are 7 + 12*k and 25 + 12*k.
If p=6k+1, then the remainders are 7 + 24*k and 25 + 24*k.
EXAMPLE
For p=41 and q=47, the sides are (47^2 - 41^20)/2=264, 41*47=1927 and (41^2 + 43^2)/2=1945; divide 1927 and 1945 through 264 to get remainders 79 and 97. Since both are primes, p=41 is in the sequence.
PROG
(PARI) forprime(p=5, 10000, if(isprime(q=p+6), x=(q^2-p^2)/2; if(isprime(((q^2+p^2)/2)%x)&isprime(p*q%x), print1(p", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, May 20 2011
EXTENSIONS
Corrected and extended by Franklin T. Adams-Watters, May 22 2011
STATUS
approved