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.

A020884 Ordered short legs of primitive Pythagorean triangles.

This page as a plain text file.
%I A020884 #73 Feb 06 2025 13:44:10
%S A020884 3,5,7,8,9,11,12,13,15,16,17,19,20,20,21,23,24,25,27,28,28,29,31,32,
%T A020884 33,33,35,36,36,37,39,39,40,41,43,44,44,45,47,48,48,49,51,51,52,52,53,
%U A020884 55,56,57,57,59,60,60,60,61,63,64,65,65,67,68,68,69,69,71,72,73,75,75,76,76,77
%N A020884 Ordered short legs of primitive Pythagorean triangles.
%C A020884 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives values of A, sorted.
%C A020884 Union of A081874 and A081925. - _Lekraj Beedassy_, Jul 28 2006
%C A020884 Each term in this sequence is given by f(m,n) = m^2 - n^2 or g(m,n) = 2mn where m and n are relatively prime positive integers with m > n, m and n not both odd. For example, a(1) = f(2,1) = 2^2 - 1^2 = 3 and a(4) = g(4,1) = 2*4*1 = 8. - _Agola Kisira Odero_, Apr 29 2016
%C A020884 All powers of 2 greater than 4 (2^2) are terms, and are generated by the function g(m,n) = 2mn. - _Torlach Rush_, Nov 08 2019
%H A020884 Ray Chandler, <a href="/A020884/b020884.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Reinhard Zumkeller)
%H A020884 P. Alfeld, <a href="http://www.math.utah.edu/~alfeld/teaching/ptt.html">Pythagorean Triples</a> (broken link)
%H A020884 Nick Exner, <a href="http://www.mste.uiuc.edu/activity/triples">Generating Pythagorean Triples</a>. This was originally a Java applet (1998), modified by Michael McKelvey in 2001 and redone as an HTML page with JavaScript by Evan Ramos in 2014.
%H A020884 W. A. Kehowski, <a href="https://web.archive.org/web/20160705125727/http://web.gccaz.edu/~wkehowsk/187-Precalculus-08-09-Su/triples.pdf">Pythagorean Triples</a>.
%H A020884 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html">Pythagorean Triples and Online Calculators</a>
%t A020884 shortLegs = {}; amx = 99; Do[For[b = a + 1, b < (a^2/2), c = (a^2 + b^2)^(1/2); If[c == IntegerPart[c] && GCD[a, b, c] == 1, AppendTo[shortLegs, a]]; b = b + 2], {a, 3, amx}]; shortLegs (* _Vladimir Joseph Stephan Orlovsky_, Aug 07 2008 *)
%t A020884 Take[Union[Sort/@({Times@@#,(Last[#]^2-First[#]^2)/2}&/@(Select[Subsets[Range[1,101,2],{2}],GCD@@#==1&]))][[;;,1]],80] (* _Harvey P. Dale_, Feb 06 2025 *)
%o A020884 (Haskell)
%o A020884 a020884 n = a020884_list !! (n-1)
%o A020884 a020884_list = f 1 1 where
%o A020884    f u v | v > uu `div` 2        = f (u + 1) (u + 2)
%o A020884          | gcd u v > 1 || w == 0 = f u (v + 2)
%o A020884          | otherwise             = u : f u (v + 2)
%o A020884          where uu = u ^ 2; w = a037213 (uu + v ^ 2)
%o A020884 -- _Reinhard Zumkeller_, Nov 09 2012
%Y A020884 Cf. A009004, A020882, A020883, A020885, A020886. Different from A024352.
%Y A020884 Cf. A024359 (gives the number of times n occurs).
%Y A020884 Cf. A037213.
%K A020884 nonn,easy,nice
%O A020884 1,1
%A A020884 _Clark Kimberling_
%E A020884 Extended and corrected by _David W. Wilson_