cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A258149 Triangle of the absolute difference of the two legs (catheti) of primitive Pythagorean triangles.

This page as a plain text file.
%I A258149 #15 Nov 30 2016 02:19:52
%S A258149 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,
%T A258149 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,
%U A258149 119,0,0,0,1,0,73,0,0,0,241
%N A258149 Triangle of the absolute difference of the two legs (catheti) of primitive Pythagorean triangles.
%C A258149 For primitive Pythagorean triangles characterized by certain (n,m) pairs and references see A225949.
%C A258149 Here a(n,m) = 0 for non-primitive Pythagorean triangles, and for primitive Pythagorean triangles a(n,m) = abs(n^2 - m^2 - 2*n*m) = abs((n-m)^2 - 2*m^2).
%C A258149 The number of non-vanishing entries in row n is A055034(n).
%C A258149 D(n,m):= n^2 - m^2 - 2*n*m >= 0 if 1 <= m <= floor(n/(sqrt(2)+1)), and D(n,m) < 0 if n/(sqrt(2)+1)+1 <= m <= n-1, for n >= 2.
%C A258149 The Pell equation (n-m)^2 - 2*m^2 = +/- N is important here to find the representations of +N or -N in the triangle D(n,m). For instance, odd primes N have to be of the +1 (mod 8) (A007519) or -1 (mod 8) (A007522) form, that is, from A001132. See the Nagell reference, Theorem 110, p. 208 with Theorem 111, pp. 210-211. E.g., N = +7 appears for m = 1, 3, 9, 19, 53, ... (A077442) for n = 4, 8, 22, 46, 128, ... (2*A006452).
%C A258149   N = -7 appears for n = 3, 9, 19, 53, 111, ... (A077442) and m = 2, 4, 8, 22, 46, ... (2*A006452).
%C A258149 For the  signed version 2*n*m - (n^2 - m^2) see A278717. - _Wolfdieter Lang_, Nov 30 2016
%D A258149 See also A225949.
%D A258149 T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964, pp. 208, 210-211.
%F A258149 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.
%e A258149 The triangle a(n,m) begins:
%e A258149 n\m   1  2  3  4  5  6  7   8   9  10  11 ...
%e A258149 2:    1
%e A258149 3:    0  7
%e A258149 4:    7  0 17
%e A258149 5:    0  1  0 31
%e A258149 6:   23  0  0  0 49
%e A258149 7:    0 17  0 23  0 71
%e A258149 8:   47  0  7  0 41  0 97
%e A258149 9:    0 41  0  7  0  0  0 127
%e A258149 10:  79  0 31  0  0  0 89   0 161
%e A258149 11:   0 73  0 17  0 47  0 119   0 199
%e A258149 12: 119  0  0  0  1  0 73   0   0   0 241
%e A258149 ...
%e A258149 a(2,1) = |1^2 - 2*1^2| = 1 for the primitive Pythagorean triangle (pPt) [3,4,5] with |3-4| = 1.
%e A258149 a(3,2) = |1^2 - 2*2^2| = 7 for the pPt [5,12,13] with |5 - 12| = 7.
%e A258149 a(4,1) = |3^2 - 2*1^2| = 7 for the pPt [15, 8, 17] with |15 - 8| = 7.
%t A258149 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 *)
%Y A258149 Cf. A249866, A222946, A225949, A222951, A258150, A278717 (signed).
%K A258149 nonn,easy,tabl
%O A258149 2,3
%A A258149 _Wolfdieter Lang_, Jun 10 2015