Patterns in Pythagoras
2. More Patterns in Right Triangles
and Pythagorean Triples
David W. Hansen
© 2008
1. Introduction
In Part 1. Patterns in Right Triangles and Pythagorean Triples of Patterns in Pythagoras, we proved the Pythagorean Theorem, defined the meaning of primitive right triangle and Pythagorean triple, and discovered many of the properties of these triangles and triples. Here, In Part 2, we shall investigate in detail the individual properties and characteristics of each of the three sides a, b, and c of a primitive right triangle or, equivalently, the three members a, b, and c of a primitive Pythagorean triple.
But before we do this, let’s list the theorems which were proved in Part 1.
Theorem 1 (Pythagorean)
If a and b are the lengths of the two legs of a right triangle ABC, and c is
the length of its hypotenuse, then a2 + b2 = c2 .
____________________________________________________________
Theorem 2
If (a,b,c) is a Pythagorean triple and n is any positive integer, then (na,nb,nc) is
a Pythagorean triple, and the number of Pythagorean triples is infinite.
__________________________________________________________________
Theorem 3
If any two integers in a Pythagorean triple have a common factor, then the third
integer has that factor also.
__________________________________________________________________
Theorem 4
In any primitive Pythagorean triple (a,b,c), a and b must be of opposite parity
(one must be odd and the other even) with c odd.
_________________________________________________________________
Theorem 5 (The Generating Formulas)
Let m and n be positive integers of opposite parity with no common factors and
m > n. Then, for all primitive Pythagorean triples (a, b, c),
a = m2 - n2, b = 2mn, and c = m2 + n2.
_________________________________________________________________
Theorem 6
In any primitive Pythagorean triple (a, b, c),
1) b + c = (m + n)2 and c - b = (m - n)2, both of which are perfect squares.
Their square roots are factors of a.
2) if c = b + 1, (m = n + 1), then the square root of b + c equals a, and
(a, b, c) is said to be a complete Pythagorean triple.
3) (c + a) / 2 and (c - a) / 2 are perfect squares. Their square roots are
factors of b.
4) (c + a) / b = m / n and (c – a) / b = n / m.
________________________________________________________________
Theorem 7a
In a primitive Pythagorean triple (a,b,c) or right triangle with integral sides
a, b, and c, 3 is a factor of either a or b, but not both, and is NOT a factor of c.
_________________________________________________________________
Theorem 7b
In a primitive Pythagorean triple (a,b,c), or right triangle with integral sides
a, b, and c, 5 is a factor of one and only one of the a, b, or c.
____________________________________________________________
Theorem 8
In a primitive Pythagorean triple (a, b, c), 12 is a factor of ab, and 60 is a factor of abc.
In a primitive right triangle the product of the lengths of its two legs is divisible by 12,
and the product of the lengths of its three sides is divisible by 60.
_______________________________________________________________________________
Theorem 9
Any complete right triangle with odd leg a has a perimeter P = a(a + 1).
___________________________________________________________
Theorem 10
In a primitive Pythagorean triple (a,b,c) or right triangle with sides a, b, and c,
the value of a may be any odd positive integer greater than 1. For any given
value of a, a complete Pythagorean triple or right triangle having this a as a
member may be found by using b = (a2 - 1)/2, and c = b + 1.
______________________________________________________________
Theorem 11
For any complete right triangle with sides a, b, and c, the ratio of its area to the
perimeter P is given by A/P = n/2, where n = (a – 1)/2. Thus, A/P = (a – 1)/4.
_________________________________________________________________
Also from Part 1, we list Table 1, which gives us the values of a, b, and c together with their corresponding values of m, n, and a + b + c, for some primitive right triangles and Pythagorean triples.
Table 1
Primitive Right Triangles and Pythagorean Triples
a b c Perimeter
m n m2 - n2 2mn m2 + n2 a+b+c
---------------------------------------------------------------------------------------------
2 1 3 4 5 12
3 2 5 12 13 30
4 1 15 8 17 40
4 3 7 24 25 56
5 2 21 20 29 70
5 4 9 40 41 90
6 1 35 12 37 84
6 5 11 60 61 132
7 2 45 28 53 126
7 4 33 56 65 154
7 6 13 84 85 182
8 1 63 16 65 144
8 3 55 48 73 176
8 5 39 80 89 208
8 7 15 112 113 240
9 2 77 36 85 198
9 4 65 72 97 234
9 8 17 144 145 306
10 1 99 20 101 220
----------------------------------------------------------------------------------------------
2. Possible Values for a
The formulas of Theorem 5 give us the values of a, b, and c for all primitive Pythagorean triples and right triangles with integral sides. Let’s use the formula for a to find its possible values. As we know, a = m2 - n2, which means that a must be written as a difference of two squares. Shown below are the squares of the first 10 positive integers and their differences.
Squares: 12 22 32 42 52 62 72 82 92 102
Differences: 3 5 7 9 11 13 15 17 19
Note that the difference between any two consecutive squares is always an odd positive integer; that is
a m2 - n2 m n a m2 - n2 m n
------------------------------------------------------------------------------------------------------------------
3 22 - 12 2 1 11 62 - 52 6 5
5 32 - 22 3 2 13 72 - 62 7 6
7 42 - 32 4 3 15 82 - 72 8 7
9 52 - 42 5 4 17 92 - 82 9 8
Looking at these equations, we see that, in general, m = n + 1. And, if m = n + 1, then
a = m2 - n2 = (n + 1)2 - n2 = n2 + 2n + 1 - n2,
or a = 2n + 1. (1)
Since n may be any positive integer, this last equation tells us that a may be any odd positive integer greater than 1. Rewriting (1) as 2n + 1 = a and solving for n, we get
2n + 1 = a, 2n = a - 1, and n = (a - 1)/2. (2a)
Substituting the value of n from (2a) into the equation m = n + 1, we have
m = n + 1, m = (a-1)/2 + 1, m = (a-1)/2 + 2/2, and m = (a + 1)/2. (2b)
Thus, to find a primitive Pythagorean triple (a,b,c) for a specific value of a, simply use
m = (a + 1)/2 and n = (a - 1)/2 (3)
and then the formulas of Theorem 5. Let’s look at two examples.
Example 1. Find a primitive Pythagorean triple (a,b,c) with a = 11. Since a is an odd integer > 1, we use equations (3) above with a = 11 to get m = (11+1)/2 = 6 and n = (11-1)/2 = 5. Then, from Theorem 5, we have
a = m2 - n2 = 62 - 52 = 36 - 25 = 11,
b = 2mn = 2(6)(5) = 60,
and c = m2 + n2 = 62 + 52 = 36 + 25 = 61.
Thus, (11,60,61) is a primitive Pythagorean triple with a = 11.
Example 2. Find the integral lengths of the sides and hypotenuse of a right triangle with one leg of length 15.
Using (3) above with a = 15, we have m = (15+1)/2 = 8 and n = (15-1)/2 = 7. Then, from Theorem 5,
a = m2 - n2 = 82 - 72 = 64 - 49 = 15,
b = 2mn = 2(8)(7) = 112,
and c = m2 + n2 = 82 + 72 = 64 + 49 = 113.
So, the two legs have lengths of 15 and 112, and the length of the hypotenuse is 113. The corresponding Pythagorean triple is (15,112,113).
Now, notice that in both examples, c was one greater than b. Is this always the case if m = n + 1? Let’s see.
Since m = n + 1, b = 2mn = 2(n+1)n = 2n2 + 2n (4)
and c = m2 + n2 = (n+1)2 + n2 = n2 + 2n + 1 + n2 = 2n2 + 2n + 1. (5)
Comparing (4) and (5), we see that c is indeed one greater than b. This gives us
Theorem 12
In any primitive Pythagorean triple (a,b,c) or right triangle with integral sides a, b, and c, a may be any odd
positive integer > 1. To find a triple or triangle to which a belongs, substitute the values of m = (a + 1)/2
and n = (a - 1)/2 into a = m2 – n2, b = 2mn , and c = m2 + n2. Then m = n + 1 and c = b + 1.
______________________________________________________________________________________
Note that Theorem 12 is equivalent to Theorem 10 of Part I, but stated somewhat differently.
Now it must be pointed out that the formulas for m and n in Theorem 12 do NOT give ALL the Pythagorean triples or right triangles to which a given odd integer a might belong. For instance, in Example 2 above for a = 15, we found the triple (15,112,113). However, 15 is also a member of the triple (15,8,17) as shown above in Table 1. Thus, for some values of a, more than one triple containing a will exist. How can we determine if a certain value of a is a member of more than one Pythagorean triple? And can we find a formula which tells us how many primitive Pythagorean triples or right triangles contain a given value of a as a member? These are interesting and important questions which we shall now try to answer.
First, notice that when a = 11, we can write it in one and only one way as a product of two factors; namely,
11 = 11 x 1, and we found in Example 1 for a = 11 that m = (11 + 1)/2 and n = (11 - 1)/2. Thus, we see that to find m and n, we must take one-half the sum or difference of the two factors of a.
Second, for a = 15, we can write it in TWO different ways as a product of two factors; namely, 15 = 15 x 1
and 15 = 5 x 3.
a) Using the factors of 15 and 1, and finding one-half the sum and difference of these two factors of 15, we get
m = (15+1)/2 = 8 and n = (15-1)/2 = 7. As shown above in Example 2, this gives us the triple (15,112,113).
b) Using the factors of 5 and 3, and finding one-half the sum and difference of these two factors, we get
m = (5+3)/2 = 4 and n = (5-3)/2 = 1.
Now, will these values of m and n give us another primitive Pythagorean triple with a = 15 as a member? Let’s see. We have
a = m2 - n2 = 42 - 12 = 16 - 1 = 15, (which indeed is a)
b = 2mn = 2(4)(1) = 8,
and c = m2 + n2 = 42 + 12 = 16 + 1 = 17,
giving us(15,8,17) as a SECOND primitive Pythagorean triple with 15 as a member. This is truly fascinating! It appears that by writing a as a product of two factors and using one-half their sum and difference as the values of m and n, we can obtain a primitive Pythagorean triple with a as member. Let’s see if this is always true.
Accordingly, we let a be a product of two positive integers p and q. Thus, a = pq. Now, from Theorem 5, we know that a = m2 – n2. Thus, m2 – n2 = pq,
and (m + n)(m – n) = pq.
Now can we simply pick m+n = p and m – n = q? Let’s think about this.
Suppose we have two integers r and s with r > s whose product is 45. Then rs = 45 = 9(5) = 15(3) = 45(1). Could
r = 9 and s = 5? Of course. Must r = 9 and s = 5? No, r could be 15 and s could be 3, or r could be 45 and s could be 1. But whatever r and s may be, their values can only be found by considering all of the possible factorizations of 45. So, if pq represents all of these possible factorizations of 45 (with p > q), then r = p and s = q.
Similarly, if we let pq represent all factorizations of a into two factors, then to find all possible values for m and n, we may take
m + n = p and m – n = q.
Adding these two equations, we get 2m = p + q or m = (p + q)/2, and subtracting
the second equation from the first, we get 2n = p – q or n = (p - q)/2.
Since a ( = pq) is odd, both p and q will be odd, for if one or both were even, then a would be even. So both p + q and p - q are even, and thus divisible by 2, ensuring that m and n are both integers as required. Note that p must be greater than q for n to be a positive integer. Thus, all possible values for a = pq may be found by using m = (p + q)/2 and n = (p - q)/2, where p > q. But, will these values for m and n give us a primitive Pythagorean triple? Let’s see.
First, do these values give us a? Well, a = m2 - n2 = [(p + q)/2]2 - [(p - q)/2]2 = (p + q)2/4 - (p-q)2/4 =
[(p + q)2 - (p - q)2] / 4 = (p2 + 2pq + q2 - p2 + 2pq - q2) /4 = 4pq/4 = pq = a. So, yes, these values for m and n do give us a as a member of the triple. However, for (a,b,c) to be a PRIMITIVE Pythagorean triple, we must show that m and n have NO common factors, are of opposite parity, and that m is greater than n.
Common factors
Looking closely at m = (p + q)/2 and n = (p - q)/2, it appears that if p and q have any common factors, then m and n will also. To see this, let p and q have a common factor f. Then, there are integers g and h such that p = fg
and q = fh. Thus,
m = (p + q)/2 = (fg + fh)/2 = f(g + h)/2,
and n = (p - q)/2 = (fg - fh)/2 = f(g - h)/2,
which shows that both m and n have a factor of f. But, m and n must NOT have any common factors, so p and q must NOT either. Thus, in finding primitive Pythagorean triples, p and q must have NO common factors.
Now, let m = (p + q)/2 and n = (p - q)/2, where p and q have NO common factors. We must show that
m and n have NO common factors. Let’s assume that m and n DO have a common factor, say f. Then there are
integers g and h such that (p + q)/2 = fg and (p - q)/2 = fh.
Multiplying these two equations by 2, we get p + q = 2fg and p - q = 2fh. Adding and
subtracting these last two equations gives us 2p = 2fg + 2fh and 2q = 2fg - 2fh,
or p = f(g + h) and q = f(g - h),
which shows us that both p and q have a common factor of f. But, we know that p and q have NO common factors. So, our assumption that m and n have a common factor is false. Thus, we have proved that if p and q have no common factors, then m and n will have NO common factors.
Parity
For m and n to be of opposite parity, one must be odd and one must be even. Letting a = pq, we see that since a is always odd, both p and q must be odd, for if either one were even, then a would be even. So, let p = 2j+1
and q = 2k+1 for some integers j and k. Then
m = (p + q)/2 = (2j+1 + 2k+1)/2 = (2j + 2k + 2)/2,
or m = j + k + 1. (6)
Also, n = (p - q)/2 = [(2j+1) - (2k+1)] / 2 = (2j + 1 - 2k - 1)/2 = (2j - 2k)/2,
or n = j - k. (7)
Now. let’s consider the following three cases.
A. If both j and k are even, then j + k and j - k are even. So, m = j + k + 1 is odd, and n = j - k is even. Thus, m and n are of opposite parity.
B. If both j and k are odd, then j + k and j - k are even. So, m = j + k + 1 is odd, and n = j - k is even. Thus, m and n are of opposite parity.
C. If j is odd and k is even OR if j is even and k is odd, then both j + k and j - k are odd. So, m = j + k + 1 is even, and n = j - k is odd. Thus, m and n are of opposite parity.
So, in all possible cases (A, B, and C), m and n have opposite parity.
m > n Since p and q are both positive integers, we have
q > - q, (a positive integer > a negative integer)
p + q > p - q, (adding p to both sides)
(p + q)/2 > (p - q)/2, (dividing both sides by 2)
and m > n. (substitution, m = (p + q)/2 and n = (p - q)/2)
So, we have shown that m and n have NO common factors, are of opposite parity, and m > n, proving
Theorem 13a
If a = pq, where p and q are odd positive integers (p > q) with NO common factors,
then m = (p + q)/2 and n = (p - q)/2 have NO common factors, are of opposite
parity with m > n, and yield a primitive Pythagorean triple with a as member.
____________________________________________________________________
Using the values of m and n from Theorem 13a, we find that
b = 2mn = 2[(p + q)/2] [(p – q)/2] = (p2 – q2)/2,
and c = m2 + n2 = [(p + q)/2]2 + [(p – q)/2]2 = (p2 + 2pq + q2 + p2 – 2pq + q2)/4
= (2p2 + 2q2)/4 = (p2 + q2)/2, giving us
Theorem13b
If a = pq, where p and q are odd positive integers (p > q) with NO common factors,
then b = (p2 – q2)/2 and c = (p2 + q2)/2 yield a primitive Pythagorean triple (a, b, c)
containing a as a member.
____________________________________________________________________
Theorems 13a and 13b enable us to find ALL primitive Pythagorean triples or right triangles for a given value of a. Here’s an example.
Example 3. Find the lengths of the sides of ALL primitive right triangles which have a leg of length 105. Since 105 is odd, it is the length of leg a, which can be written as a product of three primes; namely, 105 = 7 x 5 x 3. But, to use Theorems 13a or 13b, we must write 105 as a product of just two odd integers with NO common factors.
Here’s how.
105 = 7 x 5 x 3 = 105 x 1 = 35 x 3 = 21 x 5 = 15 x 7.
Note that we first picked all three of the prime factors and then chose them two at a time. Using Theorem 13a, we have
a =105 x 1 m = (105+1)/2 = 53 a = m2 - n2 = 532 - 522 = 105
n = (105 -1)/2 = 52 and b = 2mn = 2 x 53 x 52 = 5512
c = m2 + n2 = 532 + 522 = 5513
Thus, a = 105, b = 5512, and c = 5513 for the first right triangle.
a=35 x 3 m = (35+3)/2 = 19 a = m2 - n2 = 192 -162 = 105
n = (35-3)/2 = 16 and b = 2mn = 2 x 19 x 16 = 608
c = m2 + n2 = 192 + 162 = 617
Thus, a = 105, b = 608, and c = 617 for the second right triangle.
a=21 x 5 m = (21+5)/2 = 13 a = m2 - n2 = 132 -82 = 105
n = (21 - 5)/2 = 8 and b = 2mn = 2 x 13 x 8 = 208
c = m2 + n2 = 132 + 82 = 233
Thus, a = 105, b = 208, and c = 233 for the third right triangle.
Now, let’s use Theorem 13b to find the last triangle. This gives us
a=15 x 7 p = 15, q = 7, b = (p2 – q2)/2 = (152 – 72)/2 = (225 – 49)/2 = 88
and c = (p2 + q2)/2 = (152 + 72)/2 = (225 + 49)/2 = 137
Thus, a = 105, b = 88, and c = 137 for the fourth (and last) right triangle.
The number of different right triangles or Pythagorean triples we can get for a given value of a depends upon how many different ways we can combine the prime factors of a into a product of two integers with no common factors.
For example, for a = 105 = 7 x 5 x 3, we can make the following choices for p and q.
Choices for p p q p q
-------------------------------------------------------------------------------------------------
Three primes at a time 7 x 5 x 3 1 105 1
Two primes at a time 7 x 5 3 35 3
7 x 3 5 21 5
5 x 3 7 15 7
One prime at a time 7 5 x 3 7 15
5 7 x 3 5 21
3 7 x 5 3 35
None of the primes 1 7 x 5 x 3 1 105
---------------------------------------------------------------------------------------------------
Note that we have listed all the possibilities for p and q twice. The last four rows in the table above simply repeat the first four rows, but in reverse order.
In general, if a = uvw, where u, v, and w are the prime factors of a, and we wish to write a as a = pq, the choices for p and q are as follows.
a = uvw
Choices for p p q
---------------------------------------------------------------------------------
Three primes at a time uvw 1
Two primes at a time uv w
uw v
vw u
One prime at a time u vw
v uw
w uv
None of the primes 1 uvw
----------------------------------------------------------------------------------
Again, we see we have listed the possibilities twice. Now, what we are doing here is simply finding the number of ways of arranging the three primes, taking them 3 at a time, then 2 at a time, then 1 at a time, and finally none at a time. In combinatorial notation, the total number of arrangements for p and q in the table above is given by C(3,3) + C(3,2) + C(3,1) + C(3,0). Since the possibilities have been listed twice, the number of different ways to select p and q is given by one-half this sum; namely,
(1/2) [ C(3,3) + C(3,2) + C(3,1) + C(3,0) ].
Now, the number of different ways we can select p and q determines the number, N, of different primitive right triangles or Pythagorean triples that exist for a given value of a. So, if a is a product of three prime factors, we have N = (1/2) [C(3,3) + C(3,2) + C(3,1) + C(3,0)].
For a = 1155 = 11 x 7 x 5 x 3, we can make the following choices for p and q.
1155 = 11 x 7 x 5 x 3
Choices for p p q p q
----------------------------------------------------------------------------------------------------
Four primes at a time 11 x 7 x 5 x 3 1 1155 1
Three primes at a time 11 x 7 x 5 3 385 3
11 x 7 x 3 5 231 5
11 x 5 x 3 7 165 7
7 x 5 x 3 11 105 11
Two primes at a time 11 x 7 5 x 3 77 15
11 x 5 7 x 3 55 21
11 x 3 7 x 5 33 35
7 x 5 11 x 3 35 33
7 x 3 11 x 5 21 55
5 x 3 11 x 7 15 77
One prime at a time 11 7 x 5 x 3 11 105
7 11 x 5 x 3 7 165
5 11 x 7 x 3 5 231
3 11 x 7 x 5 3 385
None of the primes 1 11 x 7 x 5 x 3 1 1155
------------------------------------------------------------------------------------------------------
As before, we have listed all the possibilities for p and q twice. The last eight rows in the table above simply repeat the first eight rows, but in reverse order. Note that we have taken the four prime factors 4 at a time, then 3 at a time, then 2 at a time, then 1 at a time, and finally, none at a time. Using combinatorial notation, we can say that if a is a product of four prime factors, then
N = (1/2) [C(4,4) + C(4,3) + C(4,2) + C(4,1) + C(4,0)].
Continuing in this same manner, we find that if a is a product of five prime factors, then
N = (1/2) [C(5,5) + C(5,4) + C(5,3) + C(5,2) + C(5,1) + C(5,0)],
and if a is a product of six prime factors, then
N = (1/2) [C(6,6) + C(6,5) + C(6,4) + C(6,3) + C(6,2) + C(6,1) + C(6,0)].
In general, if a is a product of n prime factors, then
N = (1/2) [C(n,n) + C(n,n-1) + . . . + C(n,2) + C(n,1) + C(n,0)].
Using the Binomial Theorem, the expression in the brackets above can be shown to be equal to 2n. So,
N = (1/2) 2n = 2n - 1.
Thus, we have found a formula for the number of primitive right triangles or Pythagorean triples which have a given value of a as member!
Example 4. How many primitive right triangles exist with a = 231 as one of their legs? Since 231 = 3 x 7 x 11, the number of prime factors of 231 is 3. Using our formula above with n = 3, we find N = 23-1 = 22 = 4. Thus, there are 4 primitive right triangles which have a leg of length 231.
Example 5. Find the number of primitive Pythagorean triples which contain a = 75. Since 75 = 3 x 5 x 5, we see that it is a product of 3 prime factors. However, two of them are the same; that is, 5 is a repeated factor. So, in our formula, do we take n to be 2 or 3? Well, the possible ways to write 75 as a product of two integers p and q is
75 x 1, 25 x 3, and 15 x 5. However, in this last product, 15 x 5, p and q have 5 as a common factor and thus will NOT generate a primitive Pythagorean triple. This is because 5 is a repeated prime factor and can thus appear in both p and q as a common factor. Recall from Theorem 13a and 13b that p and q must have NO common factors. Thus, for 75 = 3 x 5 x 5, we count only the number of distinct prime factors; namely, 3 and 5, not any of the repeated factors. So, n = 2, and N = 2n-1 = 22-1 = 21 = 2. Thus, there are two primitive Pythagorean triples which have a = 75 as a member.
In general, repeated prime factors in the factorization of a do NOT contribute to the number of primitive right triangles or Pythagorean triples which exist for a given a since they will appear as common factors in both p and q, thus preventing p and q from being used in Theorems 13a or 13b. So, In finding the value of n for use in our formula, we must be sure to count only the number of distinct (that is, different) prime factors of a. We have proved the following theorem.
Theorem 14
If n is the number of distinct prime factors of a, and N is the
total number of primitive right triangles or Pythagorean triples
containing a, then N = 2n - 1.
__________________________________________________
Example 6. Find the number of primitive Pythagorean triples which have a = 945 as a member. Since 945 =
3 x 3 x 3 x 5 x 7, there are 3 distinct prime factors, 3, 5, and 7. Thus,n = 3 in Theorem 14, and there are N = 23 - 1 = 4 triples to which 945 belongs. Even though 945 can be written as 945 x 1 = 315 x 3 = 189 x 5 = 135 x 7
= 105 x 9 = 63 x 15 = 45 x 21 = 35 x 27, only those four products which are underlined have no common factors and can thus be used to generate primitive triples.
Summary of Results for a
- a may be any odd positive integer > 1.
- To find a primitive right triangle or Pythagorean triple containing a, write a as a product of two odd integers p and q, where p and q have NO common factors. Then,
1) a = pq, and substituting m = (p + q)/2 and n = (p – q)/2, into b = 2mn, and c = m2 + n2, yields a primitive right triangle or triple (a, b, c) containing a, or
2) a = pq, b = (p2 – q2)/2, and c = (p2 + q2)/2 provides a primitive right triangle or triple (a, b, c) containing a.
- The total number, N, of primitive right triangles or Pythagorean triples which contain a is given by N = 2n-1, where n is the number of distinct prime factors in the prime factorization of a.
3. Possible Values for b
We have found that b = 2mn, where one of the m and n is odd, and one is even. Let’s say that the n is even. Then, n = 2k for some integer k, and b = 2mn = 2m(2k) = 4mk. This shows that b has a factor of 4 and is thus divisible by 4. (The result would be the same if we had picked m to be even.) b, of course, is even because
b = 2mn shows it has a factor of 2. Thus, if b is to be a side of a primitive right triangle or a member of a primitive Pythagorean triple, b must be an even positive integer divisible by 4.
To find the values for m and n which generate a primitive right triangle or Pythagorean triple with b as member, we divide both sides of b = 2mn by 2 to get b/2 = mn. We then simply pick any two integers for m and n whose product is b/2, remembering that m and n must have no common factors and be of opposite parity with m > n.
Example 1. Find all primitive Pythagorean triples with b = 60. If b = 60, then b/2 = mn = 30. Since 30 = 2 x 3 x 5, we must find all possible ways to write these three prime factors as a product of the two integers, m and n. Here are the ways.
Choices for m m n m n
----------------------------------------------------------------------------------------------
Three primes at a time 2 x 3 x 5 1 30 1 ♦
Two primes at a time 3 x 5 2 15 2 ♦
2 x 5 3 10 3 ♦
2 x 3 5 6 5 ♦
One prime at a time 5 3 x 2 5 6
3 5 x 2 3 10
2 5 x 3 2 15
No primes at a time 1 5 x 3 x 2 1 30
----------------------------------------------------------------------------------------------
Notice that we have listed the possible choices twice. The last 4 rows are the same as the first 4 except in reverse order. The values for m and n marked with a ♦ above provide us with 4 triangles or triples containing b = 60. They are
m = 30, n = 1: a = 302 - 12 = 900 - 1 = 899, b = 2(30)(1) = 60,
c = 302+ 12 = 900 + 1 = 901 or (899, 60, 901)
m = 15, n = 2: a = 152 - 22 = 225 - 4 = 221, b = 2(15)(2) = 60,
c = 152+ 22 = 225+ 4 = 229 or (221, 60, 229)
m = 10, n = 3: a = 102 - 32 = 100 - 9 = 91, b = 2(10)(3) = 60,
c = 102+ 32 = 100+ 9 = 109 or (91, 60, 109)
m = 6, n = 5: a = 62 - 52 = 36 - 25 = 11, b = 2(6)(5) = 60,
c = 62+ 52 = 36 + 25 = 61 or (11, 60, 61)
Now, in the table above, we see that by choosing 3 primes at a time, then 2 primes at a time, then 1 prime at a time, and finally, no primes at a time, the total number of choices for m and n is given by C(3,3) + C(3,2) + C(3,1) + C(3,0). Thus, the total number of primitive right triangles or Pythagorean triples, N, which contain b as a member, is one-half this amount, since we counted the possibilities twice.
If b/2 has 3 prime factors in its factorization, then
N = (1/2) [C(3,3) + C(3,2) + C(3,1) + C(3,0)],
and in general, if b/2 has n distinct prime factors, then
N = (1/2) [C(n,n) + C(n,n-1) + . . . + C(n,1) + c(n,0)].
Since the expression in the brackets above equals 2n, we have N = (1/2) 2n, or N = 2n-1.
All of this we have gone over before in Section 2, where we discussed in detail how to write a as a product of two factors p and q. Those ideas and proofs apply here as well. We summarize all of this in the following theorem.
Theorem 15
In any primitive Pythagorean triple (a,b,c) or right triangle with integral sides,
b must be a positive even integer divisible by 4. The number N of triples or
triangles containing b is given by N = 2n-1, where n is the number of distinct
prime factors of b/2.
______________________________________________________________
Example 2. Predict the number of primitive Pythagorean triples containing b = 48, and then find all of them. Since b/2 = 24 = 8 x 3 = 23 x 3, there are two distinct prime factors of b/2. Thus, from Theorem 15, N = 22-1 = 2, telling us there are two triples which contain b = 48. Now , b/2 = 24 = mn = 24 x 1 = 12 x 2 = 8 x 3 = 6 x 4, but only those products of m and n which are underlined have no common factors and are of opposite parity with m > n. Using these, we get
m = 24, n = 1: a = 242 - 12 = 576 - 1 = 575, b = 2(24)(1) = 48,
c = 242+ 12 = 576+ 1 = 577 or (575, 48, 577)
m = 8, n = 3: a = 82 - 32 = 64 - 9 = 55, b = 2(8)(3) = 48,
c = 82+ 32 = 64 + 9 = 73 or (55, 48, 73)
Now, b/2 = mn, and we may choose m = b/2 and n = 1. If we do so, then m = b/2 will always be even since b is divisible by 4, and n = 1 will be odd. Then, m and n will be of opposite parity with no common factors and m > n. In this case,
a = m2 – n2 = (b/2)2 – 12 = b2/4 – 1 ,
and c = m2 + n2 = (b/2)2 + 12 = b2/4 + 1. Comparing these expressions
for a and c, we see that c is always two greater than a. Thus,
------------------------------------------------------------------------------------------------------------------
For any given b, there exists one primitive right triangle or Pythagorean triple (a, b, c)
in which c = a + 2; namely, (b2/4 – 1, b, b2/4 + 1). (1)
------------------------------------------------------------------------------------------------------------------
Example 3. Find a primitive right triangle with b = 28 and its hypotenuse two greater than its other leg. Using (1) above, we have a = b2/4 – 1 = 282/4 – 1 = 196 – 1 = 195, b = 28, and c = b2/4 + 1 = 282/4 + 1 = 196 + 1 = 197.
Thus, the desired triangle has sides a = 195, b = 28, and c = 197.
Summary of Results for b
• In any primitive right triangle or Pythagorean triple (a,b,c), b must be a positive integer divisible by 4.
• The number N of triples or triangles containing b is 2n-1, where n is the number of distinct prime factors
of b/2.
• To find all primitive right triangles or Pythagorean triples containing b as a member, find all those value
of m and n which have no common factors, are of opposite parity with m > n and make mn = b/2.
Then, use a = m2 - n2 and c = m2 + n2.
• Using m = b/2 and n = 1 will always generate a primitive right triangle or Pythagorean triple
containing b with c = a + 2.
4. Possible Values for c
Now, let’s rearrange Table 1 in ascending values of c and look for any patterns in the c-values.
Table 2
Pythagorean Triples
(in ascending values of c)
a b c Perimeter
m n m2 - n2 2mn m2 + n2 a+b+c
----------------------------------------------------------------------------------------------
2 1 3 4 5 12
3 2 5 12 13 30
4 1 15 8 17 40
4 3 7 24 25 56
5 2 21 20 29 70
6 1 35 12 37 84
5 4 9 40 41 90
7 2 45 28 53 126
6 5 11 60 61 132
7 4 33 56 65 154
8 1 63 16 65 144
8 3 55 48 73 176
7 6 13 84 85 182
9 2 77 36 85 198
8 5 39 80 89 208
9 4 65 72 97 234
8 7 15 112 113 240
9 8 17 144 145 306
----------------------------------------------------------------------------------------------
Looking at these values for c, we observe that each value is either a prime or is divisible by 5. Could this be true of all values for c? Possibly so. Let’s see.
From Theorem 5, we know that if c = m2 + n2, where m and n are of opposite parity with no common factors,
then c will be a member of a primitive right triangle or Pythagorean triple. Let’s take m to be odd and n to be even. Then m = 2j+1 and n = 2k for some integers j and k. This gives us
c = m2 + n2 = (2j+1)2 + (2k)2 = 4j2 + 4j + 1 + 4k2 = 4(j2 + j + k2) + 1 = 4L + 1,
where L = j2 + j + k2. This tells us that if c can be written as a sum of two squares, then c must be of the form
4L + 1. (The same result is obtained if we assume m is even and n is odd.) We thus have
Theorem 16
If c can be written as a sum of two squares, m2 + n2, and is thus a member of a
primitive Pythagorean triple or right triangle, then c must be an integer of the
form 4L + 1 for some integer L.
_________________________________________________________________
This gives us our first useful bit of information about c; namely, if c is NOT an integer of the form 4L + 1, then c cannot be written as a sum of two squares and thus cannot be a member of a primitive Pythagorean triple or right triangle.
However, Theorem 16 states only a NECESSARY condition for c. Although c = 13 = 4(3) + 1, c = 29 =
4(7) + 1, and c = 65 = 4(16) + 1 are all of the form 4L+1 and are members of Pythagorean triples and right triangles, the value c = 9 = 4(2) + 1, which is also of the form 4L+1, is NOT a member of any Pythagorean triple or right triangle. Therefore, the converse of Theorem 16; namely, if c is of the form 4L+1, then c can be written as a sum of two squares and is thus a member of a primitive Pythagorean triple or right triangle, is FALSE.
To find if a given value for c is a member of a primitive Pythagorean triple or right triangle, we must do the following:
a) If c cannot be written in the form 4L+1 for some integer L, then c cannot be written as a sum of two squares and is thus NOT a member of any primitive Pythagorean triple or right triangle.
b) Since c = m2 + n2, then n2 = c - m2, (1)
which shows that c - m2 must be a perfect square (it equals n2). Since m and n are of opposite parity, let’s take m odd and n even and substitute the odd values of 1, 3, 5, . . . for m into (1) above until c - m2 becomes a perfect square. Then, for that particular value of m, the value of n will be the square root of c - m2, and using these values of m and n, we get a and b from a = m2 - n2 and b = 2mn.
c) If none of the values for m make c - m2 a perfect square, then c cannot be written as a sum of two squares and is NOT a member of any primitive Pythagorean triple or right triangle.
Example 1. Let c = 35. Since 35 = 4(8) + 3, it cannot be written in the form 4L+1. Thus, c = 35 is not a member of any primitive Pythagorean triple or right triangle.
Example 2. Let c = 29. Since c = 4(7) + 1, it is in the proper form 4L + 1. Making a table of values with c - m2
= 29 - m2, we get
_______
m 29 - m2 n = Ö 29 - m2
----------------------------------------------------------------------
1 29 - 1 = 28 -
3 29 - 9 = 20 -
5 29 - 25 = 4 2
So, for m = 5 and n = 2, we have a = m2 – n2 = 52 – 22 = 21, b = 2mn = 2(5)(2) = 20, and c = m2 + n2
= 52 + 22 = 29, giving us (21, 20, 29) as a primitive Pythagorean triple with c = 29.
Example 3. Let c = 9. Since c = 4(2) + 1, it is in the proper form 4L + 1, and making a table of values with c - m2
= 9 - m2, we get ______
m 9 - m2 n = Ö 9 - m2
---------------------------------------------------------------------
1 9 - 1 = 8 -
3 9 - 9 = 0 0
Since there are no positive integer values for n, c = 9 is not a member of any primitive Pythagorean triple or right triangle (even though c is in the proper form 4L + 1).
Example 4. Let c = 65. Since c = 4(64) + 1, it is in the proper form, and making a table of values with c - m2 = 65 - m2, we get
_______
m 65 - m2 n = Ö 65 - m2
----------------------------------------------------------------------
1 65 - 1 = 64 8
3 65 - 9 = 56 -
5 65 - 25 = 40 -
7 65 - 49 = 16 4
For m = 1, we get n = 8. Since m must be greater than n in order for a to be positive, we interchange m and n to get m = 8 and n = 1. Then, a = m2 - n2 = 82 - 12 = 63, b = 2mn = 2(8)(1)= 16, and c = m2 + n2 = 82 + 12 = 65, giving us (63, 16, 65) as a primitive Pythagorean triple with c = 65.
For m = 7 and n = 4, we have a = m2 - n2 = 72 - 42 = 33, b = 2mn = 2(7)(4) = 56, and c = m2 + n2 = 72 + 42 = 65. Thus, (33, 56, 65) is another primitive Pythagorean triple with c = 65. (Note that c = 65 is a member of two primitive Pythagorean triples or triangles.)
Now, suppose that c is a product of TWO integers, p and q, and each can be written as a sum of two squares, say p = r2 + s2 and q = u2 + v2. Then, by Theorem 16, both p and q are of the form 4L+1, and we have
c = pq = (r2 + s2) (u2 + v2). (2)
If we could somehow find a way to write this product of squares as a sum of squares, then c would be a member of a primitive Pythagorean triple.
Now, (r2 + s2) (u2 + v2) = r2u2 + r2v2 + s2u2 + s2v2,
or by rearranging terms, = ( r2u2 + s2v2 ) + (r2v2 + s2u2 ). (3)
The expression inside the left-hand set of parentheses in (3) appears to be (ru + sv)2, but we know this is not true, since (ru + sv)2 = r2u2 + 2rusv + s2v2. We are missing the middle term of 2rusv in this set. Let’s add 2rusv to this left-hand set of parentheses, and to compensate for this addition, we will subtract the same term from the right-hand set of parentheses in (3) above, giving us
c = ( r2u2 + 2rusv + s2v2 ) + ( r2v2 - 2rusv + s2u2 ).
= (ru + sv)2 + (rv - su)2.
This is great, because the left-hand set of parentheses is now (ru + sv)2, and the right-hand set is, amazingly,
(rv - su)2! Thus, we have proved that a product of squares can be written as a sum of squares; namely
c = pq = (r2 + s2) (u2 + v2) = (ru + sv)2 + (rv - su)2 = m2 + n2, a sum of two squares,
where m = ru + sv and n = rv - su. (4)
However, for c to be a member of a primitive Pythagorean triple or right triangle, m and n must have no common factors and be of opposite parity. Let’s see if this is so.
Common Factors
Assume that f is a common factor of m = ru + sv and n = rv - su. Then, ru + sv = fg and rv – su = fh for some integers g and h. Squaring these two equations gives us
r2u2 + 2rusv + s2v2 = f2 g2,
and r2v2 - 2rusv + s2u2 = f2 h2.
Adding these last two equations gives us
r2u2 + r2v2 + s2v2 + s2u2 = f2 g2 + f2 h2,
and, by factoring common factors and rearranging terms, we get
r2 (u2 + v2) + s2(u2 + v2) = f2 (g2 + h2).
Factoring out (u2 + v2) from the two terms on the left-hand side of the equation above, gives us
(r2 + s2) (u2 + v2) = f2 (g2 + h2),
or, from (2) above, c = pq = f2 (g2 + h2).
This last equation tells us that f2 is a factor of c. So, c = f2 w for some integer w, and since c may be written as c = f(fw) = pq, where p = f and q = fw, then p and q may have a common factor of f. Thus, if m and n have a common factor, then c = pq may be written so that p and q have a common factor. But, if we require that p and q have NO common factors, then m and n will have NO common factors. Thus, if p and q have NO common factors, then m = ru + sv and n = rv - su will have NO common factors.
Opposite Parity
Since c = pq is odd, then both p and q are odd. Since p = r2 + s2 and is odd, then r and s are of opposite parity, for if r and s were both even, then r2 and s2 would be even, r2 + s2 would be even, and p = r2 + s2 would be even. But, p is odd. Also, if r and s were both odd, then r2 and s2 would be odd, r2 + s2 would be even, and p again would be even. But, p is odd. So, either r or s must be even and the other odd, and thus they are of opposite parity. The same argument would show us that for q = u2 + v2, u and v are of opposite parity.
Now, m = ru + sv and n = rv - su. To show that m and n are of opposite parity, we will show all the possibilities for r, s, u, v, m, and n in the table below, where O means the integer is odd, and E means the integer is even. Note that
1) if p = 2j (E) and q = 2k+1 (O), then pq = (2j) (2k+1) = 4jk + 2j = 2(2jk + j) (E), so the product of an even integer and an odd integer is even. E x O = E.
2) if p = 2j (E) and q = 2k (E), then pq = (2j) (2k) = 4jk = 2(2jk) (E), so the product of two even integers is even.
E x E = E.
3) if p = 2j+1 (O) and q = 2k+1 (O), then pq = (2j+1) (2k+1) = 4jk + 2j + 2k + 1 = 2(2jk + j + k) + 1 (O), so the product of two odd integers is odd. O x O = O.
r s u v r u + s v m r v – s u n
--------------------------------------------------------------------------------------------------------------------
O E O E OxO + ExE = O + E = O OxE – ExO = E – E = E
O E E O OxE + ExO = E + E = E OxO – ExE = O – E = O
E O O E ExO + OxE = E + E = E ExE – OxO = E – O = O
E O E O ExE + OxO = E + O = O ExO – OxE = E – E = E
Comparing the two columns headed m and n, we see that in every case, m and n are of opposite parity. Thus,
we have shown that m = ru + sv and n = rv - su have no common factors and are of opposite parity, and so
c = (ru + sv)2 + (rv – su)2 is a member of a primitive Pythagorean triple or right triangle.
Now, in (3) above, we could have subtracted 2rusv from the expression in the left-hand set of parentheses and added 2rusv to the expression in the right-hand set of parentheses to obtain
c = ( r2u2 - 2rusv + s2v2 ) + ( r2v2 + 2rusv + s2u2 ),
or c = (ru - sv)2 + (rv + su)2,
= m2 + n2,
which gives us another sum of two squares, with m = ru – sv and n = rv + su.
Using the same arguments given earlier, we can show these values for m and n have no common factors and are of opposite parity, making c = (ru – sv)2 + (rv + su)2 a member of a primitive Pythagorean triple or right triangle. Thus, we have
Theorem 17
If c is a product of two integers p and q which have no common factors and can be written as
a sum of two squares, p = r2 + s2 and q = u2 + v2, and thus are both of the form 4L+1 for some
integer L, then c can be written as a sum of two squares in two different ways, namely
c = pq = (r2 + s2) (u2 + v2)
= (ru + sv)2 + (rv - su)2 = m2 + n2,
and = (ru - sv)2 + (rv + su)2 = m2 + n2,
where m = ru + sv and n = rv – su as well as m = ru – sv and n = rv + su have no common
factors and are of opposite parity. Thus, c will be a member of two primitive Pythagorean triples or
right triangles.
To find the values of m and n corresponding to c, use
(a) m = ru + sv, n = rv - su for one of the triples or triangles, and
(b) m = ru - sv, n = rv + su for the other one.
_________________________________________________________________________________
Now, this is a very powerful theorem because it allows us to use smaller values of c to write larger values of c as a sum of two squares.
Example 5. Let c = 145 = 5(29). To use Theorem 17, we must write 5 and 29 as sums of two squares. Using Table 2, we find that 5 = 22 + 12 = r2 + s2 and 29 = 52 + 22 = u2 + v2, where r = 2, s = 1, u = 5, and v = 2. Substituting the values of c, r, s, u, and v into Theorem 17, we get
c = pq = (r2 + s2) (u2 + v2) = (ru + sv)2 + (rv - su)2 = m2 + n2
145 = 5(29) = (22 + 12)(52 + 22) = (2x5 + 1x2)2 + (2x2 - 1x5)2 = 122 + 12 (a)
= (ru - sv)2 + (rv + su)2 = m2 + n2
= (2x5 - 1x2)2 + (2x2 + 1x5)2 = 82 + 92 (b)
Thus, m = 12, n = 1 from (a), and interchanging m and n so that m > n to make a positive, m = 9, n = 8 from (b).
Using a = m2 - n2, b = 2mn, and c = m2 + n2, we get two triples; namely,
(143, 24, 145) and (17, 144, 145).
Example 6. Let c = 221 = 13(17). From Theorem 17, we have, in general
c = pq = (r2 + s2) (u2 + v2)
= (ru + sv)2 + (rv - su)2 (a)
= (ru - sv)2 + (rv + su)2, (b)
Then, using the m and n values from Table 2, 13 = 32 + 22 and 17 = 42 + 12, and
221 = 13 x 17 = (32 + 22) (42 + 12), (r = 3, s = 2, u = 4, v =1)
= (3x4 + 2x1)2 + (3x1 - 2x4)2 = 142 + 52 = m2 + n2 (a)
and = (3x4 - 2x1)2 + (3x1 + 2x4)2 = 102 + 112 = m2 + n2 (b)
Thus, m = 14, n = 5, (and interchanging m and n so that m > n), m = 11, n = 10. Thus, for 211 = 13 x 17, there are TWO sets of values for m and n, which in turn give us TWO primitive Pythagorean triples to which c = 211 belongs. Using a = m2 - n2, b = 2mn, and c = m2 + n2, the triples are
(171, 140, 221) and (21, 220, 221).
Now what if c is the square of an integer which can be written as a sum of two squares, say c = 625 = 252?Then, 625 = 25(25) = 125(5) cannot be written as a product of two factors with no common factor, and thus Theorem 17 cannot be used. Or can it? Let’s try!
c = 625 = 25 x 25 = (32 + 42) (32 + 42)
= (3x3 + 4x4)2 + (3x4 - 4x3)2 = 252 + 02 = m2 + n2 (a)
= (3x3 - 4x4)2 + (3x4 + 4x3)2 = 72 + 242 = m2 + n2 (b)
It worked! While (a) did not give us any valid values for m and n ( m and n must both be > 0), (b) certainly did. Let’s see if this is always true when c is a perfect square.
Let c = (r2 + s2)2 for some positive integers r and s. Then,
c = (r2 + s2)2 = (r2 + s2) (r2 + s2) = ( rr + ss )2 + ( rs - sr )2 = (r2 + s2)2 + 02 = m2 + n2 (a)
= ( rr - ss )2 + ( rs + sr )2 = (r2 - s2)2 + (2rs)2 = m2 + n2 (b)
As we can see, (a) gives us no acceptable values for m and n (n must be > 0, but (b) gives us m = r2 – s2 and
n = rs. We have thus proved
Theorem 17a
If c is the square of an integer which can be written as a sum of two squares, say
c = (r2 + s2)2, then c can be written as a sum of two squares (c = m2 + n2) in
one and only one way; namely, m = r2 - s2 and n = 2rs.
__________________________________________________________________
Example 7. Find all primitive Pythagorean triples containing c = 1681. Since c = 1681 = 412 = (42 + 52)2, the square of a sum of two squares, we can use Theorem 17a with r = 4 and s = 5, giving us m = 42 - 52 = - 9, and
n = 2(4)(5) = 40. However, this makes m < 0 and m < n. Rewriting 1681 as (52 + 42)2, we now have r = 5 and
s = 4, and then m = 52 - 42 = 9, n = 2(5)(4) = 40. Interchanging these values of m and n to make m > n, we get m = 40 and n = 9. Thus, a = 402 - 92 = 1519, b = 2(40)(9) = 720, and c = 402 + 92 = 1681. Since c is a perfect square, there will be only one triple, namely
(1519, 720, 1681).
Example 8. Let c = 1885 = 5(13)(29), which is a product of three prime factors. We found in example 2 above that if c has ONE prime factor, then c belongs to ONE Pythagorean triple. In examples 4, 5, and 6, c had TWO prime factors and was a member of TWO triples. Will we get THREE triples if c has THREE prime factors? Let’s see.
Now, we cannot use Theorem 17 here directly, because it applies only if c is written as a product of TWO integers, not three. However, by multiplying 5 and 13 together to get 65, we can write 1885 as 5(13)(29) = 65(29).
From example 4, we know that 65 can be written as a sum of two squares in two different ways; namely,
82 + 12 and 72 + 42, and from example 2, 29 can be written in only one way; namely, 52 + 22.
So, c = 1885 = 5(13)(29) = 65(29) can be written in two ways:
I. 1885 = (82 + 12) (52 + 22)
II. 1885 = (72 + 42) (52 + 22)
and for each of these two ways, we will get two sets of m and n; one set by using formula (a) and one set by using formula (b) of Theorem 17. Thus, there will be a total of FOUR sets of m and n and thus FOUR primitive Pythagorean triples or right triangles. We really do not have to even calculate what they will be! We have SHOWN that there will be FOUR triples or triangles. However, let’s find all four of them.
Using Theorem 17and the m and n values from case I, we have
1885 = 65(29) = (82 + 12) (52 + 22), (r = 8, s = 1, u = 5, v =2)
= (8x5 + 1x2)2 + (8x2 - 1x5)2 = 422 + 112, (a)
and = (8x5 - 1x2)2 + (8x2 + 1x5)2 = 382 + 212. (b)
Thus, m = 42, n = 11, and m = 38, n = 21 and we have two sets of values for m and n, giving us TWO primitive Pythagorean triples to which c belongs.
Using the m and n values from case II above,
1885 = 65(29) = (72 + 42) (52 + 22), (r = 7, s = 4, u = 5, v = 2)
= (7x5 + 4x2)2 + (7x2 - 4x5)2 = 432 + 62, (a)
and = (7x5 - 4x2)2 + (7x2 + 4x5)2 = 272 + 342. (b)
Thus, m = 43, n = 6, and m = 34, n = 27 (interchanging m and n so that m > n to make a positive), and we have two sets of values for m and n, giving us another TWO primitive Pythagorean triples to which c = 1885 belongs.
Using a = m2 - n2, b = 2mn, and c = m2 + n2, the FOUR triples or triangles are
(1643, 924, 1885), (1003, 1596, 1885), (1813, 516, 1885), and (427, 1836, 1885).
In general, if c is a product of three different prime factors, then c will be a member of FOUR, not three, primitive Pythagorean triples.
Example 9. Let c = 325 = 5(5)(13), which is a product of three prime factors, and we would expect to get FOUR primitive Pythagorean triples as we did in example 8. But this time, two of them, namely the 5’s, are repeated factors. Let’s see what happens. Again, we cannot use Theorem 17 here directly, because it applies only if c is written as a product of TWO integers, not three. However, by multiplying 5 and 13 together to get 65, we can rewrite c = 325 as 325 = 5 x (5 x 13) = 5(65) = pq. But then p = 5 and q = 65 will have a common factor of 5. Since Theorem 17 requires that p and q have NO common factors, this factorization cannot be used. In fact, the only way we can write c as a product of two integers without any common factors is as c = 325 = (5 x 5) x 13 = 25(13). Thus, the repeated factor of 5 did not give us any additional ways to factor 325, and in general, as we have found in earlier sections for a and b, repeated factors do not contribute to the number of primitive right triangles or Pythagorean triples containing a given value of a, b, or c. We must count only the number of different prime factors of c.
Thus, c = 325 = 25(13), and using the m and n values from Table 2, 25 = 42 + 32 and 13 = 32 + 22. So,
325 = 25(13) = (42 + 32) (32 + 22), (r = 4, s = 3, u = 3, v =2)
= (4x3 + 3x2)2 + (4x2 - 3x3)2 = 182 + 12, (a)
and = (4x3 - 3x2)2 + (4x2 + 3x3)2 = 62 + 172. (b)
Thus, m = 18, n = 1, and m = 17, n = 6 (interchanging m and n to make a positive), and for 325 = 25(13), there are TWO sets of values for m and n, which in turn give us TWO primitive Pythagorean triples to which c = 325
belongs. Using a = m2 - n2, b = 2mn, and c = m2 + n2, the triples are
(323, 36, 325) and (253, 204, 325).
Now what have we found so far? Look at Table 3 below.
Table 3
Number of different Number of primitive
prime factors of c Pythagorean triples
-------------------------------------------------------------------------
1 1 2 2
3 4
4 -
It appears that the number of triples is doubling, so we should expect that if c has 4 different prime factors, it would be a member of EIGHT triples! Let’s see.
Example 10. Let c = 32045 = 5(13)(17)(29), which is a product of FOUR different prime factors. To use Theorem 17, we rewrite 32045 as c = 32045 = 5(13)(17)(29) = (5x29)(13x17) = 145(221), which is a product of two factors.
Now, from examples 5 and 6 above, we know that 145 and 221 may each be written as a sum of two squares in two different ways; namely
145 = 122 + 12 221 = 142 + 52
and
= 92 + 82 = 112 + 102.
So, c = 145 (221) can be written in four ways.
I. (122 + 12) (142 + 52)
II. (122 + 12) (112 + 102)
III. (92 + 82) (142 + 52)
IV. (92 + 82) (112 + 102)
and for EACH of these four ways, we get two sets of m and n; one set by using formula (a) and one set by using formula (b) of Theorem 17. Thus, there will be EIGHT sets of m and n and thus EIGHT primitive Pythagorean triples or right triangles. We really do not have to even calculate what they will be! We have SHOWN that there will be EIGHT triples or triangles. Let’s amend Table 3 to reflect our findings in example 10.
Table 3 (amended)
Number of different Number of primitive
prime factors of c Pythagorean triples
________________________________________________
1 1 = 20
2 2 = 21
3 4 = 22
4 8 = 23
5 -
In Table 3 (amended) above we have written the number of triples (column 2) as powers of 2. Notice that the power of 2 in each row is one less than the number of different prime factors in the same row. This suggests the following, which is VERY similar to Theorems 14 and 15 for a and b.
Theorem 18
If N is the number of primitive Pythagorean triples or right triangles of which c is a member,
and n is the number of different (distinct) prime factors of c, then N = 2n - 1.
_________________________________________________________________________
Let’s prove this theorem.
Proof: Remember that c will be a member of some primitive Pythagorean triple or right triangle if and only if it can be written as a sum of squares of two integers of opposite parity with no common factors.
Fortunately for us, in 1754 the eminent Swiss mathematician Leonhard Euler proved that
Theorem 19 (Euler)
Any prime number of the form 4L+1 can be represented as a sum of
two squares in one and only one way. (The representation is unique.)
_________________________________________________________
This theorem will be of great help to us in this proof and others to come.
Let p1, p2, p3, and p4 be distinct prime numbers of the form 4L+1.
A. Let n = 1. Then, c = p1 (ONE prime factor) and by Theorem 19 (Euler), we know that p1 can be written in ONE and only one way as a sum of two squares. Thus, c will be a member of ONE Pythagorean triple.
For n = 1, N = 2n-1 = 21-1 = 20 = 1, and Theorem 18 is true for n =1.
B. Let n = 2. Then, c = p1p2 (TWO distinct prime factors), and by Theorem 19 we know that p1 and p2 can each be written as a sum of two squares. So, c = p1p2 = (r2 + s2) (u2 + v2) for some r, s, u, and v, and by Theorem 17, c can be written as a sum of two squares in TWO different ways; namely
(a) c = (ru + sv)2 + (rv - su)2 and (b) c = (ru - sv)2 + (rv + su)2.
Thus, c will be a member of TWO Pythagorean triples.
For n = 2, N = 2n-1 = 22-1 = 21 = 2, and Theorem 18 is true for n = 2.
C. Let n = 3. Then, c = p1p2p3 = (p1p2) p3 (THREE distinct prime factors). From B., we know that p1p2 can be written as the sum of two squares in TWO different ways, say
p1p2 = r12 + s12 and r22 + s22 and p3 in only one way, say p3 = u2 + v2.
Thus, when we determine the number of triples of which c is a member, we will have two products to evaluate, namely
c = p1p2p3 = (p1p2)p3 = ( r12 + s12 ) ( u2 + v2 ),
and = ( r22 + s22 ) ( u2 + v2 ).
But, in evaluating each of these two products by Theorem 17, we will get two answers for each one, one from formula (a) and one from formula (b) of Theorem 17, giving us twice the number of sums of squares; namely, 4 sums of squares for c. So, c = p1p2p3 can be written as a sum of two squares in FOUR different ways, and thus c will be a member of FOUR primitive Pythagorean triples.
For n = 3, N = 2n-1 = 23-1 = 22 = 4, and Theorem 18 is true for n = 3.
D. Let n = 4. Then, c = p1p2p3p4 = (p1p2p3) p4 (FOUR distinct prime factors). From C., we know that p1p2p3 can be written as the sum of two squares in FOUR different ways, say
p1p2p3 = r12 + s12, r22 + s22, r32 + s32, and r42 + s42,
and p4 in only one way, say p4 = u2 + v2.
Then, when we determine the number of triples containing c, we will have four products to evaluate, namely
( r12 + s12 ) ( u2 + v2 )
( r22 + s22 ) ( u2 + v2 )
( r32 + s32 ) ( u2 + v2 )
( r42 + s42 ) (u2 + v2 ).
But, in evaluating each of these four products by Theorem 17, we will get two answers for each one, one from formula (a) and one from formula (b), giving us twice the number of sums of squares; namely, 2(4) = 8 sums of squares for c. So, c = p1p2p3p4 can be written as a sum of two squares in EIGHT different ways and thus, c will be a member of EIGHT primitive Pythagorean triples.
For n = 4, N = 2n-1 = 24-1 = 23 = 8, and Theorem 18 is true for n = 4.
Now, we can continue in this manner for n = 5, 6, 7, . . . , but this would NEVER prove Theorem 18 for all positive integers n. To prove a theorem true for all positive integers n, we must do two things:
1. We must show the theorem is true for n = 1.
2. We must show that whenever the theorem is true for a certain value of n (say k), then the theorem
is true for the next value of n (which is k + 1).
If we can prove these two things, then the theorem is true for all positive integers n.
This statement is called the Principle of Mathematical Induction and is not a theorem itself. Although it seems quite reasonable after giving some thought to it, It cannot be proved! Rather, it is an assumption (called an axiom or postulate) about the real number system.
Proof of Theorem 18 by mathematical induction.
1. Let n = 1. Then, by A. above, the theorem is true. (Note: In B, C, and D, we have also proved the theorem is true for n = 2, 3, and 4.)
2. Now suppose that Theorem 18 is true for some specific value of n, say n = k. Then, c = p1p2 . . . pk,
and we know that N = 2k - 1, for some n = k, (*)
is a true statement. We do not have to prove this statement. We’ve simply picked some value for n, namely k, for which Theorem 18 is true. In fact, k could be 2, 3, or 4, since we have already proved Theorem 18 for these values of n.
3. To satisfy part 2 of the Principle of Mathematical Induction, we must prove that our theorem is true for the next value of n; namely, n = k + 1. For this value of n, c = p1p2p3 . . . pkpk+1, and we must prove that N = 2n - 1 is true for n = k + 1; that is,
N = 2(k+1) - 1) = 2k for n = k. (**)
4. If n = k + 1, then c = p1p2 . . . pkpk+1 = ( p1p2 . . . pk ) pk+1. Now, from (*) above, we know that p1p2 . . . pk can be written as a sum of two squares in 2k - 1 different ways, and pk+1 can be written in only one way. Thus, to find the number of triples containing c = (p1 p2 . . . pk ) pk+1, we must evaluate 2k-1 products. And in doing this for each of these 2k-1 products, Theorem17 will give us two answers, one for formula (a) and one for formula (b). So, we get twice the number of values for c; namely, 2(2k-1) = 2k values. Thus, N is equal to 2k, and (**) above is true.
5. Thus, by the Principle of Mathematical Induction, Theorem 18 is proved.
Example 11. How many primitive right triangles have an hypotenuse of length 13,619,125? Since 13,619,125 = 5(5)(5)(13)(17)(17)(29), we see that it is a product of 7 primes, all of the form 4L+1. However, there are only 4 distinct primes; namely, 5, 13, 17, and 29, so by Theorem 18, n = 4 and N = 2n-1 = 24-1 = 23 = 8. Thus, there are eight primitive right triangles with hypotenuse of length 13,619,125.
Now, in proving Theorem 18, it was necessary to assume p1, p2, p3, . . . , pk, pk+1 were of the form 4L+1 in order to use Euler’s Theorem (Theorem 19). But, was this assumption correct? Do all prime factors of c have to be of the form 4L+1? Let’s see.
A Conjecture About c
To find out more about c, let’s make a table of the prime factors of all values of c of the form 4L + 1 from 5 to 225 along with their corresponding m and n values in the form (m,n).
Table 4
Prime Factors and Values of (m,n)
of c from 5 to 225
Prime Prime
c factors (m,n) c factors (m,n)
--------------------------------------------------------------------------------------------------------
5 prime (2,1) 117 3x3x13 none
9 3x3 none 121 11x11 none
13 prime (3,2) 125 5x5x5 (11,2)
17 prime (4,1) 129 3x43 none
21 3x7 none 133 7x19 none
25 5x5 (4,3) 137 prime (11,4)
29 prime (5,2) 141 3x47 none
33 3x11 none 145 5x29 (12,1), (9,8)
37 prime (6,1) 149 prime (10,7)
41 prime (5,4) 153 3x3x17 none
45 3x3x5 none 157 prime (11,6)
49 7x7 none 161 7x23 none
53 prime (7,2) 165 3x5x11 none
57 3x19 none 169 13x13 (12,5)
61 prime (6,5) 173 prime (13,2)
65 5x13 (8,1), (7,4) 177 3x59 none
69 3x23 none 181 prime (10,9)
73 prime (8,3) 185 5x37 (11,8), (13,4)
77 7x11 none 189 3x3x3x7 none
81 3x3x3x3 none 193 prime (12,7)
85 5x17 (7,6), (9,2) 197 prime (14,1)
89 prime (8,5) 201 3x67 none
93 3x31 none 205 5x41 (14,3), (13,6)
97 prime (9,4) 209 11x19 none
101 prime (10,1) 213 3x71 none
105 3x5x7 none 217 7x31 none
109 prime (10,3) 221 13x17 (14,5), (11,10)
113 prime (8,7) 225 3x3x5x5 none
-----------------------------------------------------------------------------------------------------------
Examine this table well, paying close attention to the form of the prime factors of each c. Can we make any conjecture about the form of the prime factors for those c’s which DO have values for m and n and those c’s which don’t? Perhaps you would like to pause here and see if you can come up with a conjecture.
. . . . . . . . . . .
The Conjecture
Now, it seems that whenever c is a member of a primitive right triangle or Pythagorean triple and thus has values for m and n, then either
1) c is a prime of the form 4L+1; for example, 13 = 4(3)+1, 29 = 4(7)+1, 73 = 4(18)+1, 109 = 4(27)+1,
157 = 4(39)+1, and 193 = 4(48)+1, or
2) ALL of its prime factors are of the form 4L+1 for some integers L. For example, 65 = 5(13) and its
prime factors of 5 =4(1)+1 and 13 =4(3)+1 are both of the form 4L+1.
On the other hand, whenever any one or more of the prime factors of c is NOT of the form 4L+1, then c is NOT a member of a primitive right triangle or Pythagorean triple. For example, 57 = 3(19) is not a member, and neither of its factors are of the form 4L+1. (3 = 4(0)+3 and 19 = 4(4)+3). 225 = 3(3)(5)(5) is not a member and its two factors of 3 are NOT of the form 4L+1 (although the two 5’s are).
Thus, based on the rather detailed information in Table 4, we can make the following statement.
The c Conjecture
c must be either
1) a prime number of the form 4L+1 for some integer L, or
2) a composite number whose prime factors are ALL of the form 4L+1.
_____________________________________________________________
Now, it must be pointed out that we have NOT proved this conjecture. We have VERIFIED it for all possible values of c up to 225, but this is by no means a PROOF of the conjecture for all those possible values of c which are NOT included in the table. However, part 1) of the conjecture is true because if c is a prime number of the form 4L+1, then, by Theorem 19 (Euler), it can be written as a sum of two squares and will thus be a member of a primitive Pythagorean triple or right triangle. This is great! We’re halfway done with the proof!
Now, if c is not a prime, then for c to be written as a sum of two squares (and thus be a member of a primitive right triangle or Pythagorean triple), Theorem 17 requires that c be a product of two integers, both of which can be written as a sum of two squares. But for each of these two integers to be written as a sum of two squares, they also must both be written as a product of two smaller integers, both of which can themselves be written as a sum of two squares. Eventually, using this process, we will get to the prime factors of c, each of which must be capable of being written as a sum of two squares. But, as Theorem 16 tells us, only integers of the form 4L+1 can be written as a sum of two squares. (In other words, if an integer is NOT of the form 4L+1, then that integer can NOT be written as a sum of two squares.) Thus, for c to be written as a sum of two squares, ALL of its prime factors must be of the form 4L+1, which proves part 2) of the conjecture. This gives us
Theorem 20
A positive integer c will be the length of the hypotenuse of a primitive right triangle
or a member of a primitive Pythagorean triple (a,b,c) if and only if c is
1) a prime number of the form 4L+1 for some integer L, or
2) a composite number whose prime factors are all of the form 4L+1.
__________________________________________________________________
Example 12. Which of the following integers can be values of c for primitive right triangles or Pythagorean triples? 21, 153, 417, 520, 617, and 3625.
21 cannot be a value of c, since 21 = 3(7), and 3 and 7 are both of the form 4L+3, not 4L+1.
153 cannot be a value of c, since 153 = 3(3)(17), and the 3’s are both of the form 4L+3 (even though the 17 is of the form 4L+1).
417 cannot, since 417 = 3(139), and 3 and 139 are both of the form 4L+3.
520 cannot, since it is not of the form 4L+1.
617 can be a value of c, since it is a prime of the form 4L+1, (617 = 4(154)+1).
3625 can be a value of c, since 3625 = 5(5)(5)(29), and all factors are of the form 4L+1.
Summary of Results for c
- In any primitive right triangle or Pythagorean triple (a,b,c), c must be
1) a prime number of the form 4L + 1, or
2) a composite number whose prime factors are all of the form 4L + 1, where L is a positive integer.
- The number N of triples or triangles containing c is 2n-1, where n is the number of distinct prime factors of c.
- To find all primitive right triangles or Pythagorean triples with c as a member,
1) If c is an integer of the form 4L+1, substitute the odd values of 1, 3, 5, . . . for m into c - m2
until c - m2 is a perfect square. Then, for that particular value of m, the value of n will be the
square root of c - m2. Using these values of m and n, we get a and b from a = m2 - n2
and b = 2mn.
2) If c is a product of two integers p and q which have no common factors and can be
written as a sum of two squares, p = r2 + s2 and q = u2 + v2, then to find the m and n
values of two triples or triangles containing c, use
a) m = ru + sv, n = rv - su for one of them,
and b) m = ru - sv, n = rv + su for the other one,
and then a = m2 - n2 and b = 2mn.
3) If c is the square of an integer which can be written as a sum of two squares, say c = (r2 + s2)2,
use
m = r2 - s2 and n = 2rs,
and then a = m2 - n2 and b = 2mn.
Example 13. Find all primitive Pythagorean triples for a) c= 2197 and b) c = 14297. a) Since c = 2197 = 133, we have one distinct prime factor, so the number of triples of which 2197 is a member will be N = 21-1 = 20 = 1. Since 2197 = 133 cannot be written as a product of two integers with no common factors nor is a perfect square, we must use procedure 1) given above. Accordingly, c - m2 = 2197 - m2 and we get
_________
m 2197 - m2 n = Ö 2197 - m2
--------------------------------------------------------------------------------
1 2197 - 1 = 2196 -
3 2197 - 9 = 2188 -
5 2197 - 25 = 2172 -
7 2197 - 49 = 2148 -
9 2197 - 81 = 2116 46
---------------------------------------------------------------------------------
Interchanging m and n so that m > n, m = 46 and n = 9, giving us a = 462 - 92 = 2035, b = 2(46)(9) = 828, and
c = 462 + 92 = 2197. The triple is (2035, 828, 2197).
b) c = 14297 = 29(29)(17) has two distinct factors, 17 and 29. Thus, 14297 will be a member of 22-1 = 2 primitive triples. Now, c = 14297 = 292 (17), so we must first write 292 and 17 as sums of two squares and then use procedure 2). Since 292 is a perfect square, we have, by procedure 3),
292 = (52 + 22)2 = (52 - 22)2 + (2 x 5 x 2)2 = 212 + 202.
Then c = 14297 = 292(17) = (212 + 202) (42 + 12), and by procedure 2) above, we get
m = 21(4) + 20(1) = 104, n = 21(1) - 20(4) = - 59 (a)
m = 21(4) - 20(1) = 64, n = 21(1) + 20(4) = 101. (b)
Making n positive in (a) above, (m,n) = (104,59), and we get
a = 1042 - 592 = 7335, b = 2(104)(59) = 12272, c = 1042 + 592 = 14297,
or (7335, 12272, 14297).
Interchanging m and n to make m > n in (b) above, (m,n) = (101,64), and we get
a = 1012 - 642 = 6105, b = 2(101)(64) = 12928, c = 1012 + 642 = 14297,
or (6105, 12928, 14297).
________________________________________________________
We have come very far in our study of Pythagorean triples and right triangles with integral sides. We can determine
1. whether a primitive Pythagorean triple or right triangle exists or not for any given positive integral value
of a, b, or c.
2. how many triples or triangles will contain a given value of a, b, or c.
3. all the triples or triangles associated with given values of a, b, or c.
And in Part 1. Patterns in Right Triangles and Pythagorean Triples, we were privileged to have discovered many fascinating relationships between a, b, and c as well as proving the Pythagorean Theorem and obtaining the formulas for the a’s, b’s, and c’s of all primitive Pythagorean triples and right triangles.
All in all, our study of Right Triangles and Pythagorean Triples has been very fruitful and worthwhile, and we are very grateful for having been given so many elegant things to discover in the exciting world of mathematics.
(April 17, 2008)