MAS 617 (Fall 017) Number Theory and Cryptography (Yiu) Class Notes, October 10. Construction of Pythagorean triangles By a Pythagorean triangle we mean a right triangle whose side lengths are integers. Any common divisor of two of the side lengths is necessarily a divisor of the third. We call a Pythagorean triangle primitive if no two of its sides have a common divisor. 1
Let(a,b,c) be a primitive Pythagorean triangle. From the relation a + b = c, we make the following observations. (1) Exactly two of a, b, c are odd, and the third is even. () In fact, the even number must be one of a and b. For if c is even, then a and b are both odd. Writing a = h + 1 and b = k +1, we have c = (h+1) +(k +1) = 4(h +k +h+k)+. This is a contradiction since c must be divisible by4. (3) We shall assume a odd and b even, and rewrite the Pythagorean relation in the form c+a c a = ( ) b. Note that the integers c+a and c a are relatively prime, for any common divisor of these two numbers would be a common divisor c and a. Consequently, each of c+a and c a is a square.
(4) Writing c+a = u and c a = v, we have c = u +v and a = u v. From these, b = uv. (5) Since c and a are both odd, u and v are of different parity. We summarize this in the following theorem. Theorem 1. The side lengths of a primitive Pythagorean triangle are of the form u v, uv, u +v for relatively prime integers u and v of different parity. Primitive Pythagorean triples with sides < 100 u,v a,b,c u,v a,b,c u,v a,b,c,1 3,4,5 3, 5,1,13 4,1 15,8,17 4,3 7,4,5 5, 1,0,9 5,4 9,40,41 6,1 35,1,37 6,5 11,60,61 7, 45,8,53 7,4 33,56,65 7,6 13,84,85 8,1 63,16,65 8,3 55,48,73 8,5 39,80,89 9, 77,36,85 9,4 65,7,97
Primitive Pythagorean triples with sides < 1000 u,v a,b,c u,v a,b,c u,v a,b,c u,v a,b,c,1 3,4,5 3, 5,1,13 4,1 15,8,17 4,3 7,4,5 5, 1,0,9 5,4 9,40,41 6,1 35,1,37 6,5 11,60,61 7, 45,8,53 7,4 33,56,65 7,6 13,84,85 8,1 63,16,65 8,3 55,48,73 8,5 39,80,89 8,7 15,11,113 9, 77,36,85 9,4 65,7,97 9,8 17,144,145 10,1 99,0,101 10,3 91,60,109 10,7 51,140,149 10,9 19,180,181 11, 117,44,15 11,4 105,88,137 11,6 85,13,157 11,8 57,176,185 11,10 1,0,1 1,1 143,4,145 1,5 119,10,169 1,7 95,168,193 1,11 3,64,65 13, 165,5,173 13,4 153,104,185 13,6 133,156,05 13,8 105,08,33 13,10 69,60,69 13,1 5,31,313 14,1 195,8,197 14,3 187,84,05 14,5 171,140,1 14,9 115,5,77 14,11 75,308,317 14,13 7,364,365 15, 1,60,9 15,4 09,10,41 15,8 161,40,89 15,14 9,40,41 16,1 55,3,57 16,3 47,96,65 16,5 31,160,81 16,7 07,4,305 16,9 175,88,337 16,11 135,35,377 16,13 87,416,45 16,15 31,480,481 17, 85,68,93 17, 4 73, 136, 305 17, 6 53, 04, 35 17, 8 5, 7, 353 17, 10 189, 340, 389 17,1 145,408,433 17,14 93,476,485 17,16 33,544,545 18,1 33,36,35 18, 5 99, 180, 349 18, 7 75, 5, 373 18, 11 03, 396, 445 18, 13 155, 468, 493 18,17 35,61,613 19, 357,76,365 19,4 345,15,377 19,6 35,8,397 19, 8 97, 304, 45 19, 10 61, 380, 461 19, 1 17, 456, 505 19, 14 165, 53, 557 19,16 105,608,617 19,18 37,684,685 0,1 399,40,401 0,3 391,10,409 0, 7 351, 80, 449 0, 9 319, 360, 481 0, 11 79, 440, 51 0, 13 31, 50, 569 0,17 111,680,689 0,19 39,760,761 1, 437,84,445 1,4 45,168,457 1, 8 377, 336, 505 1, 10 341, 40, 541 1, 16 185, 67, 697 1, 0 41, 840, 841,1 483,44,485,3 475,13,493,5 459,0,509,7 435,308,533, 9 403, 396, 565, 13 315, 57, 653, 15 59, 660, 709, 17 195, 748, 773,19 13,836,845,1 43,94,95 3, 55,9,533 3,4 513,184,545 3, 6 493, 76, 565 3, 8 465, 368, 593 3, 10 49, 460, 69 3, 1 385, 55, 673 3, 14 333, 644, 75 3, 16 73, 736, 785 3, 18 05, 88, 853 3, 0 19, 90, 99 4,1 575,48,577 4,5 551,40,601 4,7 57,336,65 4,11 455,58,697 4, 13 407, 64, 745 4, 17 87, 816, 865 4, 19 15, 91, 937 5, 61, 100, 69 5, 4 609, 00, 641 5, 6 589, 300, 661 5, 8 561, 400, 689 5, 1 481, 600, 769 5, 14 49, 700, 81 5, 16 369, 800, 881 5, 18 301, 900, 949 6, 1 675, 5, 677 6,3 667,156,685 6,5 651,60,701 6,7 67,364,75 6,9 595,468,757 6, 11 555, 57, 797 6, 15 451, 780, 901 6, 17 387, 884, 965 7, 75, 108, 733 7, 4 713, 16, 745 7, 8 665, 43, 793 7, 10 69, 540, 89 7, 14 533, 756, 95 7,16 473,864,985 8,1 783,56,785 8,3 775,168,793 8,5 759,80,809 8, 9 703, 504, 865 8, 11 663, 616, 905 8, 13 615, 78, 953 9, 837, 116, 845 9, 4 85, 3, 857 9, 6 805, 348, 877 9, 8 777, 464, 905 9, 10 741, 580, 941 9,1 697,696,985 30,1 899,60,901 30,7 851,40,949 31, 957,14,965 31,4 945,48,977 31,6 95,37,997
Example 1. 1. A Pythagorean triangle with an inscribed square How many matches of equal lengths are required to make up the following configuration?
Suppose the shape of the right triangle is given by a primitive Pythagorean triple(a, b, c). The length of a side of the square must be a common multiple of a and b. The least possible value is the productab. There is one such configuration consisting of (i) two Pythagorean triangles obtained by magnifying (a, b, c) a and b times, (ii) a square of sideab. The total number of matches is (a+b)(a+b+c)+ab = (a+b+c)c+4ab. The smallest one is realized by taking(a,b,c) = (3, 4, 5). It requires 108 matches.
Example. How many matches are required in the next smallest configuration?
Nonexistence of Pythagorean triangles with square area Theorem (Fermat). The area of a Pythagorean triangle cannot be a square. Proof. Suppose to the contrary there is one such triangle, which we may assume primitive, with side lengths u v, uv, u +v, u, v being relative prime of different parity. The area A = uv(u v ) being a square, and no two ofu,v,u v sharing common divisors, each of these numbers must be a square. We write u = a, v = b so that u v = a 4 b 4 is also a square. Since a 4 b 4 = (a b )(a + b ) and the two factors are relatively prime, we must have a b = r and a + b = s for some integers r and s. From these, a = r +s and (a) = (r +s ) = (r+s) +(s r).
From these, a = r +s and (a) = (r +s ) = (r+s) +(a r). Thus, we have a new Pythagorean triangle s r, r+s, a. This is a Pythagorean triangle whose area is the square of an integer: 1 (s r)(r+s) = 1 (s r ) = b. But it is a smaller triangle since b = v is a proper divisor ofa = uv(u v ). By descent, beginning with one Pythagorean triangle with square area, we obtain an infinite sequence of Pythagorean triangles with decreasing areas, each of which is a square integer; a contradiction.
Corollary 3 (Fermat Last Theorem forn = 4). The equation x 4 +y 4 = z 4 does not have solutions in nonzero integers. Proof. Suppose x 4 + y 4 = z 4 for positive integers x, y, z. The Pythagorean triangle with sides z 4 y 4, z y and z 4 +y 4 has a square area z y (z 4 y 4 ) = z y x 4 = (x yz), a contradiction. Remark. This proof actually shows that the equation x + y 4 = z 4 has no solution in nonzero integers.
Rational points on a conic Suppose a nonsingular conic f(x,y) = c contains a rational pointp = (x 0,y 0 ). Then by passing through P lines of rational slope t to intersect the conic again, we obtain a parametrization of the rational points on the curve.
Proposition 4. (1) The rational solutions of x dy = 1 can be parametrized in the form ( ) 1+dt t (x,y) = 1 dt,. 1 dt () The positive integer solutions of x dy = z can be parametrized in the form (x,y,z) = 1 ( p +dq, pq, p dq ), g where g = gcd(p +dq,pq,p dq ).
Integer triangles with a 60 angle If triangle ABC hasc = 60, then c = a ab+b. (1) Withx = a c andy = b c, integer triangles with a 60 angle correspond to rational points in the first quadrant on the curve x xy +y = 1. () Note that the curve contains the point P = ( 1, 1). By passing a line of rational slope t throughp to intersect the curve again, we obtain a parametrization of the rational points. Now, such a line has equation y = 1+t(x+1). Solving this simultaneously with () we obtain (x,y) = ( 1, 1) = P, and ( ) t( t) (x,y) = t t+1, t 1, t t+1 which is in the first quadrant if 1 < t.
By symmetry, we may simply take 1 < t 1 to avoid repetition. Putting t = q p for relatively prime integers p, q, and clearing denominators, we obtain a =q(p q), b =p(q p), c =p pq +q, with p < q p. gcd(a,b) =gcd(pq q, pq p ) =gcd((p q)(p+q),q(p q)) =gcd((p q)(p+q),p q) since gcd(p q,q) = gcd(p+q,q) = gcd(p,q) = 1. Now, gcd(p q,p q) = gcd(p q,p) = 1 and gcd(p+q, p q) = gcd(p+q, 3p) = gcd(p+q, 3). This givesgcd(a,b) = gcd(p+q,3).
Proposition 5. The primitive integer triangles with a 60 angle are given by 1( q(p q), p(q p), p pq +q ), g where p and q are relatively prime positive integers satisfying p < q p and g = gcd(p+q,3). p q (a,b,c) p q (a,b,c) 1 1 (1,1,1) 3 (8,3,7) 4 3 (15,8,13) 5 3 (1,5,19) 5 4 (8,5,7) 6 5 (35,4,31) 7 4 (40,7,37) 7 5 (15,7,13) 7 6 (48,35,43) 8 5 (55,16,49) 8 7 (1,16,19) 9 5 (65,9,61) 9 7 (77,45,67) 9 8 (80,63,73) 10 7 (91, 40, 79) 10 9 (99, 80, 91)
Integer triangles with a 10 angle If triangle ABC hasc = 10, then c = a +ab+b. (3) Integer triangles with a 10 angle therefore correspond to rational points in the first quadrant on the curve x +xy +y = 1. (4) Note that the curve contains the point Q = ( 1,0). By passing a line of rational slope t throughp to intersect the curve again, we obtain a parametrization of the rational points. Now, such a line has equationy = t(x+1). Solving this simultaneously with () we obtain (x,y) = ( 1,0) = Q, and ( ) 1 t Q(t) = t +t+1, t(+t), t +t+1 which is in the first quadrant if0 < t < 1. It is easy to check that Q(t) and Q ( 1 t 1+t) are symmetric about the line y = x. To avoid repetition we may restrict to 0 < t < 3 1.
Putting t = q p for relatively prime integers p, q satisfying q < 3 1 p, and clearing denominators, we obtain a =p q, b =q(p+q), c =p +pq +q, with 0 < q < p. Note that gcd(p q,q(p+q) =gcd((p+q)(p q),q(p+q)) =gcd((p+q)(p q),p+q) =gcd(p q,p+q) =gcd(p q,3p) =gcd(p q,3).
Proposition 6. The primitive integer triangles with a 10 angle are given by 1( p q, q(p+q), p +pq +q ), g ( 3 1 ) where q < p are relatively prime positive integers and g = gcd(p q, 3). p q (a,b,c) 3 1 (8,7,13) 4 1 (5,3,7) 5 1 (4,11,31) 6 1 (35,13,43) 7 1 (16,5,19) 7 (45,3,67) 8 1 (63,17,73) 9 1 (80,19,91) 9 (77,40,103) 10 1 (33,7,37) 10 3 (91,69,139)
Exercise. (1) Show that a number c is a sum of two consecutive squares if and only if c 1 is a square. () Suppose an integer triangle contains a 10 angle with its two arms differing by 1. Show that the length of the longest side is a sum of two consecutive squares. (3) It is known that the centroid of a triangle of sides a, b, c lies on its incircle if and only if 5(a +b +c ) = 6(ab+bc+ca). Find a parametrization of all such primitive triangles.
(4) A standard calculus exercise asks to cut equal squares of dimension x from the four corners of a rectangle of length a and breadth b so that the box obtained by folding along the creases has a greatest capacity. a x b The answer to this problem is given by x = a+b a ab+b. 6 How should one choose relatively prime integersaandbso that the resultingxis an integer? For example, when a = 5, b = 8, x = 1. Another example is a = 16, b = 1 with x = 3.