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.

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

This page as a plain text file.
%I A380074 #9 Jan 25 2025 23:01:39
%S A380074 21,9,84,36,133,85,189,81,189,184,336,144,400,217,532,525,340,225,820,
%T A380074 756,324,756,736,1036,57,1029,564,820,1197,672,765,441,1344,576,1600,
%U A380074 1701,868,2128,729,2100,1701,1656,1360,1464,2044,900,1513,2541,781,2340,3280
%N A380074 Short legs of Pythagorean triangles having legs that add up to a square ordered by increasing hypotenuse.
%C A380074 Corresponding hypotenuses in A380072, long legs in A380073.
%C A380074 Subsequence of A046083 and supersequence of A089547.
%H A380074 Felix Huber, <a href="/A380074/b380074.txt">Table of n, a(n) for n = 1..10001</a>
%H A380074 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a>
%e A380074 21 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
%p A380074 # Calculates the first 10001 terms
%p A380074 A380074:=proc(M)
%p A380074     local i,m,p,q,r,u,w,L,F;
%p A380074     L:=[];
%p A380074     m:=M^2+2*M+2;
%p A380074     for p from 2 to M do
%p A380074         for q to p-1 do
%p A380074             if gcd(p,q)=1 and (is(p,even) or is(q,even)) then
%p A380074                 r:=1;
%p A380074                 for i in ifactors(p^2-q^2+2*p*q)[2] do
%p A380074                     if is(i[2],odd) then
%p A380074                         r:=r*i[1]
%p A380074                     fi
%p A380074                 od;
%p A380074                 w:=r*(p^2+q^2);
%p A380074                 if w<=m then
%p A380074                     u:=r*min(p^2-q^2,2*p*q);
%p A380074                     L:=[op(L),seq([i^2*w,i^2*u],i=1..floor(sqrt(m/w)))]
%p A380074                 fi
%p A380074             fi
%p A380074         od
%p A380074     od;
%p A380074     F:=[];
%p A380074     for i in sort(L) do
%p A380074         F:=[op(F),i[2]]
%p A380074     od;
%p A380074     return op(F)
%p A380074 end proc;
%p A380074 A380074(4330);
%Y A380074 Cf. A000290, A007913, A046083, A089547, A379830, A380072, A380073.
%K A380074 nonn
%O A380074 1,1
%A A380074 _Felix Huber_, Jan 18 2025