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.
%I A009000 #89 May 25 2025 17:10:00 %S A009000 5,10,13,15,17,20,25,25,26,29,30,34,35,37,39,40,41,45,50,50,51,52,53, %T A009000 55,58,60,61,65,65,65,65,68,70,73,74,75,75,78,80,82,85,85,85,85,87,89, %U A009000 90,91,95,97,100,100,101,102,104,105,106,109,110,111,113,115,116,117,119,120 %N A009000 Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares). %C A009000 The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c. %C A009000 If c^2 = a^2 + b^2 (a < b < c) then c^2 = (n^2 + m^2)/2 with n = b - a, m = b + a. - _Zak Seidov_, Mar 03 2011 %C A009000 Numbers n such that A083025(n) > 0, i.e., n is divisible by at least one prime of the form 4k+1. - _Max Alekseyev_, Oct 24 2008 %C A009000 A number appears only once in the sequence if and only if it is divisible by exactly one prime of the form 4k+1 with multiplicity one (cf. A084645). - _Jean-Christophe Hervé_, Nov 11 2013 %C A009000 If c^2 = a^2 + b^2 with a and b > 0, then a <> b: the sum of 2 equal squares cannot be a square because sqrt(2) is not rational. - _Jean-Christophe Hervé_, Nov 11 2013 %D A009000 W. L. Schaaf, Recreational Mathematics, A Guide To The Literature, "The Pythagorean Relationship", Chapter 6 pp. 89-99 NCTM VA 1963. %D A009000 W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 2, "The Pythagorean Relation", Chapter 6 pp. 108-113 NCTM VA 1972. %D A009000 W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 3, "Pythagorean Recreations", Chapter 6 pp. 62-6 NCTM VA 1973. %H A009000 Zak Seidov and T. D. Noe, <a href="/A009000/b009000.txt">Table of n, a(n) for n = 1..10000</a> (Zak Seidov entered the first 1981 terms). %H A009000 Anonymous, <a href="http://www.tssi.com/Pythagoras%20Connections.html">Links to Pythagorean Theorem Proofs</a> %H A009000 Henry Bottomley, <a href="http://www.se16.info/hgb/pyth.htm">Pythagoras's theorem (animated proof)</a> %H A009000 Kangourou Math Website, <a href="http://www.mathkang.org/swf/pythagore2.html">L'animation du theoreme de Pythagore</a> %H A009000 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html">Pythagorean Triples and Online Calculators</a> %H A009000 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html">Right-angled Triangles and Pythagoras' Theorem</a> %H A009000 I. Kobayashi et al., <a href="https://web.archive.org/web/20120213104859/http://www.ies.co.jp/math/java/geo/pythagoras.html">Pythagorean Theorem (Java Interactive Proofs, Applications and Explorations)</a> %H A009000 Mathematical Database, Poster, <a href="http://mathdb.org/gallery/poster/description/e_poster_01.htm">7 Ways to prove the Pythagorean Theorem</a> %H A009000 B. Richmond, <a href="http://www.wku.edu/~tom.richmond/Pythag.html">The Pythagorean Theorem</a> %H A009000 M. Shepperd, <a href="http://www.teachers.ash.org.au/mikemath/resources/pythagoras.html">Web Resources on Pythagoras' Theorem</a> %H A009000 J. S. Silverman, A Friendly Introduction to Number Theory, <a href="https://www.math.brown.edu/johsilve/frintch1ch6.pdf">Chapters 1 to 6</a> (see Chapters 2 and 3). %H A009000 G. Villemin's Almanach of Numbers, <a href="http://villemin.gerard.free.fr/Wwwgvmm/Addition/ThPythag.htm">Triangles & Triplets de Pythagore</a> %H A009000 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a> %H A009000 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %p A009000 A009000:=proc(N) # To get all terms <= N %p A009000 local p,q,i,L; %p A009000 L:=[]; %p A009000 for p from 2 to floor(sqrt(N-1)) do %p A009000 for q to p-1 do %p A009000 if igcd(p,q)=1 and is(p-q,odd) then %p A009000 L:=[op(L),seq(i*(p^2+q^2),i=1..N/(p^2+q^2))]; %p A009000 fi %p A009000 od %p A009000 od; %p A009000 return op(sort(L)) %p A009000 end proc: %p A009000 A009000(120); # _Felix Huber_, Feb 10 2025 %t A009000 max = 120; hypotenuseQ[n_] := For[k = 1, True, k++, p = Prime[k]; Which[Mod[p, 4] == 1 && Divisible[n, p], Return[True], p > n, Return[False]]]; hypotenuses = Select[Range[max], hypotenuseQ]; red[c_] := {a, b, c} /. {ToRules[ Reduce[0 < a <= b && a^2 + b^2 == c^2, {a, b}, Integers]]}; A009000 = Flatten[red /@ hypotenuses, 1][[All, -1]] (* _Jean-François Alcover_, May 23 2012, after _Max Alekseyev_ *) %t A009000 Sqrt[#]&/@Flatten[Table[Total/@Select[IntegerPartitions[n^2,{2}],Length[Union[#]]==2&&AllTrue[Sqrt[#],IntegerQ]&],{n,150}]] (* _Harvey P. Dale_, May 25 2025 *) %o A009000 (PARI) list(lim)=my(v=List(),m2,s2,h2,h); for(middle=4,lim-1, m2=middle^2; for(small=1,middle, s2=small^2; if(issquare(h2=m2+s2,&h), if(h>lim, break); listput(v, h)))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jun 23 2017 %o A009000 (PARI) list(lim) = {my(lh = List()); for(u = 2, sqrtint(lim), for(v = 1, u, if (u^2+v^2 > lim, break); if ((gcd(u,v) == 1) && (0 != (u-v)%2), for (i = 1, lim, if (i*(u^2+v^2) > lim, break); /* if (u^2 - v^2 < 2*u*v, w = [i*(u^2 - v^2), i*2*u*v, i*(u^2+v^2)], w = [i*2*u*v, i*(u^2 - v^2), i*(u^2+v^2)]); */ listput(lh, i*(u^2+v^2)););););); vecsort(Vec(lh));} \\ _Michel Marcus_, Apr 10 2021 %o A009000 (Python) %o A009000 from math import isqrt %o A009000 def aupto(limit): %o A009000 s = [i*i for i in range(1, limit+1)] %o A009000 s2 = sorted(a+b for i, a in enumerate(s) for b in s[i+1:]) %o A009000 return [isqrt(k) for k in s2 if k in s] %o A009000 print(aupto(120)) # _Michael S. Branicky_, May 10 2021 %Y A009000 Cf. A009012, A009003, A024507, A004431, A046083, A046084, A004144, A083025, A084645, A084646, A084647, A084648, A084649, A006339. %K A009000 nonn,nice,easy %O A009000 1,1 %A A009000 _David W. Wilson_