cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A078926 Number of primitive Pythagorean triangles with perimeter 2n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Dean Hickerson, Dec 15 2002

Keywords

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

Examples

			a(858)=2; the primitive Pythagorean triangles with edge lengths (364, 627, 725) and (195, 748, 773) both have perimeter 2*858 = 1716.
		

Crossrefs

a(n) = A070109(2n). A078927(n) is smallest s such that a(s)=n. a(n) is nonzero iff n is in A020886.

Programs

  • Magma
    UnitaryDivisors :=
      func;
    A078926:=
      func;
    [A078926(n):n in [1..105]];
    
  • 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 *)
  • 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

Extensions

Secondary offset added by Antti Karttunen, Oct 07 2017

A078928 Smallest p for which there are exactly n primitive Pythagorean triangles with perimeter p; i.e., smallest p such that A070109(p) = n.

Original entry on oeis.org

12, 1716, 14280, 317460, 1542684, 6240360, 19399380, 63303240, 239168580, 397687290, 458948490, 813632820, 562582020, 2824441620, 3346393050, 6915878970, 6469693230, 8720021310, 9146807670, 8254436190, 23065862820, 25859373540, 202536455550
Offset: 1

Author

Dean Hickerson, Dec 15 2002

Keywords

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.
Least perimeter common to exactly n primitive Pythagorean triangles. - Lekraj Beedassy, May 14 2004

Examples

			a(2)=1716; the primitive Pythagorean triangles with edge lengths (364, 627, 725) and (195, 748, 773) both have perimeter 1716.
		

Crossrefs

a(n) = 2*A078927(n). Cf. A070109.

Programs

  • Mathematica
    oddpart[n_] := If[OddQ[n], n, oddpart[n/2]]; ct[p_] := Length[Select[Divisors[oddpart[p/2]], p/2<#^2
    				

Extensions

a(8) from Robert G. Wilson v, Dec 19 2002
a(9)-a(15) from Derek J C Radden, Dec 22 2012
a(16)-a(39) from Peter T. C. Radden, Dec 29 2012
Showing 1-2 of 2 results.