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.

A156678 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, gcd (A, B) = 1, A < B sequence gives values of B, sorted to correspond to increasing A (A020884(n)).

This page as a plain text file.
%I A156678 #11 Jan 08 2024 09:26:23
%S A156678 4,12,24,15,40,60,35,84,112,63,144,180,21,99,220,264,143,312,364,45,
%T A156678 195,420,480,255,56,544,612,77,323,684,80,760,399,840,924,117,483,
%U A156678 1012,1104,55,575,1200,140,1300,165,675,1404,1512,783,176,1624,1740,91,221,899
%N 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)).
%C A156678 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)
%D A156678 Beiler, Albert H.: Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.
%D A156678 Sierpinski, W.; Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.
%H A156678 Reinhard Zumkeller, <a href="/A156678/b156678.txt">Table of n, a(n) for n = 1..1000</a>
%H A156678 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html">Right-angled Triangles and Pythagoras' Theorem</a>
%F A156678 a(n) = A020884(n) + A156680(n).
%e A156678 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.
%t A156678 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
%o A156678 (Haskell)
%o A156678 a156678 n = a156678_list !! (n-1)
%o A156678 a156678_list = f 1 1 where
%o A156678    f u v | v > uu `div` 2        = f (u + 1) (u + 2)
%o A156678          | gcd u v > 1 || w == 0 = f u (v + 2)
%o A156678          | otherwise             = v : f u (v + 2)
%o A156678          where uu = u ^ 2; w = a037213 (uu + v ^ 2)
%o A156678 -- _Reinhard Zumkeller_, Nov 09 2012
%Y A156678 A020884, A020883, A024354, A156679, A042965, A156680, A156681, A042965.
%Y A156678 Cf. A037213.
%K A156678 easy,nonn
%O A156678 1,1
%A A156678 _Ant King_, Feb 15 2009