login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A156678
Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, gcd (A, B) = 1, A < B<C); sequence gives values of B, sorted to correspond to increasing A (A020884(n)).
7
4, 12, 24, 15, 40, 60, 35, 84, 112, 63, 144, 180, 21, 99, 220, 264, 143, 312, 364, 45, 195, 420, 480, 255, 56, 544, 612, 77, 323, 684, 80, 760, 399, 840, 924, 117, 483, 1012, 1104, 55, 575, 1200, 140, 1300, 165, 675, 1404, 1512, 783, 176, 1624, 1740, 91, 221, 899
OFFSET
1,1
COMMENTS
The ordered sequence of A values is A020884(n) and the ordered sequence of B values is A020883(n) (allowing repetitions) and A024354(n) (excluding repetitions)
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.
FORMULA
a(n) = A020884(n) + A156680(n).
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)=4, a(2)=12, a(3)=24 and a(4)=15.
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 &]; #[[2]] &/@data2
PROG
(Haskell)
a156678 n = a156678_list !! (n-1)
a156678_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 = v : f u (v + 2)
where uu = u ^ 2; w = a037213 (uu + v ^ 2)
-- Reinhard Zumkeller, Nov 09 2012
KEYWORD
easy,nonn
AUTHOR
Ant King, Feb 15 2009
STATUS
approved