TOPICS
Search

Twin Pythagorean Triple


A twin Pythagorean triple is a Pythagorean triple (a,b,c) of positive integers for which two components are consecutive integers. Every twin Pythagorean triple is a primitive Pythagorean triple. Of the 16 primitive triples with hypotenuse less than 100, seven are twin triples. The first few twin triples, sorted by increasing c, are (3, 4, 5), (5, 12, 13), (7, 24, 25), (20, 21, 29), (9, 40, 41), (11, 60, 61), (13, 84, 85), (15, 112, 113), ....

The numbers of twin triples with hypotenuse less than 10, 10^2, 10^3, ... are 1, 7, 24, 74, ... (OEIS A101903).

The first few leg-leg triplets are (3, 4, 5), (20, 21, 29), (119, 120, 169), (696, 697, 985), ... (OEIS A001652, A046090, and A001653). A closed form is available for the rth such pair. Consider the general reduced solution (u^2-v^2,2uv,u^2+v^2), then the requirement that the legs be consecutive integers is

 u^2-v^2=2uv+/-1.
(1)

Rearranging gives

 (u-v)^2-2v^2=+/-1.
(2)

Setting u=x+y and v=y gives the Pell equation

 x^2-2y^2=+/-1.
(3)

Positive solutions of these Pell equations are given by

x=((1+sqrt(2))^r+(1-sqrt(2))^r)/2
(4)
y=((1+sqrt(2))^r-(1-sqrt(2))^r)/(2sqrt(2)),
(5)

where r is a positive integer. The lengths of the legs X_r and Y_r and the hypotenuse Z_r are

X_r=u^2-v^2
(6)
=x^2+2xy
(7)
=((sqrt(2)+1)^(2r+1)-(sqrt(2)-1)^(2r+1))/4+1/2(-1)^r
(8)
Y_r=2uv
(9)
=2xy+2y^2
(10)
=((sqrt(2)+1)^(2r+1)-(sqrt(2)-1)^(2r+1))/4-1/2(-1)^r
(11)
Z_r=u^2+v^2
(12)
=x^2+2xy+2y^2
(13)
=((sqrt(2)+1)^(2r+1)+(sqrt(2)-1)^(2r+1))/(2sqrt(2)).
(14)

Denoting the length of the shortest leg by A_r then gives

A_r=((sqrt(2)+1)^(2r+1)-(sqrt(2)-1)^(2r+1))/4-1/2
(15)
Z_r=((sqrt(2)+1)^(2r+1)+(sqrt(2)-1)^(2r+1))/(2sqrt(2))
(16)

(Beiler 1966, pp. 124-125 and 256-257). The hypotenuse formula can be inverted exactly as

 r=(ln(sqrt(2)Z_r+sqrt(2Z_r^2-1))-ln(1+sqrt(2)))/(2ln(1+sqrt(2))).
(17)

The smaller exponential term in Z_r is positive and contributes less than 1, so

 Z_r-1<((sqrt(2)+1)^(2r+1))/(2sqrt(2))<Z_r.
(18)

Taking natural logarithms also gives

 lnZ_r>(1+2r)ln(sqrt(2)+1)-ln(2sqrt(2)).
(19)

For a positive integer N, let Delta_2^L(N) be the number of leg-leg twin triples with hypotenuse at most N. Since each Z_r is an integer,

Delta_2^L(N)=|_(ln(sqrt(2)N+sqrt(2N^2-1))-ln(1+sqrt(2)))/(2ln(1+sqrt(2)))_|
(20)
=|_(lnN+ln(2sqrt(2))-ln(1+sqrt(2)))/(2ln(1+sqrt(2)))_|,
(21)

where |_x_| is the floor function. Consequently,

 Delta_2^L(N)=(lnN)/(2ln(1+sqrt(2)))+O(1),
(22)

with leading coefficient approximately 0.5672963286.

The first few leg-hypotenuse triples are (3, 4, 5), (5, 12, 13), (7, 24, 25), (9, 40, 41), (11, 60, 61), (13, 84, 85), ... (OEIS A005408, A046092, and A001844). Leg-hypotenuse twin triples (a,b,c)=(v^2-u^2,2uv,u^2+v^2) occur whenever

 u^2+v^2=2uv+1
(23)
 (u-v)^2=1,
(24)

that is to say when v=u+1 for a positive integer u, in which case the hypotenuse exceeds the even leg by unity and the twin triplet is given by (1+2u,2u(1+u),1+2u(1+u)). The number Delta_2^H(N) of leg-hypotenuse triplets with hypotenuse at most a positive integer N is therefore given by

 Delta_2^H(N)=|_1/2(sqrt(2N-1)-1)_|,
(25)

where |_x_| is the floor function. The first few values for N=1, 2, ... are 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, ... (OEIS A095861). The numbers of leg-hypotenuse triples less than 10, 10^2, ... are 1, 6, 21, 70, 223, 706, 2235, ... (OEIS A101904).

The total number Delta_2(N) of twin triples with hypotenuse at most a positive integer N is

 Delta_2(N)={0   for 1<=N<5; Delta_2^H(N)+Delta_2^L(N)-1   for N>=5,
(26)

where the subtraction avoids double counting (3,4,5), the only triple whose two legs and hypotenuse are consecutive integers. Thus

 Delta_2(N)=sqrt(N/2)+(lnN)/(2ln(1+sqrt(2)))+O(1).
(27)

See also

Pythagorean Triple

Explore with Wolfram|Alpha

References

Beiler, A. H. "The Eternal Triangle." Ch. 14 in Recreations in the Theory of Numbers: The Queen of Mathematics Entertains. New York: Dover, 1966.Sloane, N. J. A. Sequences A001652/M3074, A001653/M3955, A001844/M3826, A005408/M2400, A046090, A046092, A095861, A101903, and A101904 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Twin Pythagorean Triple

Cite this as:

Weisstein, Eric W. "Twin Pythagorean Triple." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/TwinPythagoreanTriple.html

Subject classifications