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.

Previous Showing 11-20 of 24 results. Next

A180620 Odd legs of primitive Pythagorean triples (with multiplicity) sorted with respect to increasing hypotenuse.

Original entry on oeis.org

3, 5, 15, 7, 21, 35, 9, 45, 11, 63, 33, 55, 77, 13, 39, 65, 99, 91, 15, 117, 105, 143, 17, 51, 85, 119, 165, 19, 153, 57, 95, 195, 187, 133, 171, 21, 221, 105, 209, 255, 247, 23, 69, 115, 231, 161, 285, 273, 207, 25, 75, 323, 253, 175, 299, 225, 357, 27, 275, 345, 135, 189, 325
Offset: 1

Views

Author

Jonathan Vos Post, Sep 12 2010

Keywords

Comments

The primary key is the increasing length of the hypotenuse, A020882. If there is more than one solution with that hypotenuse, the (secondary) sorting key is the even leg.
Only the odd legs 'a' of reduced triangles with gcd(a,b,c)=1, a^2+b^2=c^2, a=q^2-p^2, b=2*p*q, c=q^2+p^2, gcd(p,q)=1 are listed.

Examples

			a(1) = 3 because the only triangle with the least possible hypotenuse 5 has catheti 3 and 4.
		

Crossrefs

Extensions

Comment on sorting added, more terms appended by R. J. Mathar, Oct 15 2010
Sequence's name and comments corrected by K. G. Stier, Nov 03 2013

A263728 Primitive Pythagorean triples (a, b, c) in lexicographic order, with a < b < c.

Original entry on oeis.org

3, 4, 5, 5, 12, 13, 7, 24, 25, 8, 15, 17, 9, 40, 41, 11, 60, 61, 12, 35, 37, 13, 84, 85, 15, 112, 113, 16, 63, 65, 17, 144, 145, 19, 180, 181, 20, 21, 29, 20, 99, 101, 21, 220, 221, 23, 264, 265, 24, 143, 145, 25, 312, 313, 27, 364, 365, 28, 45, 53
Offset: 1

Views

Author

Colin Barker, Nov 20 2015

Keywords

Comments

a(3*k+1)*a(3*k+2) / (a(3*k+1)+a(3*k+2)+a(3*k+3)) is always an integer for k >= 0. Also note that a(3*k+1)*a(3*k+2)/2 is never a perfect square. - Altug Alkan, Apr 08 2016

Examples

			The first few triples are [3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [19, 180, 181], [20, 21, 29], [20, 99, 101], ... - _N. J. A. Sloane_, Dec 15 2015
		

References

  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970, Chapter 5, Section 5.3.

Crossrefs

Programs

  • Maple
    a:=[]; b:={}; M:=30;
    for u from 2 to M do for v from 1 to u-1 do
       if gcd(u,v)=1 and u+v mod 2 = 1 then t1:=u^2-v^2; t2:= 2*u*v; t3:=u^2+v^2;
       w:=sort([t1,t2]); a:=[op(a), [op(w),t3]]; b:={ op(b), op(w), t3};
       fi:
    od: od:
    a;
    sort(a); # A263728
    sort(b); # A016825 and A042965 (Maple code from N. J. A. Sloane, Dec 15 2015)
  • PARI
    \\ Primitive Pythagorean triples (a,b,c) with a
    				

A277557 The ordered image of the 1-to-1 mapping of an integer ordered pair (x,y) into an integer using Cantor's pairing function, where 0 < x < y, gcd(x,y)=1 and x+y odd.

Original entry on oeis.org

8, 18, 19, 32, 33, 34, 50, 52, 53, 72, 73, 74, 75, 76, 98, 99, 100, 101, 102, 103, 128, 131, 133, 134, 162, 163, 164, 165, 166, 167, 168, 169, 200, 201, 202, 203, 204, 205, 206, 207, 208, 242, 244, 247, 248, 250, 251, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 338
Offset: 1

Views

Author

Frank M Jackson, Oct 19 2016

Keywords

Comments

The mapping of the ordered pair (x,y) to an integer uses Cantor's pairing function to generate the integer as (x+y)(x+y+1)/2+y. Also for every ordered pair (x,y) such that 0 < x < y, gcd(x,y)=1 and x+y odd, there exists a primitive Pythagorean triple (PPT) (a, b, c) such that a = y^2-x^2, b = 2xy, c = x^2+y^2. Therefore each term in the sequence represents a unique PPT.
Numbers n for which 0 < A025581(n) < A002262(n) and A025581(n)+A002262(n) is odd, and gcd(A025581(n), A002262(n)) = 1. [The definition expressed with A-numbers.] - Antti Karttunen, Nov 02 2016
See also the triangle T(y, x) with the values for PPTs given in A278147. - Wolfdieter Lang, Nov 24 2016

Examples

			a(5)=33 because the ordered pair (2,5) maps to 33 by Cantor's pairing function (see below) and is the 5th such occurrence. Also x=2, y=5 generates a PPT with sides (21,20,29).
Note: Cantor's pairing function is simply A001477 in its two-argument tabular form A001477(k, n) = n + (k+n)*(k+n+1)/2, thus A001477(2,5) = 5 + (2+5)*(2+5+1)/2 = 33. - _Antti Karttunen_, Nov 02 2016
		

Crossrefs

Cf. A020882 (is obtained when A048147(a(n)) is sorted into ascending order), A008846 (same with duplicates removed).

Programs

  • Mathematica
    Cantor[{i_, j_}] := (i+j)(i+j+1)/2+j; getparts[n_] := Reverse@Select[Reverse[IntegerPartitions[n, {2}], 2], GCD@@#==1 &]; pairs=Flatten[Table[getparts[2n+1], {n, 1, 20}], 1]; Table[Cantor[pairs[[n]]], {n, 1, Length[pairs]}]

A386308 Long legs of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2) ordered by increasing hypotenuse (A386307), where u and v are positive integers.

Original entry on oeis.org

12, 20, 24, 28, 36, 40, 45, 44, 48, 52, 60, 56, 60, 72, 72, 68, 75, 63, 84, 76, 80, 90, 84, 88, 105, 92, 105, 96, 120, 120, 104, 120, 108, 112, 132, 105, 116, 120, 144, 124, 144, 135, 132, 156, 136, 150, 126, 140, 168, 168, 180, 148, 175, 165, 152, 156, 168, 180
Offset: 1

Views

Author

Felix Huber, Aug 19 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 12 is a term.
		

Crossrefs

Subsequence of A046084.

Programs

  • Maple
    A386308:=proc(N) # To get all terms with hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,2],i=1..nops(r));
    end proc;
    A386308(1000);

Formula

a(n) = sqrt(A386307(n)^2 - A386309(n)^2).
{A046084(n)} = {a(n)} union {A046087(n)} union {A386944(n)}.

A081872 Long legs of primitive Pythagorean triangles sorted on semiperimeter.

Original entry on oeis.org

4, 12, 15, 24, 21, 35, 40, 45, 60, 63, 56, 55, 84, 77, 80, 99, 72, 112, 91, 117, 144, 143, 105, 140, 132, 180, 165, 120, 176, 195, 153, 168, 220, 187, 156, 221, 171, 255, 208, 264, 209, 260, 247, 252, 285, 312, 231, 323, 240, 308, 273, 224, 364, 253, 357, 288
Offset: 1

Views

Author

Lekraj Beedassy, Apr 23 2003

Keywords

Crossrefs

Extensions

More terms from Ray Chandler, Oct 29 2003

A087459 Values (X + Y - Z) sorted on Z, then on Y, where (X,Y,Z) is a primitive Pythagorean triple with X

Original entry on oeis.org

2, 4, 6, 6, 12, 10, 8, 20, 10, 24, 14, 30, 28, 12, 30, 40, 18, 42, 14, 36, 56, 22, 16, 42, 60, 70, 44, 18, 72, 48, 70, 26, 84, 66, 90, 20, 52, 80, 88, 30, 78, 22, 60, 90, 110, 112, 60, 126, 104, 24, 66, 132, 34, 126, 130, 144, 68, 26, 154, 120, 110, 140, 156, 38, 102, 28
Offset: 1

Views

Author

Lekraj Beedassy, Oct 23 2003

Keywords

Crossrefs

For ordered values of (X + Y - Z) see A020887.

Formula

a(n) = A046086(n) + A046087(n) - A020882(n) = 2*A014498(n).
a(n) = sqrt{2*A118961(n)*A118962(n)}. - Lekraj Beedassy, May 11 2006

Extensions

Corrected and extended by Ray Chandler, Oct 25 2003

A386944 Long legs of Pythagorean triples of the form (u^2 - v^2, 2*u*v, u^2 + v^2), ordered by increasing hypotenuse (A386943).

Original entry on oeis.org

8, 16, 24, 30, 32, 36, 48, 48, 42, 60, 70, 64, 80, 72, 96, 96, 90, 84, 108, 120, 100, 112, 126, 120, 110, 140, 135, 128, 160, 154, 168, 160, 144, 144, 192, 198, 192, 180, 182, 216, 224, 168, 216, 240, 196, 200, 234, 224, 252, 189, 240, 210, 286, 288, 220, 280, 280
Offset: 1

Views

Author

Felix Huber, Aug 24 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The nonprimitive Pythagorean triple (6, 8, 10) is of the form (u^2 - v^2, 2*u*v, u^2 + v^2): From u = 3 and v = 1 follows u^2 - v^2 = 8 (long leg), 2*u*v = 6 (short leg), u^2 - v^2 = 10 (hypotenuse). Therefore, 8 is a term.
		

Crossrefs

Programs

  • Maple
    A386944:=proc(N) # To get all hypotenuses <= N
        local i,l,u,v;
        l:=[];
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                if gcd(u,v)>1 or is(u-v,even) then
                    l:=[op(l),[u^2+v^2,max(2*u*v,u^2-v^2),min(2*u*v,u^2-v^2)]]
                fi
            od
        od;
        l:=sort(l);
        return seq(l[i,2],i=1..nops(l));
    end proc;
    A386944(296);

Formula

a(n) = sqrt(A386943(n)^2 - A386945(n)^2).
{A046084(n)} = {a(n)} union {A046087(n)} union {A386308(n)}.

A239581 Number of primitive Pythagorean triangles (x, y, z) with legs x < y < 10^n.

Original entry on oeis.org

1, 18, 179, 1788, 17861, 178600, 1786011, 17860355, 178603639, 1786036410, 17860362941
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side lengths x, y, z forming a Pythagorean triple (x, y, z). It is called primitive, if gcd(x, y, z) = 1.
Because (x, y, z) is equivalent to (y, x, z), the total number of primitive Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 2, 36, 358, 3576, 35722, ...

Examples

			a(1) = 1, because the only primitive Pythagorean triangle with x < y < 10 is [3, 4, 5].
		

Crossrefs

Extensions

a(6)-a(11) from Giovanni Resta, Mar 27 2014

A239744 Number of Pythagorean triangles (x, y, z) with legs x < y <= 10^n.

Original entry on oeis.org

2, 63, 1034, 14474, 185864, 2269788, 26809924, 309224756, 3503496007, 39147452729, 432599522197
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side lengths x, y, z forming a Pythagorean triple (x, y, z).
Because (x, y, z) is equivalent to (y, x, z), the total number of Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 4, 126, 2068, 28948, 371728, ...

Examples

			a(1) = 2, because the only two Pythagorean triangles with x < y < 10 are [3, 4, 5] and [6, 8, 10].
		

Crossrefs

Extensions

a(6)-a(11) from Giovanni Resta, Mar 27 2014

A239786 Number of Pythagorean triangles (x, y, z) with legs x < y < 10^n.

Original entry on oeis.org

2, 62, 1032, 14471, 185860, 2269783, 26809918, 309224749, 3503495999, 39147452720, 432599522187
Offset: 1

Views

Author

Martin Renner, Mar 26 2014

Keywords

Comments

A Pythagorean triangle is a right triangle with integer side length x, y, z forming a Pythagorean triple (x, y, z).
Because (x, y, z) is equivalent to (y, x, z), the total number of Pythagorean triangles with legs x, y < 10^n is b(n) = 2*a(n) = 4, 124, 2064, 28942, ...

Crossrefs

Extensions

a(5)-a(11) from Giovanni Resta, Mar 27 2014
Previous Showing 11-20 of 24 results. Next