• Source: Formulas for generating Pythagorean triples
    • Besides Euclid's formula, many other formulas for generating Pythagorean triples have been developed.


      Euclid's, Pythagoras', and Plato's formulas


      Euclid's, Pythagoras' and Plato's formulas for calculating triples have been described here:
      The methods below appear in various sources, often without attribution as to their origin.


      Fibonacci's method


      Leonardo of Pisa (c. 1170 – c. 1250) described this method for generating primitive triples using the sequence of consecutive odd integers



      1
      ,
      3
      ,
      5
      ,
      7
      ,
      9
      ,
      11
      ,



      {\displaystyle 1,3,5,7,9,11,\ldots }

      and the fact that the sum of the first n terms of this sequence is




      n

      2




      {\displaystyle n^{2}}

      . If k is the n-th member of this sequence then



      n
      =
      (
      k
      +
      1
      )

      /

      2


      {\displaystyle n=(k+1)/2}

      .
      Choose any odd square number k from this sequence (



      k
      =

      a

      2




      {\displaystyle k=a^{2}}

      ) and let this square be the n-th term of the sequence. Also, let




      b

      2




      {\displaystyle b^{2}}

      be the sum of the previous



      n

      1


      {\displaystyle n-1}

      terms, and let




      c

      2




      {\displaystyle c^{2}}

      be the sum of all n terms. Then we have established that




      a

      2


      +

      b

      2


      =

      c

      2




      {\displaystyle a^{2}+b^{2}=c^{2}}

      and we have generated the primitive triple [a, b, c]. This method produces an infinite number of primitive triples, but not all of them.
      EXAMPLE:
      Choose



      k
      =
      9
      =

      3

      2


      =

      a

      2




      {\displaystyle k=9=3^{2}=a^{2}}

      . This odd square number is the fifth term of the sequence, because



      5
      =
      n
      =
      (

      a

      2


      +
      1
      )

      /

      2


      {\displaystyle 5=n=(a^{2}+1)/2}

      . The sum of the previous 4 terms is




      b

      2


      =

      4

      2




      {\displaystyle b^{2}=4^{2}}

      and the sum of all



      n
      =
      5


      {\displaystyle n=5}

      terms is




      c

      2


      =

      5

      2




      {\displaystyle c^{2}=5^{2}}

      giving us




      a

      2


      +

      b

      2


      =

      c

      2




      {\displaystyle a^{2}+b^{2}=c^{2}}

      and the primitive triple [a, b, c] = [3, 4, 5].


      Sequences of mixed numbers


      Michael Stifel published the following method in 1544. Consider the sequence of mixed numbers



      1



      1
      3



      ,

      2



      2
      5



      ,

      3



      3
      7



      ,

      4



      4
      9



      ,




      {\displaystyle 1{\tfrac {1}{3}},\,2{\tfrac {2}{5}},\,3{\tfrac {3}{7}},\,4{\tfrac {4}{9}},\,\ldots }

      with




      a

      n


      =
      n
      +



      n

      2
      n
      +
      1






      {\displaystyle a_{n}=n+{\tfrac {n}{2n+1}}}

      . To calculate a Pythagorean triple, take any term of this sequence and convert it to an improper fraction (for mixed number



      1



      1
      3





      {\displaystyle 1{\tfrac {1}{3}}}

      , the corresponding improper fraction is






      4
      3





      {\displaystyle {\tfrac {4}{3}}}

      ). Then its numerator and denominator are the sides, b and a, of a right triangle, and the hypotenuse is b + 1. For example:




      1



      1
      3




      [
      3
      ,
      4
      ,
      5
      ]
      ,

      2



      2
      5




      [
      5
      ,
      12
      ,
      13
      ]
      ,

      3



      3
      7




      [
      7
      ,
      24
      ,
      25
      ]
      ,

      4



      4
      9




      [
      9
      ,
      40
      ,
      41
      ]
      ,




      {\displaystyle 1{\tfrac {1}{3}}\rightarrow [3,4,5],\;2{\tfrac {2}{5}}\rightarrow [5,12,13],\;3{\tfrac {3}{7}}\rightarrow [7,24,25],\;4{\tfrac {4}{9}}\rightarrow [9,40,41],\;\ldots }


      Jacques Ozanam republished Stifel's sequence in 1694 and added the similar sequence



      1



      7
      8



      ,

      2



      11
      12



      ,

      3



      15
      16



      ,

      4



      19
      20



      ,




      {\displaystyle 1{\tfrac {7}{8}},\,2{\tfrac {11}{12}},\,3{\tfrac {15}{16}},\,4{\tfrac {19}{20}},\,\ldots }

      with




      a

      n


      =
      n
      +




      4
      n
      +
      3


      4
      n
      +
      4






      {\displaystyle a_{n}=n+{\tfrac {4n+3}{4n+4}}}

      . As before, to produce a triple from this sequence, take any term and convert it to an improper fraction. Then its numerator and denominator are the sides, b and a, of a right triangle, and the hypotenuse is b + 2. For example:




      1



      7
      8




      [
      8
      ,
      15
      ,
      17
      ]
      ,

      2



      11
      12




      [
      12
      ,
      35
      ,
      37
      ]
      ,

      3



      15
      16




      [
      16
      ,
      63
      ,
      65
      ]
      ,

      4



      19
      20




      [
      20
      ,
      99
      ,
      101
      ]
      ,




      {\displaystyle 1{\tfrac {7}{8}}\rightarrow [8,15,17],\;2{\tfrac {11}{12}}\rightarrow [12,35,37],\;3{\tfrac {15}{16}}\rightarrow [16,63,65],\;4{\tfrac {19}{20}}\rightarrow [20,99,101],\;\ldots }


      With a the shorter and b the longer legs of a triangle and c its hypotenuse, the Pythagoras family of triplets is defined by c − b = 1, the Plato family by c − b = 2, and the Fermat family by |a − b| = 1. The Stifel sequence produces all primitive triplets of the Pythagoras family, and the Ozanam sequence produces all primitive triples of the Plato family. The triplets of the Fermat family must be found by other means.


      Dickson's method


      Leonard Eugene Dickson (1920) attributes to himself the following method for generating Pythagorean triples. To find integer solutions to




      x

      2


      +

      y

      2


      =

      z

      2




      {\displaystyle x^{2}+y^{2}=z^{2}}

      , find positive integers r, s, and t such that




      r

      2


      =
      2
      s
      t


      {\displaystyle r^{2}=2st}

      is a perfect square. Then:




      x
      =
      r
      +
      s

      ,

      y
      =
      r
      +
      t

      ,

      z
      =
      r
      +
      s
      +
      t
      .


      {\displaystyle x=r+s\,,\,y=r+t\,,\,z=r+s+t.}


      From this we see that r is any even integer and that s and t are factors of r2/2. All Pythagorean triples may be found by this method. When s and t are coprime, the triple will be primitive. A simple proof of Dickson's method has been presented by Josef Rukavicka, J. (2013).
      Example: Choose r = 6. Then r2/2 = 18. The three factor-pairs of 18 are (1, 18), (2, 9), and (3, 6). All three factor pairs will produce triples using the above equations.

      s = 1, t = 18 produces the triple [7, 24, 25] because x = 6 + 1 = 7, y = 6 + 18 = 24, z = 6 + 1 + 18 = 25.
      s = 2, t = 9 produces the triple [8, 15, 17] because x = 6 + 2 = 8, y = 6 + 9 = 15, z = 6 + 2 + 9 = 17.
      s = 3, t = 6 produces the triple [9, 12, 15] because x = 6 + 3 = 9, y = 6 + 6 = 12, z = 6 + 3 + 6 = 15. (Since s and t are not coprime, this triple is not primitive.)


      Generalized Fibonacci sequence




      = Method I

      =
      For Fibonacci numbers starting with F1 = 0 and F2 = 1 and with each succeeding Fibonacci number being the sum of the preceding two, one can generate a sequence of Pythagorean triples starting from (a3, b3, c3) = (4, 3, 5) via




      (

      a

      n


      ,

      b

      n


      ,

      c

      n


      )
      =
      (

      a

      n

      1


      +

      b

      n

      1


      +

      c

      n

      1


      ,


      F

      2
      n

      1




      b

      n

      1


      ,


      F

      2
      n


      )


      {\displaystyle (a_{n},b_{n},c_{n})=(a_{n-1}+b_{n-1}+c_{n-1},\,F_{2n-1}-b_{n-1},\,F_{2n})}


      for n ≥ 4.


      = Method II

      =
      A Pythagorean triple can be generated using any two positive integers by the following procedures using generalized Fibonacci sequences.
      For initial positive integers hn and hn+1, if hn + hn+1 = hn+2 and hn+1 + hn+2 = hn+3, then




      (
      2

      h

      n
      +
      1



      h

      n
      +
      2


      ,

      h

      n



      h

      n
      +
      3


      ,
      2

      h

      n
      +
      1



      h

      n
      +
      2


      +

      h

      n


      2


      )


      {\displaystyle (2h_{n+1}h_{n+2},h_{n}h_{n+3},2h_{n+1}h_{n+2}+h_{n}^{2})}


      is a Pythagorean triple.


      = Method III

      =
      The following is a matrix-based approach to generating primitive triples with generalized Fibonacci sequences. Start with a 2 × 2 array and insert two coprime positive integers (q,q′) in the top row. Place the even integer (if any) in the left-hand column.





      [




      q




      q















      ]



      {\displaystyle \left[{\begin{array}{*{20}c}q&{q'}\\\bullet &\bullet \end{array}}\right]}


      Now apply the following "Fibonacci rule" to get the entries in the bottom row:









      q


      +
      q
      =
      p




      q
      +
      p
      =

      p








      [




      q



      q






      p



      p






      ]



      {\displaystyle {\begin{array}{*{20}c}q'+q=p\\q+p=p'\end{array}}\to \left[{\begin{array}{*{20}c}q&q'\\p&p'\end{array}}\right]}


      Such an array may be called a "Fibonacci Box". Note that q′, q, p, p′ is a generalized Fibonacci sequence. Taking column, row, and diagonal products we obtain the sides of triangle [a, b, c], its area A, and its perimeter P, as well as the radii ri of its incircle and three excircles as follows:








      a
      =
      2
      q
      p




      b
      =

      q



      p






      c
      =
      p

      p



      q

      q


      =
      q

      p


      +

      q


      p








      radii


      (

      r

      1


      =
      q

      q


      ,

      r

      2


      =
      q

      p


      ,

      r

      3


      =

      q


      p
      ,

      r

      4


      =
      p

      p


      )




      A
      =
      q

      q


      p

      p






      P
      =

      r

      1


      +

      r

      2


      +

      r

      3


      +

      r

      4








      {\displaystyle {\begin{array}{l}a=2qp\\b=q'p'\\c=pp'-qq'=qp'+q'p\\\\{\text{radii}}\to (r_{1}=qq',r_{2}=qp',r_{3}=q'p,r_{4}=pp')\\A=qq'pp'\\P=r_{1}+r_{2}+r_{3}+r_{4}\end{array}}}


      The half-angle tangents at the acute angles are q/p and q′/p′.
      EXAMPLE:
      Using coprime integers 9 and 2.





      [




      2


      9












      ]



      [




      2


      9




      11


      13




      ]



      {\displaystyle \left[{\begin{array}{*{20}c}2&9\\\bullet &\bullet \end{array}}\right]\to \left[{\begin{array}{*{20}c}2&9\\11&13\end{array}}\right]}


      The column, row, and diagonal products are: (columns: 22 and 117), (rows: 18 and 143), (diagonals: 26 and 99), so








      a
      =
      2
      (
      22
      )
      =
      44




      b
      =
      117




      c
      =
      (
      143

      18
      )
      =
      (
      26
      +
      99
      )
      =
      125








      radii


      (

      r

      1


      =
      18
      ,


      r

      2


      =
      26
      ,


      r

      3


      =
      99
      ,


      r

      4


      =
      143
      )




      A
      =
      18
      (
      143
      )
      =
      2574




      P
      =
      (
      18
      +
      26
      +
      99
      +
      143
      )
      =
      286






      {\displaystyle {\begin{array}{l}a=2(22)=44\\b=117\\c=(143-18)=(26+99)=125\\\\{\text{radii}}\to (r_{1}=18,\quad r_{2}=26,\quad r_{3}=99,\quad r_{4}=143)\\A=18(143)=2574\\P=(18+26+99+143)=286\end{array}}}


      The half-angle tangents at the acute angles are 2/11 and 9/13. Note that if the chosen integers q and q′ are not coprime, then the same procedure leads to a non-primitive triple.


      Pythagorean triples and Descartes' circle equation


      This method of generating primitive Pythagorean triples also provides integer solutions to Descartes' Circle Equation,






      (


      k

      1


      +

      k

      2


      +

      k

      3


      +

      k

      4



      )


      2


      =
      2

      (


      k

      1


      2


      +

      k

      2


      2


      +

      k

      3


      2


      +

      k

      4


      2



      )

      ,


      {\displaystyle \left(k_{1}+k_{2}+k_{3}+k_{4}\right)^{2}=2\left(k_{1}^{2}+k_{2}^{2}+k_{3}^{2}+k_{4}^{2}\right),}


      where integer curvatures ki are obtained by multiplying the reciprocal of each radius by the area A. The result is k1 = pp′, k2 = qp′, k3 = q′p, k4 = qq′. Here, the largest circle is taken as having negative curvature with respect to the other three. The largest circle (curvature k4) may also be replaced by a smaller circle with positive curvature ( k0 = 4pp′ − qq′).
      EXAMPLE:
      Using the area and four radii obtained above for primitive triple [44, 117, 125], we obtain the following integer solutions to Descartes' Equation: k1 = 143, k2 = 99, k3 = 26, k4 = (−18), and k0 = 554.


      A Ternary Tree: Generating All Primitive Pythagorean Triples


      Each primitive Pythagorean triple corresponds uniquely to a Fibonacci Box. Conversely, each Fibonacci Box corresponds to a unique and primitive Pythagorean triple. In this section we shall use the Fibonacci Box in place of the primitive triple it represents. An infinite ternary tree containing all primitive Pythagorean triples/Fibonacci Boxes can be constructed by the following procedure.
      Consider a Fibonacci Box containing two, odd, coprime integers x and y in the right-hand column.





      [







      x







      y




      ]



      {\displaystyle \left[{\begin{array}{*{20}{c}}\bullet &x\\\bullet &y\end{array}}\right]}


      It may be seen that these integers can also be placed as follows:





      [







      x




      y







      ]

      ,

      [




      x


      y












      ]

      ,

      [




      y


      x












      ]



      {\displaystyle \left[{\begin{array}{*{20}{c}}\bullet &x\\y&\bullet \end{array}}\right],\left[{\begin{array}{*{20}{c}}x&y\\\bullet &\bullet \end{array}}\right],\left[{\begin{array}{*{20}{c}}y&x\\\bullet &\bullet \end{array}}\right]}


      resulting in three more valid Fibonacci boxes containing x and y. We may think of the first Box as the "parent" of the next three. For example, if x = 1 and y = 3 we have:





      [




      1


      1




      2


      3




      ]



      parent



      {\displaystyle \left[{\begin{array}{*{20}{c}}1&1\\2&3\end{array}}\right]\leftarrow {\text{parent}}}






      [




      2


      1




      3


      5




      ]

      ,

      [




      1


      3




      4


      5




      ]

      ,

      [




      3


      1




      4


      7




      ]



      children



      {\displaystyle \left[{\begin{array}{*{20}{c}}2&1\\3&5\end{array}}\right],\left[{\begin{array}{*{20}{c}}1&3\\4&5\end{array}}\right],\left[{\begin{array}{*{20}{c}}3&1\\4&7\end{array}}\right]\leftarrow {\text{children}}}


      Moreover, each "child" is itself the parent of three more children which can be obtained by the same procedure. Continuing this process at each node leads to an infinite ternary tree containing all possible Fibonacci Boxes, or equivalently, to a ternary tree containing all possible primitive triples. (The tree shown here is distinct from the classic tree described by Berggren in 1934, and has many different number-theoretic properties.) Compare: "Classic Tree". See also Tree of primitive Pythagorean triples.


      Generating all Pythagorean triples using a predetermined positive integer


      There is a method to construct all Pythagorean triples that contain a given positive integer x as one of the legs of the right-angled triangle associated with the triple. It means finding all right triangles whose sides have integer measures, with one leg predetermined as a given cathetus. The formulas read as follows.


      with




      d

      C
      (
      x
      )
      :=


      {



      D
      (
      x
      )



      if

      x

      is odd





      D
      (
      x
      )

      P
      (
      x
      )



      if

      x

      is even,









      {\displaystyle d\in C(x):={\begin{cases}D(x)&{\text{if }}x{\text{ is odd}}\\D(x)\cap P(x)&{\text{if }}x{\text{ is even,}}\end{cases}}}


      where




      D
      (
      x
      )
      =

      {

      d


      N



      d

      x

      and

      d

      divides


      x

      2



      }

      ,


      {\displaystyle D(x)=\left\{d\in \mathbb {N} \mid \ d\leq x{\text{ and }}d{\text{ divides }}x^{2}\right\},}


      and if x is even with x = 2nk, n ∈ ℕ, and k ≥ 1 odd fixed, with




      P
      (
      x
      )
      =

      {

      d


      N


      d
      =

      2

      s


      l


      and


      l

      divides


      x

      2




      and


      s


      {

      1
      ,
      2
      ,
      .
      .
      .
      ,
      2
      n

      1

      }


      }

      .


      {\displaystyle P(x)=\left\{d\in \mathbb {N} \mid d=2^{s}l\ {\text{and}}\ l{\text{ divides }}x^{2}\ {\text{and}}\ s\in \left\{1,2,...,2n-1\right\}\right\}.}


      That is, regarding P(x), d must be even and such that x2/d is still divisible by 2.
      Moreover, (x, y, z) is a primitive Pythagorean triple if both of the following conditions are verified:

      EXAMPLES

      We remember that the Euclid’s formulas do not give all Pythagorean triples that involves a predetermined positive integer x—for example, the triples (12,9,15), (33,180,183), and (33,44,55). Moreover, it can be laborious to find m and n such that x = m2 − n2. Meanwhile, when using (1), it is enough to find all the d ∈ C(x) to obtain all Pythagorean triples. In particular, if we need to find all primitive Pythagorean triples that involve a predetermined positive integer x, then now we can use only the d ∈ C(x) that satisfy the conditions (2).


      Generating triples using quadratic equations


      There are several methods for defining quadratic equations for calculating each leg of a Pythagorean triple. A simple method is to modify the standard Euclid equation by adding a variable x to each m and n pair. The m,n pair is treated as a constant while the value of x is varied to produce a "family" of triples based on the selected triple. An arbitrary coefficient can be placed in front of the x-value on either m or n, which causes the resulting equation to systematically "skip" through the triples. For example, consider the triple [20,21,29], which can be calculated from the Euclid equations with values m = 5 and n = 2. Also, arbitrarily put the coefficient of 4 in front of the x in the m term.
      Let m1 = (4x + m), and let n1 = (x + n).
      Hence, substituting the values of m and n:









      Side

      A



      =
      2

      m

      1



      n

      1






      =
      2
      (
      4
      x
      +
      5
      )



      (
      x
      +
      2
      )




      =
      8

      x

      2


      +
      26
      x
      +
      20





      Side

      B



      =

      m

      1


      2




      n

      1


      2






      =
      (
      4
      x
      +
      5

      )

      2



      (
      x
      +
      2

      )

      2






      =
      15

      x

      2


      +
      36
      x
      +
      21





      Side

      C



      =

      m

      1


      2


      +

      n

      1


      2






      =
      (
      4
      x
      +
      5

      )

      2


      +
      (
      x
      +
      2

      )

      2






      =
      17

      x

      2


      +
      44
      x
      +
      29






      {\displaystyle {\begin{aligned}{\text{Side }}A&=2m_{1}n_{1}&&=2(4x+5){\text{ }}(x+2)&&=8x^{2}+26x+20\\{\text{Side }}B&=m_{1}^{2}-n_{1}^{2}&&=(4x+5)^{2}-(x+2)^{2}&&=15x^{2}+36x+21\\{\text{Side }}C&=m_{1}^{2}+n_{1}^{2}&&=(4x+5)^{2}+(x+2)^{2}&&=17x^{2}+44x+29\end{aligned}}}


      The original triple comprises the constant term in each of the respective quadratic equations. Below is a sample output from these equations. The effect of these equations is to cause the m-value in the Euclid equations to increment in steps of 4, while the n-value increments by 1.


      Generating all primitive Pythagorean triples using half-angle tangents


      A primitive Pythagorean triple can be reconstructed from a half-angle tangent. Choose r, a positive rational number in (0, 1), to be tan A/2 for the interior angle A that is opposite the side of length a. Using tangent half-angle formulas, it follows immediately that




      α
      =
      sin

      (
      A
      )
      =



      2
      r


      1
      +

      r

      2







      and


      β
      =
      cos

      (
      A
      )
      =



      1


      r

      2




      1
      +

      r

      2







      {\displaystyle \alpha =\sin(A)={\frac {2r}{1+r^{2}}}\quad {\text{ and }}\quad \beta =\cos(A)={\frac {1-r^{2}}{1+r^{2}}}}


      are both rational and that α2 + β2 = 1. Multiplying up by the smallest integer that clears the denominators of α and β recovers the original primitive Pythagorean triple. Note that if a < b is desired, then r should be chosen to be less than √2 − 1.
      The interior angle B that is opposite the side of length b will be the complementary angle of A. We can calculate




      s
      =
      tan


      (


      B
      2


      )

      =
      tan


      (



      π
      4





      A
      2



      )

      =



      1

      r


      1
      +
      r





      {\displaystyle s=\tan \left({\frac {B}{2}}\right)=\tan \left({\frac {\pi }{4}}-{\frac {A}{2}}\right)={\frac {1-r}{1+r}}}


      from the formula for the tangent of the difference of angles. Using s instead of r in the above formulas will give the same primitive Pythagorean triple but with a and b swapped.
      Note that r and s can be reconstructed from a, b, and c using r = a / (b + c) and s = b / (a + c).


      Pythagorean triples by use of matrices and linear transformations



      Let [a, b, c] be a primitive triple with a odd. Then 3 new triples [a1, b1, c1], [a2, b2, c2], [a3, b3, c3] may be produced from [a, b, c] using matrix multiplication and Berggren's three matrices A, B, C. Triple [a, b, c] is termed the parent of the three new triples (the children). Each child is itself the parent of 3 more children, and so on. If one begins with primitive triple [3,4,5], then all primitive triples will eventually be produced by application of these matrices. The result can be graphically represented as an infinite ternary tree with [a, b, c] at the root node. An equivalent result may be obtained using Berggrens's three linear transformations shown below.








      [





      1


      2


      2





      2


      1


      2





      2


      2


      3




      ]


      A



      [




      a




      b




      c




      ]

      =

      [





      a

      1







      b

      1







      c

      1






      ]

      ,








      [




      1


      2


      2




      2


      1


      2




      2


      2


      3




      ]


      B



      [




      a




      b




      c




      ]

      =

      [





      a

      2







      b

      2







      c

      2






      ]

      ,








      [




      1



      2


      2




      2



      1


      2




      2



      2


      3




      ]


      C



      [




      a




      b




      c




      ]

      =

      [





      a

      3







      b

      3







      c

      3






      ]



      {\displaystyle {\overset {A}{\mathop {\left[{\begin{matrix}-1&2&2\\-2&1&2\\-2&2&3\\\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\\\end{matrix}}\right]=\left[{\begin{matrix}a_{1}\\b_{1}\\c_{1}\\\end{matrix}}\right],\quad {\text{ }}{\overset {B}{\mathop {\left[{\begin{matrix}1&2&2\\2&1&2\\2&2&3\\\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\\\end{matrix}}\right]=\left[{\begin{matrix}a_{2}\\b_{2}\\c_{2}\end{matrix}}\right],\quad {\text{ }}{\overset {C}{\mathop {\left[{\begin{matrix}1&-2&2\\2&-1&2\\2&-2&3\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\end{matrix}}\right]=\left[{\begin{matrix}a_{3}\\b_{3}\\c_{3}\end{matrix}}\right]}


      Berggren's three linear transformations are:














      a
      +
      2
      b
      +
      2
      c
      =

      a

      1






      2
      a
      +
      b
      +
      2
      c
      =

      b

      1






      2
      a
      +
      2
      b
      +
      3
      c
      =

      c

      1







      [





      a

      1


      ,




      b

      1


      ,




      c

      1



      ]














      +
      a
      +
      2
      b
      +
      2
      c
      =



      a


      2






      +
      2
      a
      +
      b
      +
      2
      c
      =



      b


      2






      +
      2
      a
      +
      2
      b
      +
      3
      c
      =



      c


      2








      [







      a


      2



      ,






      b


      2



      ,






      c


      2




      ]














      +
      a

      2
      b
      +
      2
      c
      =



      a


      3






      +
      2
      a

      b
      +
      2
      c
      =



      b


      3






      +
      2
      a

      2
      b
      +
      3
      c
      =



      c


      3








      [







      a


      3



      ,






      b


      3



      ,






      c


      3




      ]















      {\displaystyle {\begin{aligned}&{\begin{matrix}-a+2b+2c=a_{1}\quad &-2a+b+2c=b_{1}\quad &-2a+2b+3c=c_{1}&\quad \to \left[{\text{ }}a_{1},{\text{ }}b_{1},{\text{ }}c_{1}\right]\\\end{matrix}}\\&{\begin{matrix}+a+2b+2c={{a}_{2}}\quad &+2a+b+2c={{b}_{2}}\quad &+2a+2b+3c={{c}_{2}}&\quad \to \left[{\text{ }}{{a}_{2}},{\text{ }}{{b}_{2}},{\text{ }}{{c}_{2}}\right]\\\end{matrix}}\\&{\begin{matrix}+a-2b+2c={{a}_{3}}\quad &+2a-b+2c={{b}_{3}}\quad &+2a-2b+3c={{c}_{3}}&\quad \to \left[{\text{ }}{{a}_{3}},{\text{ }}{{b}_{3}},{\text{ }}{{c}_{3}}\right]\\\end{matrix}}\\&\end{aligned}}}


      Alternatively, one may also use 3 different matrices found by Price. These matrices A′,B′,C′ and their corresponding linear transformations are shown below.








      [




      2


      1



      1





      2


      2


      2





      2


      1


      3




      ]




      A






      [




      a




      b




      c




      ]

      =

      [





      a

      1







      b

      1







      c

      1






      ]

      ,








      [




      2


      1


      1




      2



      2


      2




      2



      1


      3




      ]




      B






      [




      a




      b




      c




      ]

      =

      [





      a

      2







      b

      2







      c

      2






      ]

      ,








      [




      2



      1


      1




      2


      2


      2




      2


      1


      3




      ]




      C






      [




      a




      b




      c




      ]

      =

      [





      a

      3







      b

      3







      c

      3






      ]



      {\displaystyle {\overset {{A}'}{\mathop {\left[{\begin{matrix}2&1&-1\\-2&2&2\\-2&1&3\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\end{matrix}}\right]=\left[{\begin{matrix}a_{1}\\b_{1}\\c_{1}\end{matrix}}\right],\quad {\text{ }}{\overset {{B}'}{\mathop {\left[{\begin{matrix}2&1&1\\2&-2&2\\2&-1&3\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\\\end{matrix}}\right]=\left[{\begin{matrix}a_{2}\\b_{2}\\c_{2}\end{matrix}}\right],\quad {\text{ }}{\overset {{C}'}{\mathop {\left[{\begin{matrix}2&-1&1\\2&2&2\\2&1&3\\\end{matrix}}\right]} }}\left[{\begin{matrix}a\\b\\c\\\end{matrix}}\right]=\left[{\begin{matrix}a_{3}\\b_{3}\\c_{3}\end{matrix}}\right]}


      Price's three linear transformations are













      +
      2
      a
      +
      b

      c
      =

      a

      1






      2
      a
      +
      2
      b
      +
      2
      c
      =

      b

      1






      2
      a
      +
      b
      +
      3
      c
      =

      c

      1







      [





      a

      1


      ,




      b

      1


      ,




      c

      1



      ]














      +
      2
      a
      +
      b
      +
      c
      =

      a

      2





      +
      2
      a

      2
      b
      +
      2
      c
      =

      b

      2





      +
      2
      a

      b
      +
      3
      c
      =

      c

      2







      [





      a

      2


      ,




      b

      2


      ,




      c

      2



      ]














      +
      2
      a

      b
      +
      c
      =

      a

      3





      +
      2
      a
      +
      2
      b
      +
      2
      c
      =

      b

      3





      +
      2
      a
      +
      b
      +
      3
      c
      =

      c

      3







      [





      a

      3


      ,




      b

      3


      ,




      c

      3



      ]















      {\displaystyle {\begin{aligned}&{\begin{matrix}+2a+b-c=a_{1}\quad &-2a+2b+2c=b_{1}\quad &-2a+b+3c=c_{1}&\quad \to \left[{\text{ }}a_{1},{\text{ }}b_{1},{\text{ }}c_{1}\right]\end{matrix}}\\&{\begin{matrix}+2a+b+c=a_{2}\quad &+2a-2b+2c=b_{2}\quad &+2a-b+3c=c_{2}&\quad \to \left[{\text{ }}a_{2},{\text{ }}b_{2},{\text{ }}c_{2}\right]\end{matrix}}\\&{\begin{matrix}+2a-b+c=a_{3}\quad &+2a+2b+2c=b_{3}\quad &+2a+b+3c=c_{3}&\quad \to \left[{\text{ }}a_{3},{\text{ }}b_{3},{\text{ }}c_{3}\right]\end{matrix}}\\&\end{aligned}}}


      The 3 children produced by each of the two sets of matrices are not the same, but each set separately produces all primitive triples.
      For example, using [5, 12, 13] as the parent yields two sets of three children:










      [

      5
      ,
      12
      ,
      13

      ]






      A


      B


      C





      [

      45
      ,
      28
      ,
      53

      ]




      [

      55
      ,
      48
      ,
      73

      ]




      [

      7
      ,
      24
      ,
      25

      ]





















      [

      5
      ,
      12
      ,
      13

      ]











      A





      B





      C







      [

      9
      ,
      40
      ,
      41

      ]




      [

      35
      ,
      12
      ,
      37

      ]




      [

      11
      ,
      60
      ,
      61

      ]







      {\displaystyle {\begin{array}{ccc}&\left[5,12,13\right]&\\A&B&C\\\left[45,28,53\right]&\left[55,48,73\right]&\left[7,24,25\right]\end{array}}\quad \quad \quad \quad \quad \quad {\begin{array}{ccc}{}&\left[5,12,13\right]&{}\\A'&B'&C'\\\left[9,40,41\right]&\left[35,12,37\right]&\left[11,60,61\right]\end{array}}}



      Area proportional to sums of squares


      All primitive triples with b + 1 = c and with a odd can be generated as follows:


      Height-excess enumeration theorem


      Wade and Wade first introduced the categorization of Pythagorean triples by their height, defined as c − b, linking 3,4,5 to 5,12,13 and 7,24,25 and so on.
      McCullough and Wade extended this approach, which produces all Pythagorean triples when k > h√2/d: Write a positive integer h as pq2 with p square-free and q positive. Set d = 2pq if p is odd, or d= pq if p is even. For all pairs (h,k) of positive integers, the triples are given by





      (

      h
      +
      d
      k
      ,
      d
      k
      +



      (
      d
      k

      )

      2




      2
      h



      ,
      h
      +
      d
      k
      +



      (
      d
      k

      )

      2




      2
      h




      )

      .


      {\displaystyle \left(h+dk,dk+{\frac {(dk)^{2}}{2h}},h+dk+{\frac {(dk)^{2}}{2h}}\right).}


      The primitive triples occur when gcd(h,k) = 1 and either h = q2 with q odd or h=2q2.


      References

    Kata Kunci Pencarian: