OFFSET
1,1
COMMENTS
The tree P runs uniquely through every primitive Pythagorean triple.
See A321768 for additional comments about P.
All terms are odd.
LINKS
Rémy Sigrist, Rows n = 1..9, flattened
Wikipedia, Tree of primitive Pythagorean triples
FORMULA
EXAMPLE
The first rows are:
5
13, 29, 17
25, 73, 53, 89, 169, 85, 65, 97, 37
PROG
(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[3, 1])
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Nov 18 2018
STATUS
approved