OFFSET
1,2
COMMENTS
LINKS
Eric Weisstein's World of Mathematics, Pythagorean Triple
EXAMPLE
n=6, k=5: 6^2 + 5^2 = 36 + 25 = 61: (6^2 - 5^2)^2 + (2*6*5)^2 = 11^2 + 60^2 = 121 + 3600 = 3721 = 61^2 = T(6,5)^2;
n=7, k=3: 7^2 + 3^2 = 49 + 9 = 58: (7^2 - 3^2)^2 + (2*7*3)^2 = 40^2 + 42^2 = 1600 + 1764 = 3364 = 58^2 = T(7,3)^2.
Triangle begins:
0,
5, 0,
10, 13, 0,
17, 0, 25, 0,
26, 29, 34, 41, 0,
37, 0, 0, 0, 61, 0,
...
MATHEMATICA
Join[{0}, Table[If[CoprimeQ[n, k], n^2+k^2, 0], {n, 2, 20}, {k, n}]//Flatten] (* Harvey P. Dale, Jul 13 2018 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Nov 05 2003
STATUS
editing