OFFSET
1,1
COMMENTS
REFERENCES
Beiler, Albert H.: Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.
Sierpinski, W.; Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
EXAMPLE
As the first four primitive Pythagorean triples (ordered by increasing A) are (3,4,5), (5,12,13), (7,24,25) and (8,15,17), then a(1)=5, a(2)=13, a(3)=25 and a(4)=17.
MATHEMATICA
PrimitivePythagoreanTriplets[n_]:=Module[{t={{3, 4, 5}}, i=4, j=5}, While[i<n, If[GCD[i, j]==1, h=Sqrt[i^2+j^2]; If[IntegerQ[h] && j<n, AppendTo[t, {i, j, h}]]; ]; If[j<n, j+=2, i++; j=i+1]]; t]; k=38; data1=PrimitivePythagoreanTriplets[2k^2+2k+1]; data2=Select[data1, #[[1]]<=2k+1 &]; #[[3]] &/@data2
With[{nn=61}, Take[Sqrt[#[[1]]^2+#[[2]]^2]&/@Union[Sort/@({Times@@#, (Last[ #]^2- First[#]^2)/2}&/@(Select[Subsets[Range[1, nn, 2], {2}], GCD@@# == 1&]))], nn]] (* Harvey P. Dale, May 10 2020 *)
PROG
(Haskell)
a156679 n = a156679_list !! (n-1)
a156679_list = f 1 1 where
f u v | v > uu `div` 2 = f (u + 1) (u + 2)
| gcd u v > 1 || w == 0 = f u (v + 2)
| otherwise = w : f u (v + 2)
where uu = u ^ 2; w = a037213 (uu + v ^ 2)
-- Reinhard Zumkeller, Nov 09 2012
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Ant King, Feb 15 2009
STATUS
approved