OFFSET
1,1
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.
LINKS
Sascha Kurz, On the generation of Heronian triangles, Serdica Journal of Computing. 2 (2) (2008): pp. 181-196
Sascha Kurz, Lists of primitive Heronian triples, Bayreuth University
Wikipedia, Cantor's pairing function, and Heronian triangle
EXAMPLE
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.
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, #<Cantor[Cantor[nn, nn], nn] &]] (* For download of file of primitive Heronian triples see Link *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank M Jackson, Oct 24 2016
STATUS
approved