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.

A222946 Triangle for hypotenuses of primitive Pythagorean triangles.

This page as a plain text file.
%I A222946 #41 Sep 26 2021 05:07:03
%S A222946 5,0,13,17,0,25,0,29,0,41,37,0,0,0,61,0,53,0,65,0,85,65,0,73,0,89,0,
%T A222946 113,0,85,0,97,0,0,0,145,101,0,109,0,0,0,149,0,181,0,125,0,137,0,157,
%U A222946 0,185,0,221,145,0,0,0,169,0,193,0,0,0,265,0,173,0,185,0,205,0,233,0,269,0,313,197,0,205,0,221,0,0,0,277,0,317,0,365
%N A222946 Triangle for hypotenuses of primitive Pythagorean triangles.
%C A222946 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.
%C A222946 Here a(n,m) = 0 for non-primitive Pythagorean triangles.
%C A222946 There is a one-to-one correspondence between the values n and m of this number triangle for which a(n,m) does not vanish and primitive solutions of x^2 + y^2 = z^2 with y even, namely x = n^2 - m^2, y = 2*n*m and z = n^2 + m^2.
%C A222946 The diagonal sequence is given by a(n,n-1) = A001844(n-1), n >= 2.
%C A222946 The row sums of this triangle are 5, 13, 42, 70, 98, 203, 340, 327, 540, ...
%C A222946 a(n,k) = A055096(n-1,k) * ((n+k) mod 2) * A063524 (gcd(n,k)): terms in A055096 that are not hypotenuses in primitive Pythagorean triangles, are replaced by 0. - _Reinhard Zumkeller_, Mar 23 2013
%C A222946 The number of non-vanishing entries in row n is A055034(n). - _Wolfdieter Lang_, Mar 24 2013
%C A222946 The non-vanishing entries when ordered according to nondecreasing leg sums x+y (see A225949 and A198441) produce (with multiplicities) A198440. - _Wolfdieter Lang_, May 22 2013
%C A222946 a(n, m) also gives twice the member s(n, m) of the triple (r(n, m), s(n, m), t(n, m)) with squares r(n, m)^2, s(n, m)^2 and t(n, m)^2 in arithmetic progression with common difference A(n, m) = A249869(n, m), the area of the primitive Pythagorean triangle, or 0 if there is no such triangle. The other members are given by 2*r(n, m) = A278717(n, m) and 2*t(n, m) = A225949(n, m). See A278717 for details and the Keith Conrad reference there. - _Wolfdieter Lang_, Nov 30 2016
%D A222946 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
%D A222946 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.
%H A222946 Reinhard Zumkeller, <a href="/A222946/b222946.txt">Rows n = 2..120 of triangle, flattened</a>
%F A222946 a(n,m) = n^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 A222946 The triangle a(n,m) begins:
%e A222946 n\m   1   2   3   4   5   6   7   8   9  10  11  12   13 ...
%e A222946 2:    5
%e A222946 3:    0  13
%e A222946 4:   17   0  25
%e A222946 5:    0  29   0  41
%e A222946 6:   37   0   0   0  61
%e A222946 7:    0  53   0  65   0  85
%e A222946 8:   65   0  73   0  89   0 113
%e A222946 9:    0  85   0  97   0   0   0 145
%e A222946 10: 101   0 109   0   0   0 149   0 181
%e A222946 11:   0 125   0 137   0 157   0 185   0 221
%e A222946 12: 145   0   0   0 169   0 193   0   0   0 265
%e A222946 13:   0 173   0 185   0 205   0 233   0 269   0 313
%e A222946 14: 197   0 205   0 221   0   0   0 277   0 317   0  365
%e A222946 ...
%e A222946 ------------------------------------------------------------
%e A222946 a(7,4) = 7^2 + 4^2 = 49 + 16 = 65.
%e A222946 a(8,1) = 8^2 + 1^2 = 64 +  1 = 65.
%e A222946 a(3,1) = 0 because n and m are both odd.
%e A222946 a(4,2) = 0 because n and m are both even.
%e A222946 a(6,3) = 0 because gcd(6,3) = 3 (not 1).
%e A222946 The primitive triangle for (n,m) = (2,1) is (x,y,z) = (3,4,5).
%e A222946 The primitive triangle for (n,m) = (7,4) is (x,y,z) = (33,56,65).
%e A222946 The primitive triangle for (n,m) = (8,1) is (x,y,z) = (63,16,65).
%o A222946 (Haskell)
%o A222946 a222946 n k = a222946_tabl !! (n-2) !! (k-1)
%o A222946 a222946_row n = a222946_tabl !! (n-2)
%o A222946 a222946_tabl = zipWith p [2..] a055096_tabl where
%o A222946    p x row = zipWith (*) row $
%o A222946              map (\k -> ((x + k) `mod` 2) * a063524 (gcd x k)) [1..]
%o A222946 -- _Reinhard Zumkeller_, Mar 23 2013
%Y A222946 Cf. A020882 (ordered nonzero values a(n,m) with multiplicity).
%Y A222946 Cf. A249866, A225950 (odd legs), A225951 (perimeters), A225952 (even legs), A225949 (leg sums), A249869 (areas), A258149 (absolute leg differences), A278717 (leg differences).
%K A222946 nonn,easy,tabl,look
%O A222946 2,1
%A A222946 _Wolfdieter Lang_, Mar 21 2013