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-5 of 5 results.

A380073 Long legs of Pythagorean triangles having legs that add up to a square ordered by increasing hypotenuse.

Original entry on oeis.org

28, 40, 112, 160, 156, 204, 252, 360, 340, 345, 448, 640, 561, 744, 624, 700, 816, 1000, 861, 1008, 1440, 1360, 1380, 1173, 1624, 1372, 1645, 1581, 1404, 1729, 1836, 1960, 1792, 2560, 2244, 2268, 2976, 2496, 3240, 2800, 3060, 3105, 3264, 3577, 3285, 4000, 3816
Offset: 1

Views

Author

Felix Huber, Jan 18 2025

Keywords

Comments

Corresponding hypotenuses in A380072, short legs in A380074.
Subsequence of A046084 and supersequence of A089548.

Examples

			28 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10001 terms
    A380073:=proc(M)
        local i,m,p,q,r,v,w,L,F;
        L:=[];
        m:=M^2+2*M+2;
        for p from 2 to M do
            for q to p-1 do
                if gcd(p,q)=1 and (is(p,even) or is(q,even)) then
                    r:=1;
                    for i in ifactors(p^2-q^2+2*p*q)[2] do
                        if is(i[2],odd) then
                            r:=r*i[1]
                        fi
                    od;
                    w:=r*(p^2+q^2);
                    if w<=m then
                        v:=r*max(p^2-q^2,2*p*q);
                        L:=[op(L),seq([i^2*w,i^2*v],i=1..floor(sqrt(m/w)))]
                    fi
                fi
            od
        od;
        F:=[];
        for i in sort(L) do
            F:=[op(F),i[2]]
        od;
        return op(F)
    end proc;
    A380073(4330);

A380074 Short legs of Pythagorean triangles having legs that add up to a square ordered by increasing hypotenuse.

Original entry on oeis.org

21, 9, 84, 36, 133, 85, 189, 81, 189, 184, 336, 144, 400, 217, 532, 525, 340, 225, 820, 756, 324, 756, 736, 1036, 57, 1029, 564, 820, 1197, 672, 765, 441, 1344, 576, 1600, 1701, 868, 2128, 729, 2100, 1701, 1656, 1360, 1464, 2044, 900, 1513, 2541, 781, 2340, 3280
Offset: 1

Views

Author

Felix Huber, Jan 18 2025

Keywords

Comments

Corresponding hypotenuses in A380072, long legs in A380073.
Subsequence of A046083 and supersequence of A089547.

Examples

			21 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10001 terms
    A380074:=proc(M)
        local i,m,p,q,r,u,w,L,F;
        L:=[];
        m:=M^2+2*M+2;
        for p from 2 to M do
            for q to p-1 do
                if gcd(p,q)=1 and (is(p,even) or is(q,even)) then
                    r:=1;
                    for i in ifactors(p^2-q^2+2*p*q)[2] do
                        if is(i[2],odd) then
                            r:=r*i[1]
                        fi
                    od;
                    w:=r*(p^2+q^2);
                    if w<=m then
                        u:=r*min(p^2-q^2,2*p*q);
                        L:=[op(L),seq([i^2*w,i^2*u],i=1..floor(sqrt(m/w)))]
                    fi
                fi
            od
        od;
        F:=[];
        for i in sort(L) do
            F:=[op(F),i[2]]
        od;
        return op(F)
    end proc;
    A380074(4330);

A386307 Ordered hypotenuses of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), where u and v are positive integers.

Original entry on oeis.org

15, 25, 30, 35, 39, 50, 51, 55, 60, 65, 65, 70, 75, 75, 78, 85, 85, 87, 91, 95, 100, 102, 105, 110, 111, 115, 119, 120, 123, 125, 130, 130, 135, 140, 143, 145, 145, 150, 150, 155, 156, 159, 165, 169, 170, 170, 174, 175, 175, 182, 183, 185, 185, 187, 190, 195, 195
Offset: 1

Views

Author

Felix Huber, Aug 13 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.
A101930(n) gives the total number of Pythagorean triples <= 10^n. The percentage of triangles in this sequence increases continuously:
number of terms <= h total number of
h in this sequence hypotenuses <= h percentage
10 0 2 0.0 %
100 21 52 40.4 %
1000 514 881 58.3 %
10000 8629 12471 69.2 %
100000 122431 161436 75.8 %

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 15 is a term.
		

Crossrefs

Programs

  • Maple
    A386307:=proc(N) # To get all 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,1],i=1..nops(r));
    end proc;
    A386307(1000);

Formula

a(n) = sqrt(A386308(n)^2 + A386309(n)^2).
{A009000(n)} = {a(n)} union {A020882(n)} union {A386943(n)}.

A386943 Ordered hypotenuses of nonprimitive Pythagorean triples of the form (u^2 - v^2, 2*u*v, u^2 + v^2), where u and v are positive integers.

Original entry on oeis.org

10, 20, 26, 34, 40, 45, 50, 52, 58, 68, 74, 80, 82, 90, 100, 104, 106, 116, 117, 122, 125, 130, 130, 136, 146, 148, 153, 160, 164, 170, 170, 178, 180, 194, 200, 202, 208, 212, 218, 225, 226, 232, 234, 244, 245, 250, 250, 260, 260, 261, 272, 274, 290, 290, 292, 296
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.
A101930(n) gives the total number of Pythagorean triples <= 10^n.
number of terms <= h total number of
h in this sequence hypotenuses <= h percentage
10 1 2 50.0 %
100 15 52 28.8 %
1000 209 881 23.7 %
10000 2249 12471 18.0 %
100000 23086 161436 14.3 %

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, 10 is a term.
		

Crossrefs

Programs

  • Maple
    A386943:=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,1],i=1..nops(l));
    end proc;
    A386943(296);

Formula

a(n) = sqrt(A386944(n)^2 + A386945(n)^2).
{A009000(n)} = {a(n)} union {A020882(n)} union {A386307(n)}.

A379925 Numbers k for which nonnegative integers x and y exist such that x^2 + y^2 = k and x + y is a square.

Original entry on oeis.org

0, 1, 8, 10, 16, 41, 45, 53, 65, 81, 128, 130, 136, 146, 160, 178, 200, 226, 256, 313, 317, 325, 337, 353, 373, 397, 425, 457, 493, 533, 577, 625, 648, 650, 656, 666, 680, 698, 720, 746, 776, 810, 848, 890, 936, 986, 1040, 1098, 1160, 1201, 1205, 1213, 1225, 1226
Offset: 1

Views

Author

Felix Huber, Jan 25 2025

Keywords

Comments

Numbers k for which exists at least one solution to k = x^2 + (z^2 - x)^2 in integers x and z with x >= 0 and z >= sqrt(2*x).
Subsequence of A001481.

Examples

			10 is in the sequence because 10 = 1^2 + 3^2 and 1 + 3 = 2^2.
81 is in the sequence because 81 = 0^2 + 9^2 and 0 + 9 = 3^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10005 terms.
    A379925:=proc(K)
        local i,j,L;
        L:={};
        for i from 0 to floor(sqrt((K+1)^2)/2) do
            for j from 0 to floor(sqrt((K+1)^2/2-i^2)) do
                if issqr(i+j) then
                    L:=L union {i^2+j^2}
                fi
            od
        od;
        return op(L)
    end proc;
    A379925(1737);
  • PARI
    isok(n)=my(x=0, r=0); while(x<=sqrt(n) && r==0, if(issquare(n-x^2) && issquare(x+sqrtint(n-x^2)), r=1); x++); r; \\ Michel Marcus, Feb 10 2025

Formula

k = m^(4*j) is in the sequence for nonnegative integers m and j (not both 0) because x = 0 and z = m^j is a solution to m^(4*j) = x^2 + (z^2 - x)^2.
Showing 1-5 of 5 results.