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.

A009000 Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares).

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 25, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 50, 51, 52, 53, 55, 58, 60, 61, 65, 65, 65, 65, 68, 70, 73, 74, 75, 75, 78, 80, 82, 85, 85, 85, 85, 87, 89, 90, 91, 95, 97, 100, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120
Offset: 1

Views

Author

Keywords

Comments

The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c.
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
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
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
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

References

  • W. L. Schaaf, Recreational Mathematics, A Guide To The Literature, "The Pythagorean Relationship", Chapter 6 pp. 89-99 NCTM VA 1963.
  • W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 2, "The Pythagorean Relation", Chapter 6 pp. 108-113 NCTM VA 1972.
  • W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 3, "Pythagorean Recreations", Chapter 6 pp. 62-6 NCTM VA 1973.

Crossrefs

Programs

  • Maple
    A009000:=proc(N) # To get all terms <= N
        local p,q,i,L;
        L:=[];
        for p from 2 to floor(sqrt(N-1)) do
            for q to p-1 do
                if igcd(p,q)=1 and is(p-q,odd) then
                    L:=[op(L),seq(i*(p^2+q^2),i=1..N/(p^2+q^2))];
                fi
            od
        od;
        return op(sort(L))
    end proc:
    A009000(120); # Felix Huber, Feb 10 2025
  • Mathematica
    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 *)
    Sqrt[#]&/@Flatten[Table[Total/@Select[IntegerPartitions[n^2,{2}],Length[Union[#]]==2&&AllTrue[Sqrt[#],IntegerQ]&],{n,150}]] (* Harvey P. Dale, May 25 2025 *)
  • 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
    
  • 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
    
  • Python
    from math import isqrt
    def aupto(limit):
      s = [i*i for i in range(1, limit+1)]
      s2 = sorted(a+b for i, a in enumerate(s) for b in s[i+1:])
      return [isqrt(k) for k in s2 if k in s]
    print(aupto(120)) # Michael S. Branicky, May 10 2021