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.

Showing 1-3 of 3 results.

A222946 Triangle for hypotenuses of primitive Pythagorean triangles.

Original entry on oeis.org

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, 113, 0, 85, 0, 97, 0, 0, 0, 145, 101, 0, 109, 0, 0, 0, 149, 0, 181, 0, 125, 0, 137, 0, 157, 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
Offset: 2

Views

Author

Wolfdieter Lang, Mar 21 2013

Keywords

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.
Here a(n,m) = 0 for non-primitive Pythagorean triangles.
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.
The diagonal sequence is given by a(n,n-1) = A001844(n-1), n >= 2.
The row sums of this triangle are 5, 13, 42, 70, 98, 203, 340, 327, 540, ...
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
The number of non-vanishing entries in row n is A055034(n). - Wolfdieter Lang, Mar 24 2013
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
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

Examples

			The triangle a(n,m) begins:
n\m   1   2   3   4   5   6   7   8   9  10  11  12   13 ...
2:    5
3:    0  13
4:   17   0  25
5:    0  29   0  41
6:   37   0   0   0  61
7:    0  53   0  65   0  85
8:   65   0  73   0  89   0 113
9:    0  85   0  97   0   0   0 145
10: 101   0 109   0   0   0 149   0 181
11:   0 125   0 137   0 157   0 185   0 221
12: 145   0   0   0 169   0 193   0   0   0 265
13:   0 173   0 185   0 205   0 233   0 269   0 313
14: 197   0 205   0 221   0   0   0 277   0 317   0  365
...
------------------------------------------------------------
a(7,4) = 7^2 + 4^2 = 49 + 16 = 65.
a(8,1) = 8^2 + 1^2 = 64 +  1 = 65.
a(3,1) = 0 because n and m are both odd.
a(4,2) = 0 because n and m are both even.
a(6,3) = 0 because gcd(6,3) = 3 (not 1).
The primitive triangle for (n,m) = (2,1) is (x,y,z) = (3,4,5).
The primitive triangle for (n,m) = (7,4) is (x,y,z) = (33,56,65).
The primitive triangle for (n,m) = (8,1) is (x,y,z) = (63,16,65).
		

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.

Crossrefs

Cf. A020882 (ordered nonzero values a(n,m) with multiplicity).
Cf. A249866, A225950 (odd legs), A225951 (perimeters), A225952 (even legs), A225949 (leg sums), A249869 (areas), A258149 (absolute leg differences), A278717 (leg differences).

Programs

  • Haskell
    a222946 n k = a222946_tabl !! (n-2) !! (k-1)
    a222946_row n = a222946_tabl !! (n-2)
    a222946_tabl = zipWith p [2..] a055096_tabl where
       p x row = zipWith (*) row $
                 map (\k -> ((x + k) `mod` 2) * a063524 (gcd x k)) [1..]
    -- Reinhard Zumkeller, Mar 23 2013

Formula

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.

A225949 Triangle for sum of the two legs (catheti) of primitive Pythagorean triangles.

Original entry on oeis.org

7, 0, 17, 23, 0, 31, 0, 41, 0, 49, 47, 0, 0, 0, 71, 0, 73, 0, 89, 0, 97, 79, 0, 103, 0, 119, 0, 127, 0, 113, 0, 137, 0, 0, 0, 161, 119, 0, 151, 0, 0, 0, 191, 0, 199, 0, 161, 0, 193, 0, 217, 0, 233, 0, 241, 167, 0, 0, 0, 239, 0, 263, 0, 0, 0, 287, 0, 217, 0, 257, 0, 289, 0, 313, 0, 329, 0, 337, 223, 0, 271, 0, 311, 0, 0, 0, 367, 0, 383, 0, 391
Offset: 2

Views

Author

Wolfdieter Lang, May 21 2013

Keywords

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.
Here a(n,m) = 0 for non-primitive Pythagorean triangles.
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. The mirror triangles with x even are not considered here. Therefore a(n,m) = n^2 - m^2 + 2*n*m (for these solutions).
The number of non-vanishing entries in row n is A055034(n).
The sequence of the main diagonal is 2*n^2-1 = A056220(n), n>= 2.
The sequence of the main diagonal is j^2 + k^2 - 2 or 2*j*k if n>=2 and j = n + sqrt(2)/2 and k = n - sqrt(2)/2. - Avi Friedlich, Mar 30 2015
If the 0 entries are eliminated and the numbers are ordered increasingly (keeping multiple entries) the sequence becomes A198441(n-1), n>=2. If multiple entries are recorded only once this becomes A058529 (a proper subsequence of A118905). Note that all leg sums <= N are certainly reached if one considers rows n = 2, ..., floor(-1 + sqrt(N+2)).
a(n, m) also gives twice the member t(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*s(n, m) = A222946(n, m). See A278717 for details and the Keith Conrad reference. - Wolfdieter Lang, Nov 30 2016

Examples

			The triangle a(n,m) begins:
n\m   1   2   3   4   5   6    7    8    9   10   11 ...
2:    7
3:    0  17
4:   23   0  31
5:    0  41   0  49
6:   47   0   0   0  71
7:    0  73   0  89   0  97
8:   79   0 103   0 119   0  127
9:    0 113   0 137   0   0    0  161
10: 119   0 151   0   0   0  191    0  199
11:   0 161   0 193   0 217    0  233    0  241
12: 167   0   0   0 239   0  263    0    0    0  287
...
---------------------------------------------------------
The primitive triangle for (n,m) = (2,1) is (x,y,z) = (3,4,5), with a(2,1) = 3 + 4 = 7.
The primitive triangle for (n,m) = (7,4) is (x,y,z) = (33,56,65), with a(7,4) = 33 + 56 = 89.
The primitive triangle for (n,m) = (8,1) is (x,y,z) = (63,16,65), with a(8,1) = 63 + 16 = 79.
All primitive Pythagorean triangles with leg sums <= 167 are certainly covered by this triangle (rows n = 2..12), and the multiplicities are also correct, e.g., 119 appears twice.
		

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.

Crossrefs

Cf. A222946 (hypotenuses), A222951 (perimeters), A056220 (main diagonals), A198441 (no zeros, ordered), A258149 (absolute leg differences), A278717 (leg differences).

Programs

  • Mathematica
    T[n_, m_] := If[n > m >= 1 && GCD[n, m] == 1 && (-1)^(n+m) == -1, (n+m)^2 - 2 m^2, 0];
    Table[T[n, m], {n, 2, 14}, {m, 1, n-1}] // Flatten (* Jean-François Alcover, Oct 22 2021 *)

Formula

a(n,m) = (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.

A258150 Triangle of Fibonacci's congruum (congruous) numbers divided by 24 based on primitive Pythagorean triangles. Areas divided by 6 of these triangles.

Original entry on oeis.org

1, 0, 5, 10, 0, 14, 0, 35, 0, 30, 35, 0, 0, 0, 55, 0, 105, 0, 154, 0, 91, 84, 0, 220, 0, 260, 0, 140, 0, 231, 0, 390, 0, 0, 0, 204, 165, 0, 455, 0, 0, 0, 595, 0, 285, 0, 429, 0, 770, 0, 935, 0, 836, 0, 385, 286, 0, 0, 0, 1190, 0, 1330, 0, 0, 0, 506
Offset: 2

Views

Author

Wolfdieter Lang, Jun 11 2015

Keywords

Comments

The problem is: given a square, find a positive integer that, whether added to or subtracted from that square, yields a square. That is, both x^2 + C = y^2 and x^2 - C = z^2. Equivalently: z^2 + C = x^2 and x^2 + C = y^2 (squares in arithmetic progression). This is treated in Fibonacci's 'The book of squares' (Liber Quadratorum (1225) but for rational x,y,z). See the Sigler reference, Proposition 14, pp. 53-74 (note that the formulation of this problem on p. 53 is not correct, 'from a square' should read 'from the same square'). See also van der Waerden, pp. 40-42, and A. Weil, pp. 13-14. The desired number C is called a congruum by Fibonacci (a congruous number in Sigler's translation).
For the history of this problem, see Dickson, pp. 459-472 (he uses the (misleading) term congruent number).
The following solution is based on primitive Pythagorean triangles. (Fibonacci's solution is based on sums of odd squares.) The triangle T(n, m) = 24*C(n, m) will have 0's for those (n, m) not leading to primitive Pythagorean triples.
Addition of the two equations, substitution of y = u + v > 0 and z = |u - v| and division by 2 leads to x^2 = u^2 + v^2. Consider primitive Pythagorean triples (u, v, x) with even v which are pairwise relatively prime. Then also GCD(u,v,x) = 1. A common factor f for u, v and x would lead to a multiplication by f^2 on both sides of the two equations. For primitive Pythagorean triples see A249866. One has u = n^2 - m^2, v = 2*n*m and x = n^2 + m^2 with GCD(n, m) = 1 , n > m >= 1, n + m odd. Then C = C(n, m) = 4*n*m*(n^2 - m^2) = 2*v(n, m)*u(n, m). This is four times the area of the Pythagorean triangle. C is divisible by 4! = 24 (see A020885). Define T(n, m) = C(n, m)/4!, for 2 <= m + 1 <= n. This is the area of the corresponding primitive Pythagorean triangle divided by 6.
The corresponding x = x(n, m), y = y(n, m) and z(n, m) number triangles are given in A222946, A225949 and A258149 respectively.
T(n, m) = n*m*(n^2 - m^2)/6, for m = 1, 2, ..., n-1, has for n >= 2 the minimum value at m = 1, and the next largest value appears for n >= 3 at m = n-1. Note all (n, m) pairs are considered here. The proof of the first part is easy. The proof of T(n, m) - T(n, n-1) > 0, for m = 2, 3, ..., n-2, and n >= 3, is equivalent to n^2*(m-2) + 3*n > m^3 +1 and this is easy to prove with n >= m+2 and m >= 2. Therefore the triangle T(n, m) with 0's attains for even n the smallest nonzero row entry at m = 1, and for odd n the smallest nonzero row entry appears at m = n-1 (last entry).
This allows us to find (after solution of two cubic equations for even and odd n, named ne = ne(N) and no = no(N)) a row number nmin(N) = max(ne(n), no(N)) such that N will not appear in any row n > nmin(N).
The original problem posed to Fibonacci by Giovanni di Palermo (Master John of Palermo) was to find a [rational] square that when increased or decreased by 5 gives a square. Fibonacci gave the solution in his Liber Quadratorum in Proposition 17 (see Sigler, pp. 77-81) as x^2 = (41/12)^2 = 1681/144, y^2 = (49/12)^2 = 2401/144 and z^2 = (31/12)^2 = 961/144. This corresponds to the integer quartet (C; x, y, z) = (720; 41, 49, 31) corresponding to the primitive Pythagorean triple [9, 40, 41]. See the examples for (n, m) = (5, 4).
The numbers without zeros, in nondecreasing order, are given in A020885 = A024406/6.
Comments from Eric Snyder, Feb 07 2023: (Start)
If m+n > 3 and not divisible by 3, then m+n | T(n,m).
Additionally, if 2n-1 > 3 and not divisible by 3, then 2n-1 = 6k+-1, and T(n,n-1) = (2n-1)*P(-+k), where P(-+k) is a generalized pentagonal number (A001318). For example, T(6,5) = 11*P(-2) = 11*5.
T(n,n-1) = A000330(n-1) for n>=2. (End)

Examples

			The triangle T(n, m) begins:
n\m   1   2   3   4    5   6    7   8   9  10    11
2:    1
3:    0   5
4:   10   0  14
5:    0  35   0  30
6:   35   0   0   0   55
7:    0 105   0 154    0  91
8:   84   0 220   0  260   0  140
9:    0 231   0 390    0   0    0 204
10: 165   0 455   0    0   0  595   0 285
11:   0 429   0 770    0 935    0 836   0 385
12: 286   0   0   0 1190   0 1330   0   0   0   506
...
The smallest nonzero number for each row with even n is T(n, 1), and for odd n it is T(n, n-1).
The above mentioned nmin(N) will for N = 300 be 12.
Therefore, no number > 300 will appear for rows with n > 12.
-----------------------------------------------------
The corresponding quartets (C; x, y, z) are:
n=2:  (24; 5, 7, 1),
n=3:  (120; 13, 17, 7),
n=4:  (240; 17, 23, 7), (336; 25, 31, 17),
n=5:  (840; 29, 41, 1), (720; 41, 49, 31),
n=6:  (840; 37, 47, 23), (1320; 61, 71, 49),
n=7:  (2520; 53, 73, 17), (3696; 65, 89, 23),
      (2184; 85, 97, 71),
n=8:  (2016; 65, 79, 47), (5280; 73, 103, 7),
      (6240; 89, 119, 41), (3360; 113, 127, 97),
n=9:  (5544; 85, 113, 41), (9360; 97, 137, 7),
      (4896; 145, 161, 127),
n=10: (3960; 101, 119, 79), (10920; 109, 151, 31),
      (14280; 149, 191, 89), (6840; 181, 199, 161),
n=11: (10296; 125, 161, 73), (18480; 137, 193, 17),
      (22440; 157, 217, 47), (20064; 185, 233, 119),
      (9240; 221, 241, 199),
n=12: (6864; 145, 167, 119), (28560; 169, 239, 1),
      (31920; 193, 263, 73), (12144; 265, 287, 241),
...
-----------------------------------------------------
The corresponding primitive Pythagorean triples
(u, v, x) are:
n=2:  [3, 4, 5],
n=3:  [5, 12, 13],
n=4:  [15, 8, 17], [7, 24, 25],
n=5:  [21, 20, 29],[9, 40, 41],
n=6:  [35, 12, 37], [11, 60, 61],
n=7:  [45, 28, 53], [33, 56, 65],
      [13, 84, 85],
n=8:  [63, 16, 65], [55, 48, 73],
      [39, 80, 89], [15, 112, 113],
n=9:  [77, 36, 85], [65, 72, 97],
      [17, 144, 145],
n=10: [99, 20, 101], [91, 60, 109],
      [51, 140, 149], [19, 180, 181],
n=11: [117, 44, 125], [105, 88, 137],
      [85, 132, 157], [57, 176, 185],
      [21, 220, 221],
n=12: [143, 24, 145], [119, 120, 169],
      [95, 168, 193], [23, 264, 265],
...
		

References

  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 2, 1920, pp. 459-472.
  • L. E. Sigler, Leonardo Pisano, Fibonacci, The book of squares, Academic Press, 1987.
  • B. L. van der Waerden, A History of Algebra, Springer, 1985, pp. 40-42.
  • André Weil, Number Theory, An approach through history, From Hammurapi to Legendre, Birkhäuser, 1984, pp. 13-14.

Crossrefs

Programs

  • Mathematica
    T[n_, m_] /; 2 <= m+1 <= n && OddQ[n+m] && CoprimeQ[n, m] := n*m*(n^2 - m^2)/6; T[, ] = 0; Table[T[n, m], {n, 2, 12}, {m, 1, n-1}] // Flatten (* Jean-François Alcover, Jun 16 2015, after given formula *)

Formula

T(n, m) = n*m*(n^2 - m^2)/6 if 2 <= m+1 <= n, n+m odd, GCD(n, m) = 1 and 0 otherwise.
Showing 1-3 of 3 results.