6

It is well-known that the set of all primitive Pythagorean triples has the structure of an infinite ternary rooted tree.

What is the exact algorithm (i.e., formula, or possibly set of three formulas) by which one can take a given Pythagorean triple $(a,b,c)$ and find the immediately smaller triple in the tree? For example, given $(165,52,173)$, how does one obtain its [unique] “ancestor” triple $(77,36,85)$?

Kieren MacMillan
  • 7,889
  • 2
  • 28
  • 70
  • 2
    I've done a writeup on a geometric mechanism of traversing this tree here. The exact formula is $(abs(p-2q),q)\text{ or }(q,abs(p-2q))$, assuming you are able to resolve $(a,b,c)$ to the $p,q$ generating pair. – abiessu Oct 09 '14 at 14:43
  • 1
    This formula is derived directly from the reverse-direction three-way formula $(p+2q,q), (2p+q,p), (2p-q,p)$. In all these formulas, we have $(a,b,c)=(p^2-q^2,2pq,p^2+q^2)$. – abiessu Oct 09 '14 at 14:51
  • Better pay attention to the search for solutions Diofantos equation of the form: $aX^2+bXY+cY^2=jZ^2$ – individ Oct 09 '14 at 17:47

5 Answers5

4

Starting with $(165,52,173)$, we attempt to find the $p,q$ pair which generates this triple, i.e., $p^2-q^2=165,2pq=52,p^2+q^2=173$. Clearly, we have $2q^2=173-165=8\implies q=2$ and thus $p=13$.

The ancestor of this triple arises from $(|p-2q|,q)\text{ or }(q,|p-2q|)$, whichever places $p',q'$ in largest-to-smallest order. In this case, we have $p-2q=9$ and thus the ancestor pair is $(p',q')=(9,2)$ and therefore the ancestor triple is $(p'^2-q'^2,2p'q',p'^2+q'^2)=(77,36,85)$.

abiessu
  • 8,115
  • Is it not possible to avoid the sign issue? i.e., Is there no formula which can take any Pythagorean triple of positive integers $(a_n,b_n,c_n)$ and give its “ancestor” triple $(a_{n-1},b_{n-1},c_{n-1})$ with all three elements positive? – Kieren MacMillan Aug 18 '16 at 23:54
3

Two Trees of Pythagorean triples are known to exist (Berggren's and Price's), so to answer your question you need to first identify which one you are talking about. Descent/Ascent algorithms for both trees are given the following paper.

Bernhart, F.R. & Price, H.L. Pythagoras’ garden, revisited. Aust. Sr. Math. J. 26, 29–40 (2012). http://files.eric.ed.gov/fulltext/EJ992372.pdf.

KYZYL
  • 103
  • It seems there are at least three trees of Pythagorean triples (cf. McCullough). I'm hoping one of them — or some other one I don't know about — allows a descent without sign changes. – Kieren MacMillan Aug 19 '16 at 01:28
  • F.J.M. Barning (1963) rediscovered the same tree Berggren had found in 1934. McCullough didn't know about Berggren, and he refers to that tree as the "Barning tree" so I don't think a third tree can be attributed to McCullough. – KYZYL Aug 20 '16 at 02:45
2

You can use the matrix transformations found here:

http://en.wikipedia.org/wiki/Formulas_for_generating_Pythagorean_triples#Pythagorean_triples_by_use_of_matrices_and_linear_transformations

to ascend the tree of triples. To decend, just use the inverse matrices (which look similar except for some signs being flipped). You can try each inverse in turn but, in fact, you only need use any of the three inverses. If it was not the correct one (meaning not the one used to ascend to the current triple), you will get the ancestor triple anyway, only some of the lengths will be negative. So just take the absolute value and you're done.

For example $$\left(\begin{array}[ccc]11 & 2 & 2 \\ 2 & 1 & 2 \\ 2 & 2 & 3\end{array}\right)^{-1}.\left(\begin{array}[c]1165\\ 52\\173\end{array}\right) = \left(\begin{array}[ccc]11 & 2 & -2 \\ 2 & 1 & -2 \\ -2 & -2 & 3\end{array}\right).\left(\begin{array}[c]1165\\ 52\\173\end{array}\right) = \left(\begin{array}[c] 0-77 \\ 36\\85\end{array}\right) $$

amcalde
  • 4,674
  • If we start with an [indeterminate] triple $(a,b,c)$, is there a single expression in [polynomials of?] $a,b,c$ that we can use to represent the fundamental $(3,4,5)$? – Kieren MacMillan Oct 12 '14 at 01:23
  • Is it not possible to avoid the sign issue? i.e., Is there no formula which can take any Pythagorean triple of positive integers $(a_n,b_n,c_n)$ and give its “ancestor” triple $(a_{n-1},b_{n-1},c_{n-1})$ with all three elements positive? – Kieren MacMillan Aug 18 '16 at 23:55
  • @KierenMacMillan A formula would then be: Use the matrix multiply and then take the absolute value. This is what you're asking for unless I'm misunderstanding. – amcalde Aug 19 '16 at 00:14
  • I want to avoid having to use the absolute value. – Kieren MacMillan Aug 19 '16 at 00:27
  • Then I do not understand what you mean by 'formula'. It sounds like you have a list of functions that are blacklisted. – amcalde Aug 19 '16 at 00:50
  • If by "blacklisted" you mean "I don't want you to use them", then I think the complete set is "the absolute value function". – Kieren MacMillan Aug 19 '16 at 01:24
  • An example… Given: the primitive triple $$\bigl(14x^3,(x^3-7)y^2, x^3y^2+7y^2-14x^3\bigr),$$ where $x$ and $y$ are indeterminate positive integers but we know for sure the three elements in the triple are all positive. Required: the ancestor triple with all three elements positive. – Kieren MacMillan Aug 19 '16 at 02:09
  • @KierenMacMillan: in your example, I see that if we say $2pq=14x^3$ then we can also say $2q^2+2pq=14y^2$, which gives us $7\mid q$. We also get $2p^2+2pq=2x^3y^2$, which gives us $x\mid p$. If $y$ is even, then we have $4pq=(x^3-7)y^2$ as our starting point... I'm not sure about where to go next, I'll have to get out a pen and paper tomorrow... – abiessu Aug 19 '16 at 05:13
  • @abiessu: Note that the triple given was derived from the Mordell equation $y^2=x^3+7$, which has no integer solutions — so it should follow that there are no integers $p,q$ satisfying the requirements. I'm hoping you'll be able to prove that. But I'm also still hoping for a single formula — which avoids the absolute value, and does not require multiple cases based on the relative magnitudes of the components of a given triple — by which one can descend/demote a triple to its [unique] ancestor. – Kieren MacMillan Aug 19 '16 at 12:39
  • 1
    @KierenMacMillan: I can't say that I have much experience with such a venture, but it sounds interesting. I'll see what I can come up with. – abiessu Aug 19 '16 at 14:06
  • 1
    @KierenMacMillan: by the given design of that example, you seem to be saying that although there are numbers supplied as $(a,b,c)$ in a triple, they may not necessarily be a Pythagorean Triple for a given $x,y$, is that right? And following that logic, we would prove that there are no Pythagorean Triples arising from the specified formulas... – abiessu Aug 19 '16 at 14:10
  • @abiessu: Precisely. I've turned the hypothetical integer solutions to $y^2=x^3+7$ into a hypothetical primitive Pythagorean triple, and am now trying to use properties of Pythagorean triples (and/or rational right triangles) to show that there are no such integers. – Kieren MacMillan Aug 19 '16 at 14:40
1

I am coming to this question a bit late. In the orthogonal group of the quadratic form $x^2+y^2-z^2$ there is a reflection you can use to find the parent of each primitive Pythagorean triple (up to sign, as others have noted, and changing signs to make all coordinates positive is another reflection). See Examples 3.2 and 3.3, and the proof of Corollary 3.4, in https://www.math.uconn.edu/~kconrad/blurbs/linmultialg/descentPythag.pdf. The key reflection $s_{123}$ is defined in equation (3.3) there.

This description using a geometric language (in an orthogonal group that is not the standard orthogonal group of 3-dimensional space) does not rely directly on the parametrization formula for primitive Pythagorean triples.

KCd
  • 46,062
1

The ternary rooted tree of Pythagorean triples never made sense to me and has no order that can be sensed just by looking at it. What makes more sense is a pattern of sets within the subset of triples where $GCD(A,B,C)$ is an odd square. This subset includes all primitives. Here is a sample:

$$\begin{array}{c|c|c|c|c|c|c|} n & Triple_1 & Triple_2 & Triple_3 & Triple_4 & Triple_5 & Triple_6 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 & 13,84,85 \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 & 45,108,117 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 & 85,132,157 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 & 133,156,205 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 & 189,180,261 \\ \hline Set_{6} &143,24,145 &165,52,173 &187,84,205 &209,120,241 &231,160,281 & 253,204,325 \\ \hline \end{array}$$

The formula that generates these triples may be used to find successor or predecessor simply by increasing or decreasing the values of $n$ or $k$.

$$A=(2n-1)^2+2(2n-1)k \qquad B=2(2n-1)k+2k^2\qquad C=(2n-1)^2+2(2n-1)k+2k^2 $$

poetasis
  • 6,338
  • What an interesting formulation! Is this known/classical? If so, do you have any links or references? If not, have you proven that all primitives are included, whether there are any duplications, etc.? – Kieren MacMillan Mar 09 '20 at 14:40
  • @Kieren MacMillan This formula is original to me, as far as I know. I discovered it via millions of spreadsheet formulas when I knew nothing about finding Pythagorean triples, not even Euclid's formula. I have not been able to find references to it in dozens of books I've bought or online in web pages or MSE. I've been writing a paper on it and how 'it' and. Euclid's formula may be used to find "triples on demand". Let me know if you find reference to these sets or formula elsewhere. – poetasis Mar 09 '20 at 17:04
  • @@Kieren MacMillan I have proven that all primitives are generated in my paper. First I prove $A^2+B^2=C^2$. Then I prove that $GCD(A,B,C)=(2x-1)^2, x\in\mathbb{N}$. Then I assume that I am missing triples by adding $x$ to the increment of $A$-values. The conclusion is that $B$ cannot be an integer if $2(2n-1)$ does not divide $x$. – poetasis Mar 09 '20 at 17:10
  • 1
    Dickson proved the solution $(r+s,r+t,r+s+t)$ where $2st=r^2$ is a square. With the substitution $(r,s,t)=(2k(2n-1),(2n-1)^2,2k^2)$, we have your solution. It may be that Dickson’s is more general (e.g., $s$ and $t$ don’t have to be squares in his solution); I’d have to do more investigation to determine that for certain. – Kieren MacMillan Mar 09 '20 at 17:30
  • Page 8 in https://www.jstor.org/stable/2968644 has Dickson’s solution. He does require $\gcd(s,t)=1$ [note: $s$ and $t$ are written as $m$ and $n$ in the original paper], so your solution is exactly the same as Dickson’s. – Kieren MacMillan Jul 15 '21 at 19:01
  • I believe your table is the ternary tree in disguise, the three “branches” being: RIGHT (equivalent to $c=b+1$), DOWN (equivalent to $c=a+2$), and DIAGONALLY (equivalent to $b=a+1$). That being said, it is perhaps a more intuitive presentation. – Kieren MacMillan Jul 15 '21 at 21:20