The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A078926 Number of primitive Pythagorean triangles with perimeter 2n. 6
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,858
COMMENTS
A Pythagorean triangle is a right triangle whose edge lengths are all integers; such a triangle is 'primitive' if the lengths are relatively prime.
Equivalently, number of odd unitary divisors d of n such that sqrt(n) < d < sqrt(2n). (A divisor d of n is 'unitary' if gcd(d,n/d) = 1.) Sketch of proof: A primitive Pythagorean triangle has edge lengths (r^2-s^2, 2rs, r^2+s^2), where 1<=s<r, r and s are relatively prime and r+s is odd. This has perimeter 2n iff n=r(r+s). Let d=r+s.
LINKS
EXAMPLE
a(858)=2; the primitive Pythagorean triangles with edge lengths (364, 627, 725) and (195, 748, 773) both have perimeter 2*858 = 1716.
MATHEMATICA
oddpart[n_] := If[OddQ[n], n, oddpart[n/2]]; a[n_] := Length[Select[Divisors[oddpart[n]], n<#^2<2n&&GCD[ #, n/# ]==1&]]
(* Second program: *)
Table[DivisorSum[n/2^IntegerExponent[n, 2], 1 &, n < #^2 < 2 n && CoprimeQ[#, n/#] &], {n, 105}] (* Michael De Vlieger, Oct 08 2017 *)
PROG
(Magma) UnitaryDivisors :=
func<n| [d:d in Divisors(n)|GCD(d, n div d) eq 1]>;
func<n | #[d:d in UnitaryDivisors(n)| IsOdd(d) and Isqrt(n) lt d and d le Isqrt(2*n-1)] >;
[A078926(n):n in [1..105]];
(PARI) A078926(n) = sumdiv(n, d, (d%2)*(1==gcd(d, n/d))*((d*d)>n)*((d*d)<(2*n))); \\ Antti Karttunen, Oct 07 2017
CROSSREFS
a(n) = A070109(2n). A078927(n) is smallest s such that a(s)=n. a(n) is nonzero iff n is in A020886.
Sequence in context: A177063 A341619 A302049 * A324824 A025458 A286925
KEYWORD
nonn,easy
AUTHOR
Dean Hickerson, Dec 15 2002
EXTENSIONS
Secondary offset added by Antti Karttunen, Oct 07 2017
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 May 23 10:34 EDT 2024. Contains 372760 sequences. (Running on oeis4.)