Before demonstrating the claims made in Part I and Part II on this topic, let me mention two simple facts about integer solutions to . First, if some number divides both and , it also clearly divides . So and have a common factor if and only if , , and do. Or saying it another way, and are relatively prime if and only if , , and are. From now on I always assume that this is true for , , and .

The second fact is that and have opposite parity, that is, one is even and the other odd. It’s clear that and can’t both be even, since then they would have a common factor of 2. To see that and can’t both be odd, note that the square of an odd number is so the square of an odd number is congruent to 1 modulo 4. This means that if and are both odd, the left side of is congruent to 2 modulo 4. But then the right-hand side is even, so is of the form and is congruent to 0 modulo 4, contradiction.

With these two facts out of the way, let me show that a Pythagorean triple is always of the form

(1)

It is easy to check that if , and can be written this way in terms of and then . But where does the formula come from, and why are there always such and ?

A Pythagorean triple can be thought of as a point on a unit circle:

(2)

Each point corresponds to a single point on the -axis, as in the left half of the figure below. The slanted line connects to a point on the -axis.

The key fact is that each pair corresponds to a single number . And is rational if and only if is rational. This can be seen from explicit formulas linking and . To get those formulas consult the right half of the figure where the triangle with sides , is proportional to the triangle with sides . So

The second equation shows that if and are rational then so is . And the last two equations show the converse. But they show more. Writing in reduced form (i.e. and relatively prime) and combining with (2) shows

Equating numerators suggests that and . But there is a subtlety: this is guaranteed only if and are relatively prime. For example , but there are no and with and . The small print below gives two ways to turn the suggestion into a proof.

So I need to show that . First note that by adding and subtracting the last two equations, and . Since is in lowest form, at least one is odd so cannot be divisible by 4. Also, cannot be divisible by an odd prime , since that would then be a common factor of and . So is either 1 or 2. Suppose . Since , and are reduced, they aren’t all even; and since one of and is odd. The geometric construction works when you switch and , so I can assume that is odd. Then . If and have the same parity, then . So they must have opposite parities. But then is odd and can’t equal , contradiction. Therefore . Forcing to be odd is crucial. If is even, is possible. For example has a solution , , .There’s also a fancy proof that uses unique factorization in the ring . Write . The two numbers are relatively prime (see below) so each prime factor of divides only one of them. Therefore, each is a square and where is or . So , possibly switching and

To see that the relative primality of and implies the relative primality , suppose that a complex integer divides both of . If is a real integer, then it divides both and , contradicting their relative primality. Similarly if is purely imaginary. That means I can assume that . By conjugating, it follows that and so both and divide . Since these are distinct, the real integer divides which is again a contradiction. The final detail is that although , they could be associates, that is . But that would imply so which after taking norms becomes , and that contradicts the statement from the beginning of this post that and are of opposite parity.

Formula (1) gives an easy way to show why there isn’t a triangle with integer sides and area 5. If then that formula shows that there is a pair , with and

When this has no integer solution because three of the factors must be 1, the other 5. Since is the largest of the four factors, it would have to be 5 and , which is clearly impossible.

Since the numbers , , , and are used to compute the sides , and , you can remove any common factors if necessary since that won’t change the side lengths , , . So I will always assume that , or using a common shorthand .

Proposition: If represents a square-free congruent triangle and , then .

Proof: By contradiction. Suppose . Then some prime divides . First suppose so but . Then , , and are integers so . It follows that one of or is even. This means that one of , is divisible by 4, the other by 2, so . Since

It follows that , but and is square free. This is a contradiction, so . Similarly, if is an odd prime, and divides , , and but not , then , contradiction. So .

I use this to give a shortcut in the exhaustive search over and . You only need to consider a subset. In the lemma below, the parity of is , i.e. odd or even.

Lemma: For a square-free congruent triangle, if then and , are of opposite parity. And such pair of generates a triangle with .

Proof:

First assume . If and have the same parity, then from equation (1) all of , and are even, contradicting the proposition. If and have a common factor, so do , and , so that is not possible either. For the other direction, note that since and have different parities, then is odd and is even so . Thus you only need to consider an odd prime . If then so so and similarly .

It follows that in exhaustive search, you only need to consider , that are relatively prime and of opposite parities. Note: this is the glitch in the web table I mentioned earlier. For , the web table gives , , which are both odd. If you use them to generate , remove the common factor of 2, and then recompute , you get , with .

Next, I’ll verify the important speedup, which is that and are almost squares.

Proposition: If , are relatively prime and generate a square-free congruent number, then and where (in particular, and ).

Proof: Combine equation (1) and to get

If a prime has then or . If the latter, but since , is impossible, and so is impossible so . Therefore every factor of is either a square or a factor of . It follows that where each factor of divides . If any factor of is a square then incorporate it into after which . Similarly . Since , so .

We observed earlier that in our tables, the denominator of times the denominator of equals the denominator of . Here is the proof that it is true in general. Repeating the equations:

Even though , and can have a common factor in which case and .

Lemma: With the usual assumption that , then .

Proof: First check that so that . If not, then there is a with and . From and

(3)

it follows that (or perhaps ). But and implies , contradiction. Next from (3) every prime factor of must divide either or . Start with and . Then consider the prime factors of one-by-one. For each factor , remove it from either the numerator and denominator of or from . After the removal process becomes and becomes and since and are completely reduced, , and so . Since each factor of was removed, so and thus . Finally, write

The last equation shows that . If not, then it writes in a more reduced form, contradicting the first part of the proof. I previously showed so it follows that . And the first part of the proof showed that .

Powered by QuickLaTeX