OFFSET
1,1
COMMENTS
The tree P runs uniquely through every primitive Pythagorean triple.
See A321768 for additional comments about P.
All terms are even.
LINKS
Rémy Sigrist, Rows n = 1..9, flattened
Wikipedia, Tree of primitive Pythagorean triples
FORMULA
EXAMPLE
The first rows are:
4
12, 20, 8
24, 48, 28, 80, 120, 36, 56, 72, 12
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[2, 1])
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Nov 18 2018
STATUS
approved