Pythagorean Theory
Given any positive integer, it is possible to derive Pythagorean Triples with that integer as the hypotenuse.
First, some general facts regarding hypotenuses.
The hypotenuse of a Pythagorean triangle must be of the form k(m^2 + n^2).
Only integers of the form k(m^2 + n^2) can be hypotenuses of Pythagorean triangles, e.g., 5, 10, 13, 15, etc.
To be primitive, k = 1, m and n must be co-prime integers, one odd, one even, m greater than n.
The hypotenuse of a primitive Pythagorean Triangle is always odd.
Every prime of the form 4n + 1 is a primitive hypotenuse.
Any number with at least one prime factor of the form 4n + 1 can be of the form k(m^2 + n^2).
A number N is a primitive hypotenuse if, and only if, all of its prime factors are of the form 4n + 1, e.g., 5, 13,
65, 85, etc. Every prime of the form 4n + 1 is a primitive hypotenuse.
Any prime number of the form 4n + 1 can be represented as the sum of two integral squares in one way.
Prime factors of the form 4n - 1 cannot be factors of a primitive hypotenuse
A prime number of the form 4n - 1 cannot be represented as the sum of two integral squares.
Any product whose factors are 2 and primes of the form 4n + 1 can be represented as the sum of two
integral squares.
If a number N has a total of n prime divisors of the form 4n + 1, N can be the hypotenuse of 2^(n-1) primitive Pythagorean triangles.
Viewing the factorization of N as 2^ao(p1^a1)p2^a2(p3^a3)....pn^an x q1^b1(q2^b2)q3^b3......qr^br, the p's being primes of the form 4n - 1 and the q's primes of the form 4n + 1. Then,
1) N is the hypotenuse of [(2b1 + 1)(2b2 + 1)(2b3 + 1).....(2br + 1)]/2 Pythagorean triangles
2) N is the sum of two unequal squares in [(b1 + 1)(b2 + 1)(b3 + 1).....(br + 1)]/2 ways for an even numerator or
[(b1 + 1)(b2 + 1)(b3 + 1).....(br + 1)]/2 - 1/2 for an odd numerator.
The method of verifying a hypotenuse makes use of two specific theorems:
1) A positive integer N can be represented by the sum of two squares if, and only if, its factorization into powers of distinct primes contains no odd powers of primes congruent to 3 modulo 4 (Two integers a and b are said to be congruent for the modulus m when their difference, a - b, is divisible by the integer m written as a = b (mod 4).)
2) By means of one of the most famous identities ever derived, the product of any two numbers, that are themselves the sums of two squares, can be represented as the sum of two other squares and often in two different ways.
................................................................= (ac + bd)^2 + (ad - bc)^2
............................................................../
...............................(a^2 + b^2)(c^2 + d^2) or
..............................................................\
................................................................= (ac - bd)^2 + (ad + bc)^2
In the special case where c = d = 1, 2(a^2 + b^2) = (a + b)^2 + (b - a)^2 meaning that any product with factors of 2 and primes of the form 4n + 1 can be represented as the sum of two squares.
How do we make use of this information to solve problems of this type?
Out of the first 25 primes, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, and 97, the following are of the form 4n + 1; 5, 13, 17, 29, 37, 41, 53, 61, 73, 79, 89, 97. The following are of the form 4n - 1; 3, 7, 19, 23, 31, 43, 59, 67, 71, 79, and 89.
Observe that 5 = (2^2 + 1^2), 13 = (3^2 + 2^2), 17 = (4^2 + 1^2), 29 = (5^2 + 2^2), 37 = (6^2 + 1^2), 41 = (5^2 + 4^2), and 53 = (7^2 + 2^2), for example.
Determine if any Pythagorean Triples exist with a hypotenuse of 65.
Consider N = x^2 + y^2 = 65.
............................................a.......b.....c.......d
.......................65 = 5x13 = (2^2 + 1^2)(3^2 + 2^2) with a, b, c, and d equaling 3, 2, 5, and 2. From our identities,
(2^2 + 1^2)(3^2 + 2^2) = (2x3 + 1x2)^2 + (2x2 - 1x3)^2 = (6 + 2)^2 + (4 - 3)^2 = (8^2 + 1^2) = 64 + 1 = 65 and
(2^2 + 1^2)(3^2 + 2^2) = (2x3 - 1x2)^2 + (2x2 + 1x3)^2 = (6 - 2)^2 + ( 4 + 3)^2 = (4^2 + 4^2) = 16 + 49 = 65.
Therefore, 65 = (8^2 + 1^2) = (4^2 + 7^2).
Thus, m = 8 with n = 1 or m = 7 with n = 4 will produce Pythagorean Triples with hypotenuses of 65.
Determine if any Pythagorean Triples exist with a hypotenuse of 377.
Consider N = x^2 + y^2 = 377
............................................a.......b.....c.......d
.....................377 = 13x29 = (3^2 + 2^2)(5^2 + 2^2) with a, b, c, and d equaling 3, 2, 5, and 2, we can make use of the identities to create
(3^2 + 2^2)(5^2 + 2^2) = (3x5 + 2x2)^2 + (3x2 - 2x5)^2 = (15 + 4)^2 + (6 - 10)^2 = (19^2 + 4^2) = 361 + 16 and ................................= (3x5 - 2x2)^2 + (3x2 + 2x5)^2 = (15 - 4)^2 + (6 + 10)^2 = (11^2 + 16^2) = 121 + 256 = 377.
Therefore, 377 = (19^2 + 4^2) = (11^2 + 16^2) and m = 19 with n = 4 and m = 16 with n = 11 will produce Pythagorean Triples with hypotenuse 377.
Determine if any Pythagorean Triples exist with a hypotenuse of 315.
Consider the number N = x^2 + y^2 = 315 = (3^2)x5x7. Since 315 is fo the form 4n - 1 and the factorization contains an odd power of the prime 7, 7 = 3 (mod 4), it cannot be represented as the sum of two squares.
Determine if any Pythagorean Triples exist with a hypotenuse of 3185.
Consider the number N = x^2 + y^2 = 3185. The prime factors of 3185 are 5x(7^2)x13. Since 3185 is of the form 4n + 1, and/or the factorization contains no odd power of a prime congruent to 3 modulo 4 (7^2 has an even power), the number is representable as a sum of two squares. Having 5 = (2^2 + 1^2), 7^2 = (7^2 + 0^2), and 13 = (3^2 + 2^2), we can write
................................a.......b.....c......d
3185 = 5x(7^2)x13 = (2^2 + 1^2)(7^2 + 0^2)(3^2 + 2^2)
............................= (14^2 + 7^2)(3^2 + 2^2)
............................= (14x3 + 7x2)^2 + (14x2 - 7x3)^2
............................=.(42 + 14)^2 + (28 - 21)^2
............................= (56^2 + 7^2) = 3136 + 49 = 3185.
Lets see how we can apply the method to a larger number.
Determine if any Pythagorean Triples exist with a hypotenuse of 1,395,182,880.
Consider N = x^2 + y^2 = 1,395,182,880.
The prime factors of this number are 2^5(3^4)5^1(7^2)13^3.
Being of the form 4n + 1, both 5 and 13 are the sums of two squares.
We already know that 5x13 can be written as (8^2 + 1^2) and (4^2 + 7^2).
We can rewrite our factorization of 2^5(3^4)5^1(7^2)13^3 as (2x5x13)x[2^4(3^4)7^2(13^2)].
From our third identity above, 2x5x13 = 9^2 + 7^2 and 11^2 + 3^2.
We can also rewrite [2^4(3^4)7^2(13^2)] as [2^2(3^2)7^1(13^1)]^2.
Then, 2^5(3^4)5^1(7^2)13^3 = [2^2(3^2)7^1(13^1)9^1]^2 + [2^2(3^2)7^1(13^1)7^1]^2
.......................................= 29,484^2 + 22,932^2
.......................................= 869,306,256 + 525,876,624
.......................................= 1,395,182,880 making m = 29,484 and n = 22,932
.................................................and
........2^5(3^4)5^1(7^2)13^3 = [2^2(3^2)7^1(13^1)11^1] + [2^2(3^2)7^1(13^1)3^1]
......................................= 36,036^2 + 9,828^2
......................................= 1,298,593,296 + 96,589,584
......................................= 1,395,182,880 making m = 36,036 and n = 9,828.