OFFSET
1,1
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=16, y=63, 16^2 + 63^2 = 65^2. 16 is the 1st entry in the list.
PROG
(PARI) pythtri(n) = { local(a, b, c=0, k, x, y, z, vx, vy, wx, wyj); wx=wy= vector(n*n); 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 &!isprime(x) &!isprime(y) &!isprime(z), if(gcd(x, y)==1&gcd(x, z)==1&gcd(y, z)==1, c++; wy[c]=y; wx[c]=x; print(x", "y", "z); \ write("pythtri.txt", x", "y", "z); ) ) ) ); vy=vx=vector(c); wy=vecsort(wy); wx=vecsort(wx); for(j=1, n*n, if(wx[j]>0, k++; vx[k]=wx[j]; ); ); for(j=1, 200, if(vx[j+1]<>vx[j], print1(vx[j]", ")) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 19 2005
STATUS
approved