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.

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

This page as a plain text file.
%I A380073 #9 Jan 25 2025 19:04:32
%S A380073 28,40,112,160,156,204,252,360,340,345,448,640,561,744,624,700,816,
%T A380073 1000,861,1008,1440,1360,1380,1173,1624,1372,1645,1581,1404,1729,1836,
%U A380073 1960,1792,2560,2244,2268,2976,2496,3240,2800,3060,3105,3264,3577,3285,4000,3816
%N A380073 Long legs of Pythagorean triangles having legs that add up to a square ordered by increasing hypotenuse.
%C A380073 Corresponding hypotenuses in A380072, short legs in A380074.
%C A380073 Subsequence of A046084 and supersequence of A089548.
%H A380073 Felix Huber, <a href="/A380073/b380073.txt">Table of n, a(n) for n = 1..10001</a>
%H A380073 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a>
%e A380073 28 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
%p A380073 # Calculates the first 10001 terms
%p A380073 A380073:=proc(M)
%p A380073     local i,m,p,q,r,v,w,L,F;
%p A380073     L:=[];
%p A380073     m:=M^2+2*M+2;
%p A380073     for p from 2 to M do
%p A380073         for q to p-1 do
%p A380073             if gcd(p,q)=1 and (is(p,even) or is(q,even)) then
%p A380073                 r:=1;
%p A380073                 for i in ifactors(p^2-q^2+2*p*q)[2] do
%p A380073                     if is(i[2],odd) then
%p A380073                         r:=r*i[1]
%p A380073                     fi
%p A380073                 od;
%p A380073                 w:=r*(p^2+q^2);
%p A380073                 if w<=m then
%p A380073                     v:=r*max(p^2-q^2,2*p*q);
%p A380073                     L:=[op(L),seq([i^2*w,i^2*v],i=1..floor(sqrt(m/w)))]
%p A380073                 fi
%p A380073             fi
%p A380073         od
%p A380073     od;
%p A380073     F:=[];
%p A380073     for i in sort(L) do
%p A380073         F:=[op(F),i[2]]
%p A380073     od;
%p A380073     return op(F)
%p A380073 end proc;
%p A380073 A380073(4330);
%Y A380073 Cf. A000290, A007913, A046084, A089548, A379830, A380072, A380074.
%K A380073 nonn
%O A380073 1,1
%A A380073 _Felix Huber_, Jan 18 2025