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 A328712 #20 Jun 20 2020 02:39:23 %S A328712 0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,1,0,0,0,1, %T A328712 1,0,0,0,1,1,0,0,0,0,1,0,0,0,0,2,1,1,0,0,1,0,0,1,0,1,0,0,0,0,2,0,0,1, %U A328712 0,1,0,0,0,1,2,0,0,1,0,1,0,1,0,0,2,0,1,0,0,1,1,0,0,0,1,0,0,0,0,2,0,1 %N A328712 Number of non-primitive Pythagorean triples with hypotenuse n. %C A328712 Pythagorean triple including primitive ones and non-primitive ones. For a certain n, it may be the hypotenuse in either primitive Pythagorean triple, or non-primitive Pythagorean triple, or both. %C A328712 This sequence is the count of n as hypotenuse in non-primitive Pythagorean triple. %D A328712 A. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, pp. 116-117, 1966. %H A328712 Robert Israel, <a href="/A328712/b328712.txt">Table of n, a(n) for n = 1..10000</a> %F A328712 a(n) = A046080(n) - A024362(n). %e A328712 n=5 as hypotenuse in only one primitive Pythagorean triple, (3,4,5); so a(5)=0. %e A328712 n=10 as hypotenuse in only one non-primitive Pythagorean triple, (6,8,10); so a(10)=1. %e A328712 n=25 as hypotenuse in one primitive Pythagorean triple (7,24,25) and in one non-primitive Pythagorean triple (15,20,25); so a(25)=1. %p A328712 f:= proc(n) local R; %p A328712 if isprime(n) then return 0 fi; %p A328712 R:= map(t -> subs(t,[x,y]),[isolve(x^2+y^2=n^2)]); %p A328712 nops(select(t -> t[1]>=1 and t[2]>=t[1] and igcd(t[1],t[2])>1, R)) %p A328712 end proc: %p A328712 map(f, [$1..100]); # _Robert Israel_, Oct 31 2019 %t A328712 a[n_] := Module[{R, x, y}, If[PrimeQ[n], 0, R = Solve[GCD[x, y] > 1 && x >= 1 && y >= x && x^2 + y^2 == n^2, {x, y}, Integers]; Length[R]]]; %t A328712 Array[a, 102] (* _Jean-François Alcover_, Jun 20 2020, after Maple *) %Y A328712 Cf. A046080, A024362. %K A328712 nonn %O A328712 1,50 %A A328712 _Rui Lin_, Oct 26 2019