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-10 of 12 results. Next

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

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.
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

A024364 Ordered perimeters of primitive Pythagorean triangles.

Original entry on oeis.org

12, 30, 40, 56, 70, 84, 90, 126, 132, 144, 154, 176, 182, 198, 208, 220, 234, 240, 260, 286, 306, 312, 330, 340, 374, 380, 390, 408, 418, 420, 442, 456, 462, 476, 494, 510, 532, 544, 546, 552, 570, 598, 608, 644, 646, 650, 672, 684, 690, 700, 714, 736, 756
Offset: 1

Views

Author

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives perimeters A+B+C.
k is in this sequence iff A070109(k) > 0. This is a subsequence of A010814.
For the corresponding primitive Pythagorean triples see A103606. - Wolfdieter Lang, Oct 06 2014
Any term in this sequence can be generated by f(m,k) = 2*m*(m+k), where m and k are positive coprime integers and m > 1, k < m, and m and k are not both odd. For example: f(2,1) = 2*2*(2+1) = 12. - Agola Kisira Odero, Apr 29 2016

Crossrefs

Cf. A020886 (semiperimeters: a(n)/2), A024408 (terms with multiplicity > 1).

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 : for n from 2 to 400 do if isA024364(n) then printf("%d,",n) ; fi ; od ; # R. J. Mathar, Jun 08 2006
  • Mathematica
    isA024364[an_] := Module[{r, s}, For[r = Floor[(an/4)^(1/2)], r <= Floor[(an/2)^(1/2)], r++, For[s = r - 1, s >= 1, s -= 2, If[2r(r + s) == an && GCD[r, s] < 2, Return[True]]; If[2r(r + s) < an, Break[]]]]; Return[False]];
    Select[Range[2, 1000], isA024364] (* Jean-François Alcover, May 24 2024, after R. J. Mathar *)
  • PARI
    select( {is_A024364(n)=my(k=valuation(n,2), o=n>>k); k && fordiv(o, r, r^2<<(k-1) >= o && return; r^2< o && gcd(r,o/r)==1 && return(1))}, [1..400]*2) \\ M. F. Hasler, Jul 08 2025

Formula

a(n) = 2*A020886(n).

A070084 Greatest common divisor of sides of integer triangles [A070080(n), A070081(n), A070082(n)], sorted by perimeter, sides lexicographically ordered.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 7, 2, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n)>1 iff there exists a smaller similar triangle [A070080(k), A070081(k), A070082(k)] with kA070080(n)=A070080(k)*a(n), A070081(n)=A070081(k)*a(n) and A070082(n)=A070082(k)*a(n).

Crossrefs

Programs

  • Mathematica
    maxPer = 22; maxSide = Floor[(maxPer - 1)/2]; order[{a_, b_, c_}] := (a + b + c)*maxPer^3 + a*maxPer^2 + b*maxPer + c; triangles = Reap[Do[If[a + b + c <= maxPer && c - b < a < c + b && b - a < c < b + a && c - a < b < c + a, Sow[{a, b, c}]], {a, 1, maxSide}, {b, a, maxSide}, {c, b, maxSide}]][[2, 1]]; GCD @@@ Sort[triangles, order[#1] < order[#2] &] (* Jean-François Alcover, May 27 2013 *)

Formula

a(n) = GCD(A070080(n), A070081(n), A070082(n)).

A070138 Number of integer triangles with an integer area having relatively prime sides a, b and c such that a + b + c = n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 3
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

From Peter Kagey, Jan 30 2018: (Start)
a(k) > 0 if and only if k is in A096468.
Records appear at indices 12, 36, 54, 84, 98, 162, 242, 338, 484, 578, ....
a(2k - 1) = 0 for all integers k > 0.
(End)

Crossrefs

Extensions

Corrected by T. D. Noe, Jun 17 2004

A051493 Triangles with perimeter n and relatively prime integer side lengths.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 2, 1, 4, 2, 5, 2, 5, 4, 8, 4, 10, 6, 9, 6, 14, 8, 15, 9, 16, 12, 21, 11, 24, 16, 22, 16, 27, 18, 33, 20, 31, 24, 40, 23, 44, 30, 39, 30, 52, 32, 54, 35, 52, 42, 65, 38, 65, 48, 64, 49, 80, 48, 85, 56, 77, 64, 90, 58, 102, 72, 93, 69, 114, 72, 120, 81
Offset: 1

Views

Author

Keywords

Comments

From Peter Munn, Jul 26 2017: (Start)
The triangles that meet the conditions are listed by nondecreasing n in A070110.
Without the requirement for relatively prime side lengths, this sequence becomes A005044.
Counting the triangles by longest side instead of perimeter, this sequence becomes A123323.
a(n) = A070094(n) + A070102(n) + A070109(n).
(End)

Examples

			There are 3 triangles with integer-length sides and perimeter 9: 1-4-4, 2-3-4, 3-3-3. 3-3-3 is omitted because isomorphic to 1-1-1, so a(9)=2.
		

Crossrefs

Equivalent sequences, restricted to subsets: A070091 (isosceles), A070094 (acute), A070102 (obtuse), A070109 (right-angled), A070138 (with integer area), A070202 (with integer inradius).

Programs

  • Mathematica
    nmax = 100;
    A005044[n_] := Quotient[n^2 + 6n Mod[n, 2] + 24, 48];
    A = Array[A005044, nmax];
    mob[m_, n_] := If[ Mod[m, n] == 0, MoebiusMu[m/n], 0];
    Reap[Do[Sow[Sum[mob[n, d] A[[d]], {d, 1, n}]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Oct 05 2021 *)

Formula

Moebius transform of A005044.

Extensions

Corrected and extended with formula by Christian G. Bower, Nov 15 1999
Formula updated due to change to referenced sequence, and definition clarified by Peter Munn, Jul 26 2017

A070094 Number of acute integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 1, 2, 2, 5, 2, 5, 3, 3, 4, 6, 3, 6, 4, 7, 6, 10, 4, 10, 7, 8, 7, 10, 7, 14, 8, 12, 8, 17, 10, 17, 12, 13, 14, 20, 12, 21, 14, 18, 16, 25, 15, 23, 18, 22, 20, 30, 16, 32, 21, 29, 23, 32, 21, 38, 27, 33, 26, 43, 25
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A051493(n) - A070102(n) - A070109(n).

Examples

			For n=10 there are A005044(10) = 2 integer triangles: [2,4,4] and [3,3,4]; both are acute, but GCD(2,4,4)>1, therefore a(9) = 1.
		

Crossrefs

A070102 Number of obtuse integer triangles with perimeter n and relatively prime side lengths.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 1, 3, 2, 3, 2, 5, 3, 6, 2, 8, 5, 9, 5, 9, 6, 11, 6, 14, 9, 14, 9, 17, 11, 19, 12, 19, 15, 23, 13, 27, 18, 26, 16, 32, 20, 33, 21, 34, 26, 40, 23, 42, 29, 42, 29, 50, 32, 53, 35, 48, 41, 58, 37, 64, 45, 60, 42, 71
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A051493(n) - A070094(n) - A070109(n).

Examples

			For n=9 there are A005044(9)=3 integer triangles: [1,4,4], [2,3,4] and [3,3,3]; only one of them is obtuse: 2^2+3^2<16=4^2 and GCD(2,3,4)=1, therefore a(9)=1.
		

Crossrefs

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

A070137 Numbers k such that [A070080(k), A070081(k), A070082(k)] is a right integer triangle with relatively prime side lengths.

Original entry on oeis.org

17, 212, 493, 1297, 2574, 4298, 5251, 14414, 16365, 21231, 26125, 39056, 42597, 55042, 63770, 75052, 91121, 97256, 124355, 164640, 200999, 213083, 253721, 275999, 367997, 384154, 415778, 478343, 511633, 518370, 606417, 665040, 689356, 755435, 846571
Offset: 1

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

Right integer triangles have integer areas: see A070143.

Examples

			493 is a term: [A070080(493), A070081(493), A070082(493)]=[8,15,17], A070084(493)=gcd(8,15,17)=1, A070085(493)=8^2+15^2-17^2=64+225-289=0.
		

Crossrefs

Programs

  • Mathematica
    m = 500 (* max perimeter *);
    sides[per_] := Select[Reverse /@ IntegerPartitions[per, {3}, Range[ Ceiling[per/2]]], #[[1]] < per/2 && #[[2]] < per/2 && #[[3]] < per/2 &];
    triangles = DeleteCases[Table[sides[per], {per, 3, m}], {}] // Flatten[#, 1] & // SortBy[Total[#] m^3 + #[[1]] m^2 + #[[2]] m + #[[1]] &];
    Position[triangles, {a_, b_, c_} /; GCD[a, b, c] == 1 && a^2 + b^2 - c^2 == 0] // Flatten (* Jean-François Alcover, Oct 04 2021 *)

Extensions

More terms from Jean-François Alcover, Oct 04 2021

A225951 Triangle for perimeters of primitive Pythagorean triangles.

Original entry on oeis.org

12, 0, 30, 40, 0, 56, 0, 70, 0, 90, 84, 0, 0, 0, 132, 0, 126, 0, 154, 0, 182, 144, 0, 176, 0, 208, 0, 240, 0, 198, 0, 234, 0, 0, 0, 306, 220, 0, 260, 0, 0, 0, 340, 0, 380, 0, 286, 0, 330, 0, 374, 0, 418, 0, 462, 312, 0, 0, 0, 408, 0, 456, 0, 0, 0, 552, 0, 390, 0, 442, 0, 494, 0, 546, 0, 598, 0, 650, 420, 0, 476, 0, 532, 0, 0, 0, 644, 0, 700, 0, 756
Offset: 2

Author

Wolfdieter Lang, May 21 2013

Keywords

Comments

See the Hardy-Wright (Theorem 225, p. 190) and Niven-Zuckerman-Montgomery (Theorem 5.5, p. 232) references for primitive Pythagorean triangles.
Here a(n,m) = 0 for non-primitive Pythagorean triangles.
There is a one-to-one correspondence between the values n and m of this number triangle for which a(n,m) does not vanish and primitive solutions of x^2 + y^2 = z^2 with y even, namely x = n^2 - m^2, y = 2*n*m and z = n^2 + m^2. The mirror triangles with x even are not considered here. Therefore a(n,m) = (n^2 - m^2) + 2*n*m + (n^2 + m^2) = 2*n*(n+m) (for these solutions).
The number of non-vanishing entries in row n is A055034(n).
The sequence of the diagonal entries is 2*n*(2*n-1) = 2*A000384(n), n >= 2.
The ordered nonzero entries of this triangle gives A024364.
Note that all perimeters <= N will certainly be found if one consider all rows n = 2, 3, ..., floor((-1 + sqrt(2*N + 1))/2).
See also A070109(n) for the number of primitive Pythagorean triangles with perimeter n and leg y even.

Examples

			The triangle a(n,m) begins:
n\m   1    2   3    4    5    6    7    8    9   10   11
2:   12
3:    0   30
4:   40    0  56
5:    0   70   0   90
6:   84    0   0    0  132
7:    0  126   0  154    0  182
8:  144    0 176    0  208    0  240
9:    0  198   0  234    0    0    0  306
10: 220    0 260    0    0    0  340    0  380
11:   0  286   0  330    0  374    0  418    0  462
12: 312    0   0    0  408    0  456    0    0    0  552
...
The primitive triangle for (n,m) = (2,1) is (x,y,z) = (3,4,5), therefore, a(2,1) = 3 + 4 + 5 = 12.
The primitive triangle for (n,m) = (7,4) is (x,y,z) = (33,56,65), therefore, a(7,4) = 33 + 56 + 65 = 154.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
  • Ivan Niven, Herbert S. Zuckerman and Hugh L. Montgomery, An Introduction to the Theory Of Numbers, Fifth Edition, John Wiley and Sons, Inc., NY 1991.

Crossrefs

Cf. A024364 (nonzero, ordered), A225949 (leg sums), A222946 (hypotenuses), A000384 (half of the main diagonal), A070109.

Formula

a(n,m) = 2*n*(n+m) if n > m >= 1, gcd(n,m) = 1, and n and m are integers of opposite parity (i.e., (-1)^{n+m} = -1), otherwise a(n,m) = 0.
Showing 1-10 of 12 results. Next