The Rational Argumentator
A Journal for Western Man
Principal Index *** Contributors *** Yahoo! Group
Ordering the Primitive Pythagorean Triples by Leg Difference and Size Using Generalized Pell Sequences
Keith Raskin
Issue CLXXXIII - January 13, 2009
Recommend this page.
In 2002, while trying to find patterns among the Pythagorean triples to make the topic more interesting for my 10th grade math class (only my second year teaching math), I stumbled – very gradually – upon this recursive sequence:
1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, . . .
It is similar to a Fibonacci sequence, but instead of just adding the two prior terms to get the next one must double the previous term and then add it to the one before it.
In other words, the 10th term is actually twice the 9th term plus the 8th term. Note that in the sequence above 5 = 2(2) + 1, 12 = 2(5) + 2, 29 = 2(12) + 5, and so on. This sequence is often referred to as the Pell numbers.
The significance of this sequence here is that it generates all of the primitive Pythagorean triples with a leg difference of 1. Take the first two terms {1, 2} and form the triple {22 – 12, 2(2)(1), 22 + 12} = {3, 4, 5}. Take the second and third terms {2, 5} and form the triple {52 – 22, 2(5)(2), 52 + 22} = {21, 20, 29}. Likewise, the rest of the consecutive pairs produce the rest of the aforementioned triples with consecutive leg lengths in order of size:
{119, 120, 169}, {697, 696, 985}, {4059, 4060, 5741}, {23661, 23660, 33461}, . . .
Now, the amazing thing, to me at least, is that there exist similar sequences that generate precisely all of the primitive triples without redundancy or misfires (bogus or non-primitive triples). Before I begin to illustrate them, let me define (really name for convenience and sanity) the two natural numbers necessary for starting these sequences. Let’s call the first number the Nominator and denote it by n and the other number the Modifier, denoted by m. They come in pairs; each Nominator must have a Modifier in order to define a pair of sequences, it turns out. The Nominator may be any natural number greater than 1, but the Modifier must be less than and relatively prime to its matching Nominator and it must be odd (in parity, not weirdness). For every such n and m we can construct two sequences using the previously demonstrated Fibonacci-like recursion that have the following initial terms (which determine the sequences):
n, n + m, . . .
n – m, 3n – 2m, . . .
These two sequences (call the first one Primary and the second Secondary) would generate every primitive Pythagorean triple with a leg difference of 2n2 – m2. The very first pair of sequences we could construct would result from n = 2 and m = 1. The Primary and Secondary sequences are
2, 2 + 1, 8, 19, 46, 111, 268, . . .
2 – 1, 3(2) – 2(1), 9, 22, 53, 128, 309, . . .
And the generated triples with a leg difference of 2(2)2 – 12 = 7 are
{5, 12, 13}, {55, 48, 73}, {297, 304, 425}, {1755, 1748, 2477}, . . .
{15, 8, 17}, {65, 72, 97}, {403, 396, 565}, {2325, 2332, 3293}, . . .
By this method, all of the primitive Pythagorean triples can be sequentially ordered and classified by size and leg difference. That very first sequence (Let’s call it the Initial sequence) I stumbled on at the beginning can be considered the unique case in which only a Primary sequence exists for n = m = 1. That this method or classification is exhaustive and without redundancy I have no doubt and neither should you; a proof follows.
Proof: Let {P1, P2, P3} be an arbitrary primitive Pythagorean triple, with P2 being the even leg, then there exists a unique pair of natural numbers A and B such that A < B, gcd(A, B) = 1, and A and B are of opposite parity (one is odd, the other even) and {B2 – A2, 2AB, B2 + A2}. This result is well-known and has been proven, I believe by Euclid and Diophantus.
Now there are 5 cases to consider, the 5th being the most complex and having its own group of 4 sub-cases.
Case 1: If B < 2A, then A and B are the first two terms of a Primary sequence. The only consecutive terms in our sequences that satisfy the inequality are n and n + m (n + m < 2n). n = A and m = B – A, uniquely.
Case 2: If B = 2A, then A and B are the first two terms of the Initial sequence. Since gcd(A,B) = 1, A =1 and B = 2.
Case 3: If B = 3A, then A and B have common parity contradicting our assumption (or our guarantee). So this case is impossible.
Case 4: If B > 3A, then A and B are the first two terms of a Secondary sequence. The only consecutive terms in our sequences that satisfy the inequality are n – m and 3n – 2m (3n – 2m > 3n – 3m). n = B – 2A and m = B – 3A, uniquely.
Case 5: If 2A < B < 3A, then A and B are advanced terms (not the first and second) in one of our sequences. Our recursion relation guarantees that the inequality will hold. If Rn = 2Rn-1 + Rn-2 , then 2Rn-1 < Rn < 3Rn-1, since the sequences are strictly increasing. To determine the sequence, we would reverse the recursion, using Rn-2 = Rn – 2Rn-1 , and backtrack through the sequence as long as the terms remain positive and keep decreasing until one of the following four events occur.
Case 5a: If Rn-2 < 0, then Rn – 2Rn-1 < 0, and thus Rn < 2Rn-1 . So, Rn-1 and Rn fall into Case 1, meaning that A and B are advanced terms of a Primary sequence.
Case 5b: If Rn-2 = 0, then Rn – 2Rn-1 = 0, and thus Rn = 2Rn-1 . So, Rn-1 and Rn fall into Case 2, meaning that A and B are advanced terms of the Initial sequence.
Case 5c: If Rn-2 = Rn-1, then Rn – 2Rn-1 = Rn-1, and thus Rn = 3Rn-1 . So, Rn-1 and Rn are of common parity. However, the recursion preserves parity, and therefore A and B must have common parity, which is, again, a contradiction. So, this case is impossible.
Case 5d: If Rn-2 > Rn-1, then Rn – 2Rn-1 > Rn-1, and thus Rn > 3Rn-1 . So, Rn-1 and Rn fall into Case 4, meaning that A and B are advanced terms of a Secondary sequence.
When A and B are advanced terms we can obtain them uniquely by progressing through our sequence using the terms we stopped at (Rn-1 and Rn) precisely the number of times we backtracked. This covers all possible (and impossible) outcomes, and the proof is complete. Q.E.D.
Summary of the Result
The Pell numbers: 1, 2, 5, 12, 29, 70, . . . , Pn, . . . given by the recursion relation Pn = 2Pn - 1 + Pn – 2 and its extension to sequences with the same recursion but initial terms of
n, n + m, . . . and
n – m, 3n – 2m, . . .
where n is any natural number greater than 1, gcd(n, m) = 1, m < n and m is odd, generates and orders all of the primitive Pythagorean triples AND sorts them by leg difference = 2n2 – m2 ( = 1 for the Pell numbers themselves). Just substitute the consecutive pairs of terms A, B from the sequences into B2 – A2, 2AB, B2 + A2.
Keith Raskin
BA, MA Pure Mathematics, UC Berkeley
___________
Recommend this page.
This TRA feature has been edited in accordance with TRA’s Statement of Policy.
Click here to return to TRA’s Issue CLXXXIII Index.