A258149 Triangle of the absolute difference of the two legs (catheti) of primitive Pythagorean triangles.
1, 0, 7, 7, 0, 17, 0, 1, 0, 31, 23, 0, 0, 0, 49, 0, 17, 0, 23, 0, 71, 47, 0, 7, 0, 41, 0, 97, 0, 41, 0, 7, 0, 0, 0, 127, 79, 0, 31, 0, 0, 0, 89, 0, 161, 0, 73, 0, 17, 0, 47, 0, 119, 0, 199, 119, 0, 0, 0, 1, 0, 73, 0, 0, 0, 241
Offset: 2
Examples
The triangle a(n,m) begins: n\m 1 2 3 4 5 6 7 8 9 10 11 ... 2: 1 3: 0 7 4: 7 0 17 5: 0 1 0 31 6: 23 0 0 0 49 7: 0 17 0 23 0 71 8: 47 0 7 0 41 0 97 9: 0 41 0 7 0 0 0 127 10: 79 0 31 0 0 0 89 0 161 11: 0 73 0 17 0 47 0 119 0 199 12: 119 0 0 0 1 0 73 0 0 0 241 ... a(2,1) = |1^2 - 2*1^2| = 1 for the primitive Pythagorean triangle (pPt) [3,4,5] with |3-4| = 1. a(3,2) = |1^2 - 2*2^2| = 7 for the pPt [5,12,13] with |5 - 12| = 7. a(4,1) = |3^2 - 2*1^2| = 7 for the pPt [15, 8, 17] with |15 - 8| = 7.
References
- See also A225949.
- T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 208, 210-211.
Programs
-
Mathematica
a[n_, m_] /; n > m >= 1 && CoprimeQ[n, m] && (-1)^(n+m) == -1 := Abs[n^2 - m^2 - 2*n*m]; a[, ] = 0; Table[a[n, m], {n, 2, 12}, {m, 1, n-1}] // Flatten (* Jean-François Alcover, Jun 16 2015, after given formula *)
Formula
a(n,m) = abs(n^2 - m^2 -2*n*m) = abs((n-m)^2 - 2*m^2) if n > m >= 1, gcd(n,m) = 1, and n and m are integers of opposite parity (i.e., (-1)^(n+m) = -1); otherwise a(n,m) = 0.
Comments