A321768 Consider the ternary tree of triples P(n, k) with n > 0 and 0 < k <= 3^(n-1), such that P(1, 1) = [3; 4; 5] and each triple t on some row branches to the triples A*t, B*t, C*t on the next row (with A = [1, -2, 2; 2, -1, 2; 2, -2, 3], B = [1, 2, 2; 2, 1, 2; 2, 2, 3] and C = [-1, 2, 2; -2, 1, 2; -2, 2, 3]); T(n, k) is the first component of P(n, k).
3, 5, 21, 15, 7, 55, 45, 39, 119, 77, 33, 65, 35, 9, 105, 91, 105, 297, 187, 95, 207, 117, 57, 377, 299, 217, 697, 459, 175, 319, 165, 51, 275, 209, 115, 403, 273, 85, 133, 63, 11, 171, 153, 203, 555, 345, 189, 429, 247, 155, 987, 777, 539, 1755, 1161, 429
Offset: 1
Examples
The first rows are: 3 5, 21, 15 7, 55, 45, 39, 119, 77, 33, 65, 35
Links
- Rémy Sigrist, Rows n = 1..9, flattened
- Kevin Ryde, Trees of Primitive Pythagorean Triples, section UAD Tree "row-wise A leg".
- Wikipedia, Tree of primitive Pythagorean triples
- Index entries related to Pythagorean Triples
Crossrefs
Programs
-
PARI
M = [[1, -2, 2; 2, -1, 2; 2, -2, 3], [1, 2, 2; 2, 1, 2; 2, 2, 3], [-1, 2, 2; -2, 1, 2; -2, 2, 3]]; T(n,k) = my (t=[3;4;5], d=digits(3^(n-1)+k-1, 3)); for (i=2, #d, t = M[d[i]+1] * t); return (t[1,1])
Formula
Empirically:
- T(n, 1) = 2*n + 1,
- T(n, (3^(n-1) + 1)/2) = A046727(n),
- T(n, 3^(n-1)) = 4*n^2 - 1.
Comments