OFFSET
1,1
COMMENTS
The case where x and y are both squares cannot occur.
LINKS
MathForFun, Pythagorean triples
Chenglong Zou, Peter Otzen, Cino Hilliard, Pythagorean triplets, digest of 6 messages in mathfun Yahoo group, Mar 19, 2005.
EXAMPLE
x=30, y=16, 30^2 + 16^2 = 34^2. 30 is the 1st entry in the list.
PROG
(PARI) pythtrisq(n) = { local(a, b, c=0, k, x, y, z, vy, wx, vx, j); w = vector(n*n+1); for(a=1, n, for(b=1, n, x=2*a*b; y=b^2-a^2; z=b^2+a^2; if(y > 0 & issquare(y), c++; w[c]=x; print(x", "y", "z) ) ) ); vx=vector(c); w=vecsort(w); for(j=1, n*n, if(w[j]>0, k++; vx[k]=w[j]; ) ); for(j=1, 200, print1(vx[j]", ") ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 19 2005
STATUS
approved