|
|
A328712
|
|
Number of non-primitive Pythagorean triples with hypotenuse n.
|
|
3
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,50
|
|
COMMENTS
|
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.
This sequence is the count of n as hypotenuse in non-primitive Pythagorean triple.
|
|
REFERENCES
|
A. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, pp. 116-117, 1966.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
n=5 as hypotenuse in only one primitive Pythagorean triple, (3,4,5); so a(5)=0.
n=10 as hypotenuse in only one non-primitive Pythagorean triple, (6,8,10); so a(10)=1.
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.
|
|
MAPLE
|
f:= proc(n) local R;
if isprime(n) then return 0 fi;
R:= map(t -> subs(t, [x, y]), [isolve(x^2+y^2=n^2)]);
nops(select(t -> t[1]>=1 and t[2]>=t[1] and igcd(t[1], t[2])>1, R))
end proc:
|
|
MATHEMATICA
|
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]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|