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.

Showing 1-10 of 11 results. Next

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

A009023 Long legs of Pythagorean triangles.

Original entry on oeis.org

4, 8, 12, 15, 16, 20, 21, 24, 28, 30, 32, 35, 36, 40, 42, 44, 45, 48, 52, 55, 56, 60, 63, 64, 68, 70, 72, 75, 76, 77, 80, 84, 88, 90, 91, 92, 96, 99, 100, 104, 105, 108, 110, 112, 116, 117, 120, 124, 126, 128, 132, 135, 136, 140, 143, 144, 147, 148, 150, 152, 153, 154, 156
Offset: 1

Views

Author

Keywords

Comments

A227481(a(n)) > 1. - Reinhard Zumkeller, Oct 11 2013
This is A009012 (sorted A046084) without duplicates. - Andrey Zabolotskiy, Dec 27 2017
Does a(n)/n converge to some limit? - Benoit Cloitre, Oct 18 2009
For n = {52000, 72000, 100000}, n/a(n) = {0.499, 0.50175, 0.50428}. - Alex Ratushnyak, Jan 17 2019

References

  • Wacław Sierpiński, Pythagorean triangles, Dover books. [Benoit Cloitre, Oct 17 2009]

Crossrefs

Cf. A074235 (complement), A009012, A046084, A227481.

Programs

  • Haskell
    a009023 n = a009023_list !! (n-1)
    a009023_list = filter ((> 1) . a227481) [1..]
    -- Reinhard Zumkeller, Oct 11 2013

A057096 Saint-Exupéry numbers: ordered products of the three sides of Pythagorean triangles.

Original entry on oeis.org

60, 480, 780, 1620, 2040, 3840, 4200, 6240, 7500, 12180, 12960, 14760, 15540, 16320, 20580, 21060, 30720, 33600, 40260, 43740, 49920, 55080, 60000, 65520, 66780, 79860, 92820, 97440, 97500, 103680, 113400, 118080, 120120, 124320, 130560, 131820, 164640
Offset: 1

Views

Author

Henry Bottomley, Aug 01 2000

Keywords

Comments

It is an open question whether any two distinct Pythagorean Triples can have the same product of their sides.
From Amiram Eldar, Nov 22 2020: (Start)
Named after the French writer Antoine de Saint-Exupéry (1900-1944).
The problem of finding two distinct Pythagorean triples with the same product was proposed by Eckert (1984). It is equivalent of finding a nontrivial solution of the Diophantine equation x*y*(x^4-y^4) = z*w*(z^4-w^4) (Bremner and Guy, 1988). (End)

Examples

			a(1) = 3*4*5 = 60.
		

References

  • Richard K. Guy, "Triangles with Integer Sides, Medians and Area." D21 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 188-190, 1994.
  • Antoine de Saint-Exupéry, Problème du Pharaon, Liège : Editions Dynamo, 1957.

Crossrefs

Programs

  • Mathematica
    k=5000000; lst={}; Do[Do[If[IntegerQ[a=Sqrt[c^2-b^2]], If[a>=b, Break[]]; x=a*b*c; If[x<=k, AppendTo[lst,x]]], {b,c-1,4,-1}], {c,5,400,1}]; Union@lst (* Vladimir Joseph Stephan Orlovsky, Sep 05 2009 *)

Formula

a(n) = 60*A057097(n) = A057098(n)*A057099(n)*A057100(n).

A156681 Consider all Pythagorean triangles A^2 + B^2 = C^2 with A < B < C; sequence gives values of B, sorted to correspond to increasing A (A009004).

Original entry on oeis.org

4, 12, 8, 24, 15, 12, 40, 24, 60, 16, 35, 84, 48, 20, 36, 112, 30, 63, 144, 24, 80, 180, 21, 48, 99, 28, 72, 220, 120, 264, 32, 45, 70, 143, 60, 312, 168, 36, 120, 364, 45, 96, 195, 420, 40, 72, 224, 480, 60, 126, 255, 44, 56, 180, 544, 288, 84, 120, 612, 48, 77, 105
Offset: 1

Views

Author

Ant King, Feb 17 2009

Keywords

Comments

The ordered sequence of B values is A009012(n) (allowing repetitions) and A009023(n) (excluding repetitions).

Examples

			As the first four Pythagorean triples (ordered by increasing A) are (3,4,5), (5,12,13), (6,8,10) and (7,24,25), then a(1)=4, a(2)=12, a(3)=8 and a(4)=24.
		

References

  • Albert H. Beiler, Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.
  • W. Sierpinski, Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.

Crossrefs

Programs

  • Mathematica
    PythagoreanTriplets[n_]:=Module[{t={{3,4,5}},i=4,j=5},While[i
    				

Formula

a(n) = sqrt(A156682(n)^2 - A009004(n)^2).

A057099 Middle side of a Pythagorean triangle (ordered by the product of the sides).

Original entry on oeis.org

4, 8, 12, 12, 15, 16, 24, 24, 20, 21, 24, 40, 35, 30, 28, 36, 32, 48, 60, 36, 48, 45, 40, 63, 45, 44, 84, 42, 60, 48, 72, 80, 56, 70, 60, 52, 56, 72, 112, 55, 99, 60, 77, 64, 75, 84, 96, 80, 68, 120, 63, 72, 144, 120, 96, 76, 105, 90, 72, 80, 143, 126, 120, 90, 84, 108, 91
Offset: 1

Views

Author

Henry Bottomley, Aug 01 2000

Keywords

Examples

			a(1)=4 since 3*4*5=60 is smallest possible positive product
		

Crossrefs

Programs

  • Mathematica
    maxShortLeg = 66; terms = 67;
    r[a_] := {a, b, c} /. {ToRules[Reduce[a <= b < c && a^2+b^2 == c^2, {b, c}, Integers]]};
    abc = r /@ Complement[Range[maxShortLeg], {1, 2, 4}] // Flatten[#, 1]&;
    SortBy[abc, Times @@ # &][[;; terms, 2]] (* Jean-François Alcover, Nov 21 2019 *)

Formula

a(n) =A057096(n)/(A057098(n)*A057100(n)) =sqrt(A057100(n)^2-A057098(n)^2)

A074235 Numbers that cannot be a long leg of an integer right triangle.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 17, 18, 19, 22, 23, 25, 26, 27, 29, 31, 33, 34, 37, 38, 39, 41, 43, 46, 47, 49, 50, 51, 53, 54, 57, 58, 59, 61, 62, 65, 66, 67, 69, 71, 73, 74, 78, 79, 81, 82, 83, 85, 86, 87, 89, 93, 94, 95, 97, 98, 101, 102, 103, 106, 107, 109, 111
Offset: 1

Views

Author

Zak Seidov, Sep 18 2002

Keywords

Comments

The possible values of a long leg of an integer right triangle are in A009012.
A227481(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2013

Examples

			5 is a term because a^2 + 5^2 = c^2 has no solution for a < 5 with integers a, c.
13 is a term because a^2 + 13^2 = c^2 has no solution for a < 13 with integers a, c.
		

Crossrefs

Cf. A009012.
Cf. A009023 (complement).

Programs

  • Haskell
    a074235 n = a074235_list !! (n-1)
    a074235_list = filter ((== 1) . a227481) [1..]
    -- Reinhard Zumkeller, Oct 11 2013

A376900 a(n) is the number of distinct integer-sided right triangles that can be drawn into a square with side length n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 8, 10, 10, 10, 11, 11, 11, 11, 13, 13, 14, 14, 17, 17, 17, 18, 18, 18, 18, 19, 20, 21, 23, 25, 25, 25, 25, 27, 27, 27, 27, 29, 31, 31, 31, 34, 34, 34, 34, 37, 37, 37, 37, 40, 41, 42, 43, 43, 45, 45, 46
Offset: 0

Views

Author

Felix Huber, Oct 25 2024

Keywords

Examples

			a(11) = 3 because exactly the 3 integer-sided right triangles (3, 4, 5), (6, 8, 10), (5, 12, 13) can be drawn into a square with side length 11.
See linked Maple program to calculate the right triangles for a given n.
		

Crossrefs

Cf. A009012.

Programs

  • Maple
    A376900:=proc(n)
       local a,p,q,v,k;
       a:=0;
          for p from 2 to evalf(sqrt(sqrt(2)*n+1)) do
             for q from 1 to min(p-1,floor(n/(sqrt(2)*p))) do
                if gcd(p,q)=1 and is(p+q,odd) then
                   v:=max(p^2-q^2,2*p*q);
                   k:=min(p^2-q^2,2*p*q)/v;
                   a:=a+floor(n/v*sqrt(k^2-2*k+2));
                fi;
             od;
          od;
       return a;
    end proc;
    seq(A376900(n),n=0..70);

A009041 Ordered legs of Pythagorean triangles.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 11, 12, 12, 12, 12, 13, 14, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 27, 27, 27, 28, 28, 28, 28, 29, 30, 30, 30, 30, 31, 32, 32, 32, 32, 33, 33, 33, 33, 34, 35, 35, 35, 35, 36
Offset: 1

Views

Author

Keywords

Comments

Order the set of all Pythagorean triangles. This is the sequence of the first leg.
Sorted union of A009004 and A009012 retaining duplicates. - Sean A. Irvine, Apr 18 2018

Examples

			First legs of (3,4,5), (4,3,5), (5,12,13), (6,8,10), (7,24,25), (8,6,10), (8,15,17), (9,12,15), (9,40,41), ... - _Michael Somos_, Mar 03 2004
		

Crossrefs

A009070 Ordered sides of Pythagorean triangles.

Original entry on oeis.org

3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, 12, 13, 13, 14, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 27, 27, 27, 28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 30, 31, 32, 32, 32
Offset: 1

Views

Author

Keywords

Comments

Sorted union of A009000, A009004, and A009012, retaining duplicates. - Sean A. Irvine, Apr 19 2018

Crossrefs

A009185 Long leg of more than one Pythagorean triangle.

Original entry on oeis.org

12, 24, 36, 40, 45, 48, 56, 60, 63, 72, 80, 84, 90, 96, 105, 108, 112, 120, 126, 132, 135, 140, 144, 156, 160, 165, 168, 176, 180, 189, 192, 195, 200, 204, 208, 210, 216, 220, 224, 225, 228, 231, 240, 252, 255, 260, 264, 270, 272, 273, 275, 276, 280, 285, 288, 300, 304
Offset: 1

Views

Author

Keywords

Comments

If n is in the sequence, k*n is in the sequence for all k > 1. So sequence is union of arithmetic progressions such as numbers of the form 12*k, 40*k, 45*k, ... - Altug Alkan, Nov 30 2015
Numbers appearing more than once in A009012. - Sean A. Irvine, Apr 20 2018

Crossrefs

Showing 1-10 of 11 results. Next