A278147 Triangle read by rows of Cantor pairing function value determining primitive Pythagorean triangles or 0 if there is no such triangle.
8, 0, 18, 19, 0, 32, 0, 33, 0, 50, 34, 0, 0, 0, 72, 0, 52, 0, 73, 0, 98, 53, 0, 74, 0, 99, 0, 128, 0, 75, 0, 100, 0, 0, 0, 162, 76, 0, 101, 0, 0, 0, 163, 0, 200, 0, 102, 0, 131, 0, 164, 0, 201, 0, 242, 103, 0, 0, 0, 165, 0, 202, 0, 0, 0, 288, 0, 133, 0, 166, 0, 203, 0, 244, 0, 289, 0, 338, 134, 0, 167, 0, 204
Offset: 2
Examples
The triangle begins: n\m 1 2 3 4 5 6 7 8 9 10... 2: 8 3: 0 18 4: 19 0 32 5: 0 33 0 50 6: 34 0 0 0 7272 7: 0 52 0 73 0 98 8: 53 0 74 0 99 0 128 9: 0 75 0 100 0 0 0 162 10: 76 0 101 0 0 0 163 0 200 11: 0 102 0 131 0 164 0 201 0 242 ... n = 12: 103 0 0 0 165 0 202 0 0 0 288, n = 13: 0 133 0 166 0 203 0 244 0 289 0 338, n = 14: 134 0 167 0 204 0 0 0 290 0 339 0 392, n = 15: 0 168 0 205 0 0 0 291 0 0 0 0 0 450. ... T(3,1) = 0 because 3+1 =4 is even. T(4,2) = 0 because GCD(4,2) = 2 > 1. T(3,2) = (2+3)*(2+3)/2 + 3 = 5*3 + 3 = 18. ... In order to reach all values T(n,m) <= 50 one has to take rows n = 2..6. ...
Formula
T(n, m) = (m+n)*(m+n+1)/2 + n, n >= 2, m = 1, 2, ..., n-1, and 0 if GCD(n,m) > 1 or n+m is even.
Comments