login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) = A046080(n) - A024362(n).
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:
map(f, [$1..100]); # Robert Israel, Oct 31 2019
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]]];
Array[a, 102] (* Jean-François Alcover, Jun 20 2020, after Maple *)
CROSSREFS
Sequence in context: A107015 A015374 A164058 * A319368 A092410 A100204
KEYWORD
nonn
AUTHOR
Rui Lin, Oct 26 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)