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 A386945 #8 Aug 27 2025 22:34:09 %S A386945 6,12,10,16,24,27,14,20,40,32,24,48,18,54,28,40,56,80,45,22,75,66,32, %T A386945 64,96,48,72,96,36,72,26,78,108,130,56,40,80,112,120,63,30,160,90,44, %U A386945 147,150,88,132,64,180,128,176,48,34,192,96,102,144,170,192,125,72 %N A386945 Short legs of Pythagorean triples of the form (p^2 - q^2, 2*p*q, p^2 + q^2), ordered by increasing hypotenuse (A386943). %C A386945 In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg. %H A386945 Felix Huber, <a href="/A386945/b386945.txt">Table of n, a(n) for n = 1..10000</a> %H A386945 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a> %F A386945 a(n) = sqrt(A386943(n)^2 - A386944(n)^2). %F A386945 {A046083(n)} = {a(n)} union {A046086(n)} union {A386309(n)}. %e A386945 The nonprimitive Pythagorean triple (6, 8, 10) is of the form (u^2 - v^2, 2*u*v, u^2 + v^2): From u = 3 and v = 1 follows u^2 - v^2 = 8 (long leg), 2*u*v = 6 (short leg), u^2 - v^2 = 10 (hypotenuse). Therefore, 6 is a term. %p A386945 A386945:=proc(N) # To get all hypotenuses <= N %p A386945 local i,l,u,v; %p A386945 l:=[]; %p A386945 for u from 2 to floor(sqrt(N-1)) do %p A386945 for v to min(u-1,floor(sqrt(N-u^2))) do %p A386945 if gcd(u,v)>1 or is(u-v,even) then %p A386945 l:=[op(l),[u^2+v^2,max(2*u*v,u^2-v^2),min(2*u*v,u^2-v^2)]] %p A386945 fi %p A386945 od %p A386945 od; %p A386945 l:=sort(l); %p A386945 return seq(l[i,3],i=1..nops(l)); %p A386945 end proc; %p A386945 A386945(296); %Y A386945 Subsequence of A046083. %Y A386945 Cf. A046086, A366674, A380074, A386309, A386943, A386944. %K A386945 nonn,easy,new %O A386945 1,1 %A A386945 _Felix Huber_, Aug 24 2025