OFFSET
2
COMMENTS
For primitive Pythagorean triples (x,y,z) see the Niven et al. reference, Theorem 5.5, p. 232, and the Hardy-Wright reference, Theorem 225, p.190.
T(n, m) = 1 if and only if there exists a primitive Pythagorean triple (x, y, z) with even y, namely x = n^2 - m^2, y = 2*n*m and z = n^2 + m^2.
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.
FORMULA
T(n, m) = 1 if n > m >= 1, (-1)^(n+m) = -1 and gcd(n, m) = 1, else 0.
EXAMPLE
The triangle T(n, m) begins:
n\m 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
--------------------------------------------------
2: 1
3: 0 1
4: 1 0 1
5: 0 1 0 1
6: 1 0 0 0 1
7: 0 1 0 1 0 1
8: 1 0 1 0 1 0 1
9: 0 1 0 1 0 0 0 1
10: 1 0 1 0 0 0 1 0 1
11: 0 1 0 1 0 1 0 1 0 1
12: 1 0 0 0 1 0 1 0 0 0 1
13: 0 1 0 1 0 1 0 1 0 1 0 1
14: 1 0 1 0 1 0 0 0 1 0 1 0 1
15: 0 1 0 1 0 0 0 1 0 0 0 0 0 1
...
T(5, 2) = 1 because the Pythagorean triple (21, 20, 29) is primitive (pairwise coprime).
T(5, 3) = 0 because the Pythagorean triple (16, 30, 34) is not primitive.
PROG
(PARI) {T(n, m) = n>m && m>0 && (n+m)%2 && gcd(n, m) ==1}; /* Michael Somos, Dec 05 2014 */
CROSSREFS
KEYWORD
AUTHOR
Wolfdieter Lang, Dec 03 2014
STATUS
approved