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.
%I A382931 #9 Apr 19 2025 17:48:30 %S A382931 7,19,36,51,69,88,99,106,126,147,163,187,196,208,227,240,250,273,293, %T A382931 314,342,361,384,392,409,434,455,459,483,504,507,525,549,552,579,599, %U A382931 627,649,679,702,711,718,724,744,752,775,802,829,854,879,894,908,935,960 %N A382931 Numbers k for which the Pythagorean triangle (A046083(k), A046084(k), A009000(k)) has an integer altitude. %C A382931 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. %H A382931 Felix Huber, <a href="/A382931/b382931.txt">Table of n, a(n) for n = 1..10000</a> %H A382931 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a> %e A382931 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. %p A382931 A382931:=proc(H) # All hypotenuses <= H. %p A382931 local a,b,c,k,p,q,L,M; %p A382931 L:=[]; %p A382931 M:=[]; %p A382931 for p from 2 to floor(sqrt(H-1)) do %p A382931 for q to min(p-1,floor(sqrt(H-p^2))) do %p A382931 if gcd(p,q)=1 and is(p-q,odd) then %p A382931 a:=p^2-q^2; %p A382931 b:=2*p*q; %p A382931 c:=p^2+q^2; %p A382931 for k to iquo(H,c) do %p A382931 L:=[op(L),[k*c,k*max(a,b),k*a*b/c]] %p A382931 od %p A382931 fi %p A382931 od %p A382931 od; %p A382931 L:=sort(L); %p A382931 for k to nops(L) do %p A382931 if is(L[k,3],integer) then %p A382931 M:=[op(M),k] %p A382931 fi %p A382931 od; %p A382931 return op(M) %p A382931 end proc; %p A382931 A382931(1075); %Y A382931 Cf. A009000, A046083, A046084, A382932. %K A382931 nonn %O A382931 1,1 %A A382931 _Felix Huber_, Apr 11 2025