wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Right triangles and semiprimes
(Message started by: Christine on Aug 1st, 2014, 10:31am)

Title: Right triangles and semiprimes
Post by Christine on Aug 1st, 2014, 10:31am
I looked at the number of different right triangle with a leg equal to a semiprime less than 100

I found that when the legs are given the values 15,21,33,35,51,55,65,77,85,87,91,93,95
I get exactly four right triangles.

e.g. 15,112,113),(15,20,25),(15,36,39),(8,15,17)

Why do we get four right triangles with these semiprimes?

Title: Re: Right triangles and semiprimes
Post by towr on Aug 1st, 2014, 1:12pm
I can explain at least 3, because you can get at least one right triangle for every odd n. And since an odd semiprime has two odd factors and is itself odd, that gives three.

Any primitive Pythagorean triple can be written as a = m2 - n2,  b = 2mn, c = m2 + n2 for m>n coprime and m-n odd.
So with m=n+1: a = 2n+1, b= [ (2n+1)2 - 1]/2, c =  [ (2n+1)2 + 1]/2

So for an odd semiprime s = p*q
we have at least the following square triangles with side s
q*p, q*[p2 - 1]/2, q*[p2 + 1]/2
p*q, p*[q2 - 1]/2, p*[q2 + 1]/2
p*q, [p2q2 - 1]/2, [p2q2 + 1]/2

[edit]
A fourth triple comes from m,n = (p+q)/2, (p-q)/2
p*q,  [p2 - q2]/2, [p2 + q2]/2

However, it's still possible that for bigger semiprimes there are more triples than these 4.
[/edit]

Title: Re: Right triangles and semiprimes
Post by towr on Aug 1st, 2014, 2:19pm
To get m2 - n2 = p*q, you need p*q = 2nx + x2 (for m = n+x)
Since p<q are prime, either the p is x and n = (q-p)/2, or x=1 and n=(p*q-1)/2
So that gives two primitive triples with p*q as odd leg
And 2 with p and q as odd leg, for a total of 4.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board