--- In

primenumbers@yahoogroups.com,

"san_tan1" <san_tan1@...> wrote:

> is there any general formula for triples (a,b,c) such that

> a,b are mutually prime and both odd and also

> a^2-b^2=c^2

Yes: (4*n^2+1)^2 - (4*n^2-1)^2 = (4*n)^2

> given p,

> p^2= a^2-b^2=c^2-d^2=e^2-f^2.......

> is there any way to generate (a,b) (c,d) ,(e,f)....up

> to any desired no. of duplets such that in each duplet(x,y)

> x,y are both odd and mutually prime

No: for p = 0 mod 4, the number of odd coprime pairs [x,y]

with p = x^2 - y^2 is 2^k where k is the number of distinct

odd prime divisors of p. This procedure will print them all:

{pairs(p)=local(x,y,c,d);if(p%4==0,fordiv(p/2,d,

c=p/2/d;if(c>d,x=c^2+d^2;y=c^2-d^2;if(gcd(x,y)==1,

print([x,y])))));}

pairs(2^3*3^2*5*7*11);

[192099601, 192099599]

[12006241, 12006209]

[7684009, 7683959]

[3920449, 3920351]

[2371681, 2371519]

[1587721, 1587479]

[480649, 479849]

[245809, 244241]

[158041, 155591]

[149521, 146929]

[101161, 97289]

[96889, 92839]

[66529, 60479]

[52369, 44431]

[38329, 26471]

[29401, 9799]

David