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 A379830 #6 Jan 17 2025 19:38:51 %S A379830 0,0,1,0,1,0,1,0,2,2,1,0,1,0,1,0,2,0,4,0,1,0,1,0,2,3,1,2,1,0,1,0,5,0, %T A379830 1,0,4,0,1,0,2,0,1,0,1,2,1,0,2,4,7,0,1,0,4,0,2,0,1,0,1,0,1,2,5,0,1,0, %U A379830 1,0,1,0,8,0,1,3,1,0,1,0,2,6,1,0,1,0,1,0 %N A379830 a(n) is the number of Pythagorean triples (u, v, w) for which w - u = n where u < v < w. %C A379830 The difference between the hypotenuse and the short leg of a primitive Pythagorean triple (p^2 - q^2, 2*p*q, p^2 + q^2) (where p > q are coprimes and not both odd) is d = max(2*q^2, (p - q)^2). For every of these primitive Pythagorean triples whose d divides n, there is a Pythagorean triple with w - u = n. Therefore d <= n and it follows that 1 <= q <= sqrt(n/2) and q + 1 <= p <= q + sqrt(n), which means that there is a finite number of Pythagorean triples with w - u = n. %H A379830 Felix Huber, <a href="/A379830/b379830.txt">Table of n, a(n) for n = 0..10000</a> %H A379830 Felix Huber, <a href="/A379830/a379830.txt">Pythagorean triples for which w - u = n</a> %H A379830 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PythagoreanTriple.html">Pythagorean Triple</a> %e A379830 The a(18) = 4 Pythagorean triples are (27, 36, 45), (16, 30, 34), (40, 42, 58), (7, 24, 25) because 45 - 27 = 34 - 16 = 58 - 40 = 25 - 7 = 18. %e A379830 See also linked Maple program "Pythagorean triples for which w - u = n". %p A379830 A379830:=proc(n) %p A379830 local a,p,q; %p A379830 a:=0; %p A379830 for q to isqrt(floor(n/2)) do %p A379830 for p from q+1 to q+isqrt(n) do %p A379830 if igcd(p,q)=1 and (is(p,even) or is(q,even)) and n mod max((p-q)^2,2*q^2)=0 then %p A379830 a:=a+1 %p A379830 fi %p A379830 od %p A379830 od; %p A379830 return a %p A379830 end proc; %p A379830 seq(A379830(n),n=0..87); %Y A379830 Cf. A024361, A024362, A024363, A046079, A046080, A046081, A096033, A224921. %K A379830 nonn %O A379830 0,9 %A A379830 _Felix Huber_, Jan 07 2025