OFFSET
1,1
COMMENTS
a^2 + b^2 = p^2 is a primitive Pythagorean triple since the hypotenuse is prime.
c^2 + d^2 = e^2 also appears to be a primitive Pythagorean triple.
EXAMPLE
17 is a term because 15 + 8 = 23 and 15^2 + 8^2 = 17^2 and 17 = 5 + 12 and 5^2 + 12^2 = 13^2.
PROG
(PARI) isok2(p) = {for (k=1, p-1, if (issquare(zz=k^2+(p-k)^2), return (zz); ); ); return(0); }
isok1(p) = {forprime (pp=2, 2*p, for (i=1, pp-1, if (issquare(z=i^2+(pp-i)^2) && (p==sqrtint(z)) && (zz=isok2(p)), return (1); ); ); ); return(0); }
isok(p) = isprime(p) && isok1(p); \\ Michel Marcus, Apr 26 2019
(PARI) \\ uses isok2 from above but much quicker version
is(n)=if(n%4 != 1 || !isprime(n), return(0)); my(v=thue(T, n^2)); for(i=1, #v, if(v[i][1]>0 && v[i][2]>=v[i][1] && isprime(vecsum(v[i])), return(1))); 0; \\ A283391
lista(nn) = T=thueinit('x^2+1, 1); forprime(p=2, nn, if (is(p) && isok2(p), print1(p, ", "))); \\ Michel Marcus, Apr 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Torlach Rush, Apr 23 2019
STATUS
approved