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

%I #9 Jan 25 2025 19:04:32

%S 28,40,112,160,156,204,252,360,340,345,448,640,561,744,624,700,816,

%T 1000,861,1008,1440,1360,1380,1173,1624,1372,1645,1581,1404,1729,1836,

%U 1960,1792,2560,2244,2268,2976,2496,3240,2800,3060,3105,3264,3577,3285,4000,3816

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

%C Corresponding hypotenuses in A380072, short legs in A380074.

%C Subsequence of A046084 and supersequence of A089548.

%H Felix Huber, <a href="/A380073/b380073.txt">Table of n, a(n) for n = 1..10001</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a>

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

%p # Calculates the first 10001 terms

%p A380073:=proc(M)

%p local i,m,p,q,r,v,w,L,F;

%p L:=[];

%p m:=M^2+2*M+2;

%p for p from 2 to M do

%p for q to p-1 do

%p if gcd(p,q)=1 and (is(p,even) or is(q,even)) then

%p r:=1;

%p for i in ifactors(p^2-q^2+2*p*q)[2] do

%p if is(i[2],odd) then

%p r:=r*i[1]

%p fi

%p od;

%p w:=r*(p^2+q^2);

%p if w<=m then

%p v:=r*max(p^2-q^2,2*p*q);

%p L:=[op(L),seq([i^2*w,i^2*v],i=1..floor(sqrt(m/w)))]

%p fi

%p fi

%p od

%p od;

%p F:=[];

%p for i in sort(L) do

%p F:=[op(F),i[2]]

%p od;

%p return op(F)

%p end proc;

%p A380073(4330);

%Y Cf. A000290, A007913, A046084, A089548, A379830, A380072, A380074.

%K nonn

%O 1,1

%A _Felix Huber_, Jan 18 2025