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.

A386945 Short legs of Pythagorean triples of the form (p^2 - q^2, 2*p*q, p^2 + q^2), ordered by increasing hypotenuse (A386943).

Original entry on oeis.org

6, 12, 10, 16, 24, 27, 14, 20, 40, 32, 24, 48, 18, 54, 28, 40, 56, 80, 45, 22, 75, 66, 32, 64, 96, 48, 72, 96, 36, 72, 26, 78, 108, 130, 56, 40, 80, 112, 120, 63, 30, 160, 90, 44, 147, 150, 88, 132, 64, 180, 128, 176, 48, 34, 192, 96, 102, 144, 170, 192, 125, 72
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, 6 is a term.
		

Crossrefs

Programs

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

Formula

a(n) = sqrt(A386943(n)^2 - A386944(n)^2).
{A046083(n)} = {a(n)} union {A046086(n)} union {A386309(n)}.