A Pythagorean triple is a triple of positive integers ,
,
and
such that a right triangle exists with legs
and hypotenuse
. By the Pythagorean
theorem, this is equivalent to finding positive
integers
,
,
and
satisfying
(1)
|
The smallest and best-known Pythagorean triple is . The right triangle
having these side lengths is sometimes called the 3,
4, 5 triangle.
Plots of points in the -plane such that
is a Pythagorean triple are shown above
for successively larger bounds. These plots include negative values of
and
, and are therefore symmetric about both the x-
and y-axes.
Similarly, plots of points in the -plane such that
is a Pythagorean triple are shown above
for successively larger bounds.
It is usual to consider only primitive Pythagorean triples (also called "reduced"triples) in which and
are relatively prime,
since other solutions can be generated trivially from the primitive ones. The primitive
triples are illustrated above, and it can be seen immediately that the radial lines
corresponding to imprimitive triples in the original plot are absent in this figure.
For primitive solutions, one of
or
must be even, and the other
odd (Shanks 1993, p. 141), with
always odd.
In addition, one side of every Pythagorean triple is divisible by 3, another by 4, and another by 5. One side may have two of these divisors, as in (8, 15, 17), (7, 24, 25), and (20, 21, 29), or even all three, as in (11, 60, 61).
Given a primitive triple , three new primitive triples are obtained from
(2)
| |||
(3)
| |||
(4)
|
where
(5)
| |||
(6)
| |||
(7)
|
Hall (1970) and Roberts (1977) prove that is a primitive Pythagorean triple iff
(8)
|
where
is a finite product of the
matrices
,
,
. It therefore follows that every primitive Pythagorean triple
must be a member of the infinite array
(9)
|
Pythagoras and the Babylonians gave a formula for generating (not necessarily primitive) triples as
(10)
|
for ,
which generates a set of distinct triples containing neither all primitive nor all
imprimitive triples (and where in the special case
,
).
The early Greeks gave
(11)
|
where
and
are relatively prime and of opposite parity
(Shanks 1993, p. 141), which generates a set of distinct triples containing
precisely the primitive triples (after appropriately sorting
and
).
Let
be a Fibonacci number. Then
(12)
|
generates distinct Pythagorean triples (Dujella 1995), although not exhaustively for either primitive or imprimitive triples. More generally, starting with positive
integers ,
,
and constructing the Fibonacci-like sequence
with terms
,
,
,
,
, ... generates distinct Pythagorean triples
(13)
|
(Horadam 1961), where
(14)
|
where
is a Lucas number.
For any Pythagorean triple, the product of the two nonhypotenuse legs (i.e., the two smaller numbers) is always divisible by 12, and the product of all three sides is divisible by 60. It is not known if there are two distinct triples having the same product. The existence of two such triples corresponds to a nonzero solution to the Diophantine equation
(15)
|
(Guy 1994, p. 188).
For a Pythagorean triple (,
,
),
(16)
|
where
is the partition function P (Honsberger 1985).
Every three-term progression of squares
,
,
can be associated with a Pythagorean triple
) by
(17)
| |||
(18)
| |||
(19)
|
(Robertson 1996).
The area of a triangle corresponding to the Pythagorean triple is
(20)
|
Fermat proved that a number of this form can never be a square number.
To find the number
of possible primitive triangles which may have
a leg (other than the hypotenuse)
of length
,
factor
into the form
(21)
|
The number of such triangles is then
(22)
|
i.e., 0 for singly even and 2 to the power one less than the number of distinct
prime factors of
otherwise (Beiler 1966, pp. 115-116). The first few numbers
for
,
2, ..., are 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 2, ... (OEIS A024361).
To find the number of ways
in which a number
can be the leg (other than the hypotenuse) of a primitive or nonprimitive right triangle, write the factorization of
as
(23)
|
Then
(24)
|
(Beiler 1966, p. 116). Note that iff
is prime or twice a prime. The first few numbers for
, 2, ... are 0, 0, 1, 1, 1, 1, 1, 2,
2, 1, 1, 4, 1, ... (OEIS A046079).
To find the number of ways in which a number
can be the hypotenuse of a
primitive right triangle, write its factorization
as
(25)
|
where the s
are of the form
and the
s are of the form
. The number of possible primitive right
triangles is then
(26)
|
For example,
since
(27)
| |||
(28)
|
The values of
for
,
2, ... are 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, ... (OEIS A024362).
The first few primes of
the form
are 5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, ... (OEIS A002144),
so the smallest side lengths which are the hypotenuses
of 1, 2, 4, 8, 16, ... primitive right triangles are 5, 65, 1105, 32045, 1185665,
48612265, ... (OEIS A006278).
The number of possible primitive or nonprimitive right triangles having as a hypotenuse is
(29)
| |||
(30)
|
(correcting the typo of Beiler 1966, p. 117, which states that this formula gives the number of non-primitive solutions only), where is the sum of squares
function. For example, there are four distinct integer triangles with hypotenuse
65, since
(31)
|
The first few numbers for , 2, ... are 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1,
0, 1, 0, 0, ... (OEIS A046080). The smallest
hypotenuses having
distinct triples are 1, 5, 25, 125, 65, 3125, ... (OEIS A006339).
The following table gives the hypotenuses for which there exist exactly
distinct right integer triangles for
, 1, ..., 5.
OEIS | hypotenuses
for which there exist | |
0 | A004144 | 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, ... |
1 | A084645 | 5, 10, 13, 15, 17, 20, 26, 29, 30, 34, 35, ... |
2 | A084646 | 25, 50, 75, 100, 150, 169, 175, 200, 225, ... |
3 | A084647 | 125, 250, 375, 500, 750, 875, 1000, 1125, 1375, ... |
4 | A084648 | 65, 85, 130, 145, 170, 185, 195, 205, 221, 255, ... |
5 | A084649 | 3125, 6250, 9375, 12500, 18750, 21875, 25000, ... |
Therefore, the total number of ways in which may be either a leg or hypotenuse
of a right triangle is given by
(32)
|
The values for ,
2, ... are 0, 0, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4, 2, 1, 5, 3, ... (OEIS A046081).
The smallest numbers
which may be the sides of
general right triangles
for
,
2, ... are 3, 5, 16, 12, 15, 125, 24, 40, ... (OEIS A006593;
Beiler 1966, p. 114).
There are 50 Pythagorean triples with hypotenuse less than 100, the first few of which, sorted by increasing , are (3, 4, 5), (6, 8,10), (5, 12, 13), (9, 12, 15), (8, 15,
17), (12, 16, 20), (15, 20, 25), (7, 24, 25), (10, 24, 26), (20, 21, 29), (18, 24,
30), (16, 30, 34), (21, 28, 35), ... (OEIS A046083,
A046084, and A009000).
Of these, only 16 are primitive triplets with hypotenuse less than 100: (3, 4,5), (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29), (12, 35, 37), (9, 40, 41), (28, 45, 53), (11, 60, 61), (33, 56, 65), (16, 63, 65), (48, 55, 73), (36, 77, 85), (13, 84, 85), (39, 80, 89), and (65, 72, 97) (OEIS A046086, A046087, and A020882).
Let the number of triples with hypotenuse be denoted
, the number of triples with hypotenuse
be denoted
, and the number of primitive triples less than
be denoted
. Then the following table summarizes the values for
powers of 10.
Lehmer (1900) proved that the number of primitive solutions with hypotenuse less than
satisfies
(33)
|
(OEIS A086201).
The inradii of the first few primitive Pythagorean triangles ordered by increasing are given by 1, 2, 3, 3, 6, 5, 4, 10, 5, ... (OEIS A014498).
There is a general method for obtaining triplets of Pythagorean triangles with equal areas. Take the three sets of generators as
(34)
| |||
(35)
| |||
(36)
| |||
(37)
| |||
(38)
| |||
(39)
|
Then the right triangle generated by each triple ()
has common area
(40)
|
(Beiler 1966, pp. 126-127). The only extremum of this function occurs at . Since
for
, the smallest area shared by three
nonprimitive right triangles is given by
, which results in an area of 840 and corresponds
to the triplets (24, 70, 74), (40, 42, 58), and (15, 112, 113) (Beiler 1966, p. 126).
Right triangles whose areas consist of a single digit include (area of 6) and
(area of 666666; Wells 1986, p. 89).
In 1643, Fermat challenged Mersenne to find a Pythagorean triplet whose hypotenuse and sum of the legs were squares. Fermat found the smallest such solution:
(41)
| |||
(42)
| |||
(43)
|
with
(44)
| |||
(45)
|
A related problem is to determine if a specified integer can be the area
of a right triangle with rational sides. 1, 2,
3, and 4 are not the areas of any rational-sided
right triangles, but 5 is (3/2, 20/3, 41/6), as
is 6 (3, 4, 5). The solution to the problem involves the elliptic
curve
(46)
|
A solution (,
,
)
exists if (46) has a rational
solution, in which case
(47)
| |||
(48)
|
(Koblitz 1993). There is no known general method for determining if there is a solution for arbitrary ,
but a technique devised by J. Tunnell in 1983 allows certain values to be ruled
out (Cipra 1996).