A328949 Number of non-primitive Pythagorean triples with n as a leg or the hypotenuse.
0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 2, 0, 1, 3, 2, 0, 2, 0, 3, 2, 1, 0, 5, 2, 2, 2, 2, 0, 5, 0, 3, 2, 2, 3, 5, 0, 1, 3, 6, 0, 4, 0, 2, 6, 1, 0, 8, 1, 4, 3, 3, 0, 3, 3, 5, 2, 2, 0, 10, 0, 1, 5, 4, 4, 4, 0, 3, 2, 5, 0, 10, 0, 2, 7, 2, 2, 5, 0, 9, 3, 2, 0, 9, 4, 1, 3, 5, 0, 8, 3, 2, 2, 1, 3, 11, 0, 2, 5, 7
Offset: 1
Keywords
Examples
For n=10, 10 is a leg in (10,24,26) and the hypotenuse in (6,8,10), so a(10)=A328708(10)+A328712(10)=1+1=2. And 10 is not a leg or the hypotenuse in any primitive Pythagorean triple, a(10)=A046081(10)-A024363(10)=2-0=2.
References
- A. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, pp. 116-117, 1966.
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 5000 terms from Metin Sariyar)
Programs
-
Mathematica
a[n_] := Count[{x, y} /. Solve[(x^2 + y^2 == n^2 || x^2 - y^2 == n^2) && x > y > 0, {x, y}, Integers], p_ /; GCD @@ p > 1]; Array[a, 100] (* Giovanni Resta, Nov 01 2019 *)
Comments