OFFSET
1,10
COMMENTS
Pythagorean triples including primitive ones and non-primitive ones. For a certain n, it may be a leg or the hypotenuse in either a primitive Pythagorean triple, or a non-primitive Pythagorean triple, or both.
This sequence is the count of n as a leg or the hypotenuse in non-primitive Pythagorean triples.
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)
EXAMPLE
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rui Lin, Nov 01 2019
STATUS
approved