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-5 of 5 results.

A078927 Smallest s for which there are exactly n primitive Pythagorean triangles with perimeter 2s; i.e., smallest s such that A078926(s) = n.

Original entry on oeis.org

6, 858, 7140, 158730, 771342, 3120180, 9699690, 31651620, 119584290, 198843645, 229474245, 406816410, 281291010, 1412220810, 1673196525, 3457939485, 3234846615, 4360010655, 4573403835, 4127218095, 11532931410, 12929686770, 101268227775
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.

Examples

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

Crossrefs

a(n) = A078928(n)/2. Cf. A078926.

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(23) from Peter T. C. Radden, Dec 29 2012

A020886 Ordered semiperimeters of primitive Pythagorean triangles.

Original entry on oeis.org

6, 15, 20, 28, 35, 42, 45, 63, 66, 72, 77, 88, 91, 99, 104, 110, 117, 120, 130, 143, 153, 156, 165, 170, 187, 190, 195, 204, 209, 210, 221, 228, 231, 238, 247, 255, 266, 272, 273, 276, 285, 299, 304, 322, 323, 325, 336, 342, 345, 350, 357, 368, 378, 391, 399
Offset: 1

Views

Author

Keywords

Comments

k is in this sequence iff A078926(k) > 0.
Also, ordered sides c of primitive triples (a, b, c) for integer-sided triangles where side a is the harmonic mean of the 2 other sides b and c, i.e., 2/a = 1/b + 1/c with b < a < c (A343893). - Bernard Schott, May 06 2021
a(n) are the ordered radii of inscribed circles in squares, from which the tangents to the circles are cut off by primitive Pythagorean triangles. - Alexander M. Domashenko, Oct 17 2024

Crossrefs

Subsequence of A005279.
Triangles with 2/a = 1/b + 1/c: A343891 (triples), A020883 (side a), A343892 (side b), A343893 (side c), A343894 (perimeter).

Programs

  • Maple
    isA020886 := proc(an) local r::integer,s::integer ; for r from floor((an/2)^(1/2)) to floor(an^(1/2)) do for s from r-1 to 1 by -2 do if r*(r+s) = an and gcd(r,s) < 2 then RETURN(true) ; fi ; if r*(r+s) < an then break ; fi ; od ; od : RETURN(false) ; end : for n from 2 to 400 do if isA020886(n) then printf("%d,",n) ; fi ; od ; # R. J. Mathar, Jun 08 2006
  • Mathematica
    A078926[n_] := Sum[Boole[n < d^2 < 2n && CoprimeQ[d, n/d]], {d, Divisors[ n/2^IntegerExponent[n, 2]]}];
    Select[Range[1000], A078926[#]>0&] (* Jean-François Alcover, Mar 23 2020 *)
  • PARI
    is(n,f=factor(n))=my(P=apply(i->f[i,1]^f[i,2],[2-n%2..#f~]),nn=2*n); forvec(v=vector(#P,i,[0,1]), my(d=prod(i=1,#v,P[i]^v[i]),d2=d^2); if(d2n, return(1))); 0
    list(lim)=my(v=List()); forfactored(n=6,lim\1, if(is(n[1],n[2]), listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Feb 03 2023

Formula

a(n) = A024364(n)/2.

A070109 Number of right integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

Right integer triangles have integer areas: see A070142, A051516.
a(n) is nonzero iff n is in A024364.

Examples

			For n=30 there are A005044(30) = 19 integer triangles; only one is right: 5+12+13 = 30, 5^2+12^2 = 13^2; therefore a(30) = 1.
		

Crossrefs

Programs

  • Mathematica
    unitaryDivisors[n_] := Cases[Divisors[n], d_ /; GCD[d, n/d] == 1];
    A078926[n_] := Count[unitaryDivisors[n], d_ /; OddQ[d] && Sqrt[n] < d < Sqrt[2n]];
    a[n_] := If[EvenQ[n], A078926[n/2], 0];
    Table[a[n], {n, 1, 1716}] (* Jean-François Alcover, Oct 04 2021 *)

Formula

a(n) = A078926(n/2) if n is even; a(n)=0 if n is odd.
a(n) = A051493(n) - A070094(n) - A070102(n).
a(n) <= A024155(n).

Extensions

Secondary offset added by Antti Karttunen, Oct 07 2017

A120089 Square perimeters of primitive Pythagorean triangles.

Original entry on oeis.org

144, 900, 3136, 8100, 17424, 23716, 33124, 43264, 54756, 57600, 93636, 115600, 139876, 144400, 166464, 174724, 207936, 213444, 244036, 298116, 304704, 357604, 414736, 422500, 476100, 490000, 541696, 571536, 640000, 722500, 746496, 756900
Offset: 1

Views

Author

Lekraj Beedassy, Jun 07 2006

Keywords

Comments

Square entries of A024364.

Crossrefs

Cf. A120090.

Programs

  • Maple
    isA024364 := proc(an) local r::integer,s::integer ; for r from floor((an/4)^(1/2)) to floor((an/2)^(1/2)) do for s from r-1 to 1 by -2 do if 2*r*(r+s) = an and gcd(r,s) < 2 then RETURN(true) ; fi ; if 2*r*(r+s) < an then break ; fi ; od ; od : RETURN(false) ; end : isA120089 := proc(an) RETURN( issqr(an) and isA024364(an)) ; end: for n from 2 to 1200 do if isA120089(n^2) then printf("%d,",n^2) ; fi ; od ; # R. J. Mathar, Jun 08 2006
  • Mathematica
    A078926[n_] := Sum[Boole[n < d^2 < 2n && CoprimeQ[d, n/d]], {d, Divisors[n/2^IntegerExponent[n, 2]]}];
    Reap[For[k = 2, k <= 10^6, k += 2, If[A078926[k/2] > 0 && IntegerQ@Sqrt@k, Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Oct 25 2023 *)

Formula

a(n) = (2*u*v)^2, where u=sqrt(j/2) and v=sqrt(j+k) {for coprime pairs (j,k),j>k with odd k such that pairs (u,v),u
a(n) = A024364(k) = A000290(j) for some k and j. - R. J. Mathar, Jun 08 2006

Extensions

Corrected and extended by R. J. Mathar, Jun 08 2006

A077177 Number of primitive Pythagorean triangles with perimeter equal to A002110(n), the product of the first n primes.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 5, 8, 17, 34, 59, 111, 213, 396, 746, 1413, 2690, 5147, 9826, 18885, 36269, 69952, 134949, 260743, 504636, 978311, 1899832, 3692980, 7190329, 13994206, 27279898, 53195986
Offset: 1

Author

Kermit Rose and Randall L Rathbun, Nov 29 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 divisors of s=A070826(n) in the range (sqrt(s), sqrt(2s)). More generally, for any positive integer s, the number of primitive Pythagorean triangles with perimeter 2's equals the number of odd unitary divisors of s in the range (sqrt(s), sqrt(2s)). (A divisor d of n is 'unitary' if gcd(d, n/d) = 1.)

Examples

			a(5) = 1 since there is exactly one primitive Pythagorean triangle with perimeter 2*3*5*7*11; its edge lengths are (132, 1085, 1093). a(7) = 3; the 3 triangles have edge lengths (70941, 214060, 225509), (96460, 195789, 218261) and (142428, 156485, 211597).
		

References

  • A. S. Anema, "Pythagorean Triangles with Equal Perimeters", Scripta Mathematica, vol. 15 (1949) p. 89.
  • Albert H. Beiler, "Recreations in the Theory of Numbers", chapter XIV, "The Eternal Triangle", pp. 131, 132.
  • F. L. Miksa, "Pythagorean Triangles with Equal Perimeters", Mathematics, vol. 24 (1950), p. 52.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Divisors[s=Times@@Prime/@Range[2, n]], s<#^2<2s&]]
  • PARI
    semi_peri(p)= {local(q,r,ct,tot); ct=0; tot=0; pt=0; fordiv(p,q,r=p/q-q; if(r<=q&&r>0,print(q,",",r," [",gcd(q,r),"] "); if(gcd(q,r)==1,ct=ct+1; if(q*r%2==0,pt=pt+1; ); ); tot=tot+1); ); print("semiperimeter:"p," Total sets:",tot," Coprime:",ct," Primitive:",pt); } /* Lists all pairs q,r such that the triangle with edge lengths (q^2-r^2, 2qr, q^2+r^2) has semiperimeter p. */

Formula

a(n) = A070109(A002110(n)) = A078926(A070826(n)).

Extensions

Edited by Dean Hickerson, Dec 18 2002
Showing 1-5 of 5 results.