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.

Original entry on oeis.org

5, 13, 17, 25, 41, 29, 37, 61, 65, 85, 53, 113, 65, 101, 145, 73, 85, 89, 181, 145, 221, 97, 125, 109, 197, 265, 149, 313, 257, 173, 137, 365, 185, 157, 325, 421, 229, 169, 481, 205, 185, 193, 401, 269, 545, 293
Offset: 1

Views

Author

Lekraj Beedassy, Aug 17 2006

Keywords

Comments

Complete triple (X,Y,Z), with X>Y>Z is given by X=a(n),Y=A121728(n),Z=A121729(n).

Crossrefs

Programs

  • Maple
    N:= 100000: # for triples with area <= N
    R:= NULL:
    for n from 1 while (2*n+1)*(n+1)*n <= N do
      for m from n+1 by 2 while (m^2 - n^2)*m*n <= N do
        if igcd(m,n) = 1 then
          R:= R, [m^2-n^2,2*m*n,m^2+n^2,(m^2-n^2)*m*n]
        fi
    od od:
    R:= sort([R], (s,t) -> s[4] < t[4] or (s[4] = t[4] and s[3] < t[3])):
    R[..,3]; # Robert Israel, Dec 30 2024
  • 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 */

Extensions

a(20)=145 corrected by Philippe Guglielmetti, Dec 14 2016
a(43)=401 inserted by Michael Somos, Dec 21 2016