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.

A382931 Numbers k for which the Pythagorean triangle (A046083(k), A046084(k), A009000(k)) has an integer altitude.

Original entry on oeis.org

7, 19, 36, 51, 69, 88, 99, 106, 126, 147, 163, 187, 196, 208, 227, 240, 250, 273, 293, 314, 342, 361, 384, 392, 409, 434, 455, 459, 483, 504, 507, 525, 549, 552, 579, 599, 627, 649, 679, 702, 711, 718, 724, 744, 752, 775, 802, 829, 854, 879, 894, 908, 935, 960
Offset: 1

Views

Author

Felix Huber, Apr 11 2025

Keywords

Comments

Let (a, b, c) be a primitive Pythagorean triple. Since gcd(a, b, c) = 1, all and only the Pythagorean triples (k*c*a, k*c*b, k*c^2) have an integer altitude h = (k*c*a*k*c*b)/(k*c^2) = k*a*b, where k is a positive integer.

Examples

			7 is in the sequence because the pythagorean triangle (A046083(7), A046084(7), A009000(7)) = (15, 20, 25) has the integer altitude 15*20/25 = 12.
		

Crossrefs

Programs

  • Maple
    A382931:=proc(H) # All hypotenuses <= H.
        local a,b,c,k,p,q,L,M;
        L:=[];
        M:=[];
        for p from 2 to floor(sqrt(H-1)) do
            for q to min(p-1,floor(sqrt(H-p^2))) do
                if gcd(p,q)=1 and is(p-q,odd) then
                    a:=p^2-q^2;
                    b:=2*p*q;
                    c:=p^2+q^2;
                    for k to iquo(H,c) do
                        L:=[op(L),[k*c,k*max(a,b),k*a*b/c]]
                    od
                fi
            od
        od;
        L:=sort(L);
        for k to nops(L) do
            if is(L[k,3],integer) then
               M:=[op(M),k]
            fi
        od;
        return op(M)
    end proc;
    A382931(1075);