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.

A277557 The ordered image of the 1-to-1 mapping of an integer ordered pair (x,y) into an integer using Cantor's pairing function, where 0 < x < y, gcd(x,y)=1 and x+y odd.

Original entry on oeis.org

8, 18, 19, 32, 33, 34, 50, 52, 53, 72, 73, 74, 75, 76, 98, 99, 100, 101, 102, 103, 128, 131, 133, 134, 162, 163, 164, 165, 166, 167, 168, 169, 200, 201, 202, 203, 204, 205, 206, 207, 208, 242, 244, 247, 248, 250, 251, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 338
Offset: 1

Views

Author

Frank M Jackson, Oct 19 2016

Keywords

Comments

The mapping of the ordered pair (x,y) to an integer uses Cantor's pairing function to generate the integer as (x+y)(x+y+1)/2+y. Also for every ordered pair (x,y) such that 0 < x < y, gcd(x,y)=1 and x+y odd, there exists a primitive Pythagorean triple (PPT) (a, b, c) such that a = y^2-x^2, b = 2xy, c = x^2+y^2. Therefore each term in the sequence represents a unique PPT.
Numbers n for which 0 < A025581(n) < A002262(n) and A025581(n)+A002262(n) is odd, and gcd(A025581(n), A002262(n)) = 1. [The definition expressed with A-numbers.] - Antti Karttunen, Nov 02 2016
See also the triangle T(y, x) with the values for PPTs given in A278147. - Wolfdieter Lang, Nov 24 2016

Examples

			a(5)=33 because the ordered pair (2,5) maps to 33 by Cantor's pairing function (see below) and is the 5th such occurrence. Also x=2, y=5 generates a PPT with sides (21,20,29).
Note: Cantor's pairing function is simply A001477 in its two-argument tabular form A001477(k, n) = n + (k+n)*(k+n+1)/2, thus A001477(2,5) = 5 + (2+5)*(2+5+1)/2 = 33. - _Antti Karttunen_, Nov 02 2016
		

Crossrefs

Cf. A020882 (is obtained when A048147(a(n)) is sorted into ascending order), A008846 (same with duplicates removed).

Programs

  • Mathematica
    Cantor[{i_, j_}] := (i+j)(i+j+1)/2+j; getparts[n_] := Reverse@Select[Reverse[IntegerPartitions[n, {2}], 2], GCD@@#==1 &]; pairs=Flatten[Table[getparts[2n+1], {n, 1, 20}], 1]; Table[Cantor[pairs[[n]]], {n, 1, Length[pairs]}]

A277632 The ordered integer image of the 1-to-1 mapping of primitive Heronian triples (PHT) into the integers using Cantor's pairing function for triples (N^3 -> N).

Original entry on oeis.org

1381, 2931, 5156, 58658, 70135, 79012, 89680, 106966, 152084, 171416, 197522, 212885, 266098, 295306, 400078, 434790, 675720, 789403, 863969, 866606, 917338, 936413, 1085618, 1149892, 1242687, 1432297, 1628115, 2116668, 2241911, 2250397, 2418925, 2694694, 2699343, 3022126, 3036895, 3059130
Offset: 1

Views

Author

Frank M Jackson, Oct 24 2016

Keywords

Comments

This mapping of the Heronian triple (a,b,c) to an integer is unique and uses Cantor's pairing function K(i,j) = (i+j)(i+j+1)/2+j so that (a,b,c) -> K(K(a,b),c). The table of PHT's used to generate the sequence was obtained from lists generated by Sascha Kurz (see Link). The list contains a triple for every possible PHT with a maximum side length of 10000. The triples are in the form (a,b,c) where a >= b >= c and where a <= 10000.

Examples

			A PHT with sides (a,b,c) = (21,20,13) maps to K(K(21,20),13) = K(881,13) = 400078 = a(15), where Cantor's pairing function K is simply A001477 in its two-argument tabular form A001477(k, n) = n + (k+n)*(k+n+1)/2.
A PHT with sides (a,b,c) = (29,21,20) maps to K(K(29,21),20) = 866606 = a(20). This is a primitive Pythagorean triangle (thus also a primitive Heronian triangle), listed as term a(5)=33 in A277557.
		

Crossrefs

Programs

  • Mathematica
    Cantor[i_, j_] := (i+j)(i+j+1)/2+j; nn=50; lst1=ReadList["C:/primitive_heronian_triangles_1_10000.txt", {Number, Number, Number}]; lst2=Select[lst1, #[[1]]<=2 nn &]; lst={}; Do[({a, b, c}=lst2[[n]]; k=Cantor[Cantor[a, b], c]; AppendTo[lst, k]), {n, 1, Length[lst2]}]; Sort[Select[lst, #
    				

A242061 Position within the triangular array A226314(n)/A054531(n) of rationals x/y such that x < y, gcd(x,y)=1, x+y odd and for the least y, {x, y} are integers such that x*y(y^2-x^2)/A006991(n) is a perfect square.

Original entry on oeis.org

14, 2, 129, 52686, 29, 7, 9, 1274, 296125969, 12012350, 5, 1279281, 44, 302583265614, 780914, 90, 316, 2605, 106023820090609, 1754402265205275806, 7794, 72957466300254, 768323201, 40, 18505, 23, 6478321, 3966329, 326, 14280500082452241
Offset: 1

Views

Author

Frank M Jackson, Aug 13 2014

Keywords

Comments

The triangle array A226314(n)/A054531(n) that enumerates all positive rationals x/y can be generalized to enumerate all ordered pairs {x, y} where x and y are natural numbers. For example, A243808 uses a subset of this triangular array to enumerate all primitive Pythagorean triples (PPT).
A006991(n) is the sequence of primitive congruent numbers and by definition there exists a PPT whose area is equal to k^2*A006991(n) for some integer k. a(n) is an enumeration of these PPT's and is a measure of the number of Pythagorean triangles that have to be searched to find a PPT with the least hypotenuse that has an area equal to k^2*A006991(n). If {x, y} are the generators of a PPT (a, b, c) where a = y^2-x^2, b = 2x*y, c=y^2+x^2 then its area = x*y(y^2-x^2). The Mathematica program limits searches to the first 12.5 million generated PPT's. All other results have been obtained from tables cataloged by Hisanori Mishima (see Links).

Examples

			.  j       {A226314(n),A054531(n)}, 1<=i<=j<=12 and n=i+j(j-1)/2
.  --   --------------------------------------------------------
.   1:  1,1
.   2:  1,2 2,1
.   3:  1,3 2,3 3,1
.   4:  1,4 3,2 3,4 4,1
.   5:  1,5 2,5 3,5 4,5 5,1
.   6:  1,6 4,3 5,2 5,3 5,6 6,1
.   7:  1,7 2,7 3,7 4,7 5,7 6,7 7,1
.   8:  1,8 5,4 3,8 7,2 5,8 7,4 7,8 8,1
.   9:  1,9 2,9 7,3 4,9 5,9 8,3 7,9 8,9 9,1
.  10:  1,10 6,5 3,10 7,5 9,2 8,5 7,10 9,5 9,10 10,1
.  11:  1,11 2,11 3,11 4,11 5,11 6,11 7,11 8,11 9,11 10,11 11,1
.  12:  1,12 7,6 9,4 10,3 5,12 11,2 7,12 11,3 11,4 11,6 11,12 12,1 .
a(13)=44 and A006991(13)=34 so 34 is the 13th congruent number. a(13) gives the 44th term of the triangular array at index (8, 9). This gives (x, y) as (8, 9), it generates the PPT (17, 144, 145) and has an area 6^2*34 = 1224.
		

Crossrefs

Programs

  • Mathematica
    lst1={5, 6, 7, 13, 14, 15, 21, 22, 23, 29, 30, 31, 34, 37, 38, 39, 41, 46, 47, 53, 55, 61, 62, 65, 69, 70, 71, 77, 78, 79, 85, 86, 87, 93, 94, 95, 101}; getpos[n0_] := (lst=0; Do[If[IntegerQ@Sqrt[m*n(m-n)(m+n)/n0]&&OddQ[m+n] && GCD[m, n]==1, (lst=m(m-1)/2+n; Break[])], {m, 2, 5000}, {n, 1, m-1}]; lst); SetAttributes[getpos, Listable]; getpos[lst1]
Showing 1-3 of 3 results.