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.

A121727 Hypotenuse of primitive Pythagorean triangles sorted on area (A024406), then on hypotenuse.

This page as a plain text file.
%I A121727 #21 Dec 30 2024 17:04:03
%S A121727 5,13,17,25,41,29,37,61,65,85,53,113,65,101,145,73,85,89,181,145,221,
%T A121727 97,125,109,197,265,149,313,257,173,137,365,185,157,325,421,229,169,
%U A121727 481,205,185,193,401,269,545,293
%N A121727 Hypotenuse of primitive Pythagorean triangles sorted on area (A024406), then on hypotenuse.
%C A121727 Complete triple (X,Y,Z), with X>Y>Z is given by X=a(n),Y=A121728(n),Z=A121729(n).
%H A121727 Robert Israel, <a href="/A121727/b121727.txt">Table of n, a(n) for n = 1..10000</a>
%p A121727 N:= 100000: # for triples with area <= N
%p A121727 R:= NULL:
%p A121727 for n from 1 while (2*n+1)*(n+1)*n <= N do
%p A121727   for m from n+1 by 2 while (m^2 - n^2)*m*n <= N do
%p A121727     if igcd(m,n) = 1 then
%p A121727       R:= R, [m^2-n^2,2*m*n,m^2+n^2,(m^2-n^2)*m*n]
%p A121727     fi
%p A121727 od od:
%p A121727 R:= sort([R], (s,t) -> s[4] < t[4] or (s[4] = t[4] and s[3] < t[3])):
%p A121727 R[..,3]; # _Robert Israel_, Dec 30 2024
%o A121727 (PARI) v=vector(M=10^4); for(a=1, M, v[a] = []; fordiv(2*a, x, if(x<(y=2*a/x) && issquare(x^2+y^2, &z) && 1==gcd([x,y,z]), v[a] = concat(z, v[a])))); concat(v) /* _Michael Somos_, Dec 21 2016 */
%Y A121727 Cf. A024406, A121728, A121729.
%K A121727 nonn
%O A121727 1,1
%A A121727 _Lekraj Beedassy_, Aug 17 2006
%E A121727 a(20)=145 corrected by _Philippe Guglielmetti_, Dec 14 2016
%E A121727 a(43)=401 inserted by _Michael Somos_, Dec 21 2016