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);

A380072 Ordered hypotenuses of Pythagorean triangles having legs that add up to a square.

Original entry on oeis.org

35, 41, 140, 164, 205, 221, 315, 369, 389, 391, 560, 656, 689, 775, 820, 875, 884, 1025, 1189, 1260, 1476, 1556, 1564, 1565, 1625, 1715, 1739, 1781, 1845, 1855, 1989, 2009, 2240, 2624, 2756, 2835, 3100, 3280, 3321, 3500, 3501, 3519, 3536, 3865, 3869, 4100, 4105
Offset: 1

Views

Author

Felix Huber, Jan 18 2025

Keywords

Comments

Corresponding long legs in A380073, short legs in A380074.
Subsequence of A009000 and supersequence of A088319.

Examples

			35 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
206125 is twice in the sequence because 31525^2 + 203700^2 = 206125^2 and 31525 + 203700 = 485^2 as well as 94588^2 + 183141^2 = 206125^2 and 94588 + 183141 = 527^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10001 terms
    A380072:=proc(M)
        local i,m,p,q,r,w,L;
        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
                        L:=[op(L),seq(i^2*w,i=1..floor(sqrt(m/w)))]
                    fi
                fi
            od
        od;
        return op(sort(L))
    end proc;
    A380072(4330);

A381336 a(n) is the smallest k > 0 for which a nondegenerate integer-sided triangle (k, k + n, c >= k + n) with an integer area exists.

Original entry on oeis.org

3, 6, 9, 12, 12, 18, 5, 7, 4, 24, 14, 36, 15, 10, 36, 14, 7, 8, 6, 21, 8, 3, 12, 5, 10, 15, 12, 20, 46, 35, 9, 28, 20, 14, 25, 16, 15, 12, 22, 21, 19, 16, 12, 6, 20, 5, 4, 10, 11, 20, 21, 30, 96, 24, 13, 9, 18, 7, 25, 63, 21, 18, 22, 9, 35, 9, 25, 21, 36, 17, 13
Offset: 1

Views

Author

Felix Huber, Mar 16 2025

Keywords

Comments

Longest sides c are in A381337.

Examples

			a(5) = 12 because the nondegenerate integer-sided triangle (12, 12 + 5, 25 >= 12 + 5) has an integer area (90), and there is no smaller k > 0 than 12 that satisfies this condition.
		

Crossrefs

Programs

  • Maple
    A381336:=proc(n)
        local k,c,s;
        for k do
            for c from k+n to 2*k+n-1 do
                s:=(n+2*k+c)/2;
                if issqr(s*(s-k)*(s-k-n)*(s-c)) then
                    return k
                fi
            od
        od;
    end proc;
    seq(A381336(n),n=1..71);

A379596 a(n) is the least positive integer k for which k^2 + (k + n)^2 is a square.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 5, 24, 27, 30, 33, 36, 39, 10, 45, 48, 7, 54, 57, 60, 15, 66, 12, 72, 75, 78, 81, 20, 87, 90, 9, 96, 99, 14, 25, 108, 111, 114, 117, 120, 36, 30, 129, 132, 135, 24, 16, 144, 11, 150, 21, 156, 159, 162, 165, 40, 171, 174, 177, 180, 183, 18, 45
Offset: 1

Views

Author

Felix Huber, Feb 15 2025

Keywords

Comments

a(n) is also the smallest short leg of a Pythagorean triangle where the difference between the two legs is n.
A289398(n) is the least integer m > n for which (n^2 + m^2)/2 is a square. This is equivalent to the least positive integer k for which (n^2 + (n + 2*k)^2)/2 = k^2 + (n + k)^2 is a square. From m = n + 2*k follows a(n) = (A289398(n) - n)/2.

Examples

			a(1) = 3 because 3^2 + (3 + 1)^2 = 5^2 and there is no smaller positive integer k than 3 with that property.
a(28) = 20 because 20^2 + (20 + 28)^2 = 52^2 and there is no smaller positive integer k than 20 with that property.
		

Crossrefs

Programs

  • Maple
    A379596:=proc(n)
        local k;
        for k do
            if issqr(k^2+(k+n)^2) then
                return k
            fi
        od
    end proc;
    seq(A379596(n),n=1..63);
  • Mathematica
    s={};Do[k=0;Until[IntegerQ[Sqrt[k^2+(k+n)^2]],k++];AppendTo[s,k],{n,63}];s (* James C. McMahon, Mar 02 2025 *)
  • PARI
    a(n) = my(k=1); while (!issquare(k^2 + (k + n)^2), k++); k; \\ Michel Marcus, Feb 15 2025
    
  • Python
    from itertools import count
    from sympy.ntheory.primetest import is_square
    def A379596(n): return next(k for k in count(1) if is_square(k**2+(k+n)**2)) # Chai Wah Wu, Mar 02 2025

Formula

a(n) = (A289398(n) - n)/2.
Showing 1-5 of 5 results.