Let p be a prime number of the form p = 4 n + 1 ( n ∈ N ).
How many different right triangles exist with integer lengths for their legs, such that the hypotenuse is p ?
That is, how many unordered pairs of positive integers { a , b } exist such that a 2 + b 2 = p 2 ?
Example
If p = 1 7 , there is only one pair: { 8 , 1 5 } , because the 8-15-17 triangle is the only kind of right triangle with integer sides and hypotenuse equal to 17.
On the other hand, for p = 6 5 we have two options: a 16-63-65 triangle and a 33-56-65 triangle. However, this does not count because 65 is not a prime number.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Why every 4n+1 prime is equal to the sum of squares
Log in to reply
That is a rather profound result in number theory, known as Fermat's Two-Square Theorem .
Arjen ..the link given in comments doesn't talk of Uniqueness ???
Log in to reply
Suppose that p = a 2 + b 2 and also p = c 2 + d 2 , with a > c even and b < d odd.
Let d = ( a + c ) / 2 , e = ( a − c ) / 2 , f = ( d + b ) / 2 , g = ( d − b ) / 2 . It is easy to check that d e = f g .
Let u = g cd ( d , f ) and v = g cd ( e , g ) , and let x = d / u = e / v , y = e / v = d / u . Then p = a 2 + b 2 = ( d + e ) 2 + ( d − e ) 2 = ( u x + v y ) 2 + ( u y − v x ) 2 = ( u 2 + v 2 ) ( x 2 + y 2 ) , showing that p is not a prime number.
Example: Take p = 6 5 = 8 2 + 1 2 = 4 2 + 7 2 . Then we get
d = 6 , e = 2 , f = 4 , g = 3 ;
u = 2 , v = 1 , x = 3 , y = 2 ;
p = ( 2 2 + 1 2 ) ( 3 2 + 2 2 ) = 5 ⋅ 1 3 .
Problem Loading...
Note Loading...
Set Loading...
Fact 1 : Every primitive Pythagorean triple a 2 + b 2 = c 2 has the form a = u 2 − v 2 , b = 2 u v , c = u 2 + v 2 (after swapping a and b if necessary).
Fact 2 : Every prime number of the form p = 4 n + 1 can be written uniquely as the sum of two non-zero perfect squares.
Combine these:
p = 4 n + 1 = u 2 + v 2 uniquely with u > v ;
let a = u 2 − v 2 and b = 2 u v ;
then a 2 + b 2 = p 2 is the unique Pythagorean triple with the desired property.
Thus there is always a unique solution; the answer is one .
For instance, if p = 1 5 7 then u = 1 1 and v = 4 because 1 1 2 + 6 2 = 1 5 7 ; so we take a = 1 1 2 − 6 2 = 8 5 and b = 2 ⋅ 1 1 ⋅ 6 = 1 3 2 ; then a 2 + b 2 = 8 5 2 + 1 3 2 2 = 2 4 6 4 9 = 1 5 7 2 .