Basic Examples (2)
Given a primitive Pythagorean triple, find its position on the Barning-Hall tree:
See the tree:
Scope (2)
Use "PathWithFibonacciPythagoreanPair" to show the tree withFibonacci matrices from the root node to the target:
Use "PathWithPythagoreanTriple" to show the tree from root node to the target with Fibonacci matrices:
Properties and Relations (3)
BarningHallTreePosition with "PathWithFibonacciPythagoreanPair" automatically aligns the Pythagorean triples vertically in the node to minimize the width of each node as the triples grows rapidly:
"PathWithPythagoreanTriple" saves raw data therefore no automatic formatting implemented:
Use TreeMap and Column or TableForm function to convert the tree into more compact and legible form:
BarningHallTreePosition properly handles the display of gigantic Pythagorean triples with deep tree levels using the Format function internally. Together with TreeExtract and TreeElementStyle we can create a neat subtree. Specify a Pythagorean triple with huge values:
Each number is close to 170 digits:
The path on the tree has 300 levels of depth and would not be a useful visualization:
Take the last three levels including the target input on the tree:
Customize the coordinate for the tree nodes to arrange the sibling, parents and grandparent node for the input:
Possible Issues (3)
The input must be Pythagorean triple. For instance {5,12,14} is not Pythagorean. The function returns unevaluated:
The Pythagorean triple must be primitive. For instance {5,12,13} with GCD[5,12,13] = 1. {10,24,26} is Pythagorean but not primitive. The input yields unevaluated form:
The function uses canonical primitive Pythagorean triple notation as it is compatible with its intermediate triples. Changing the sequence of the input results in an unevaluated result:
Neat Examples (8)
Schinzel’s hypothesis H implies that there are infinite number of primitive Pythagorean triples with two primes. This requires that both odd leg a and odd hypotenuse being prime number and the length of the even leg is one less than that of the hypotenuse. Let's take a look at the example:
Solve for the Pythagorean equation and notice that b is one less than c:
Actually, given such c, the other two variables are determined in this Diophantine equation:
For other cases, we choose prime p such that is also a prime number:
Pick 5 elements and we can check the location of the triples on the tree with obvious pattern:
For instance, we can visualize the {11,60,61} on the B-H tree:
The number of 3's in each position for primitive Pythagorean triple with two primes defines an interesting sequence. The sequence is A068501 with each term minus one:
Plot the curve of the sequence:
Notice that the tree position of repeating 3's is just a necessary condition for Pythagorean triple to have 2 primes. (7,24,25) is at {3,3} and 25 is not prime. In fact, the tree position of repeating 3's is sufficient and necessary condition for primitive Pythagorean triple with (a,c-1,c) form in our Barning-Hall tree convention. Those triples with two primes are strictly in the subset of the (a,c-1,c) cases.