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.

Previous Showing 21-30 of 37 results. Next

A156687 Perimeters of Pythagorean triangles that can be constructed in exactly 5 different ways.

Original entry on oeis.org

420, 660, 924, 1008, 1080, 1200, 1512, 1584, 1716, 1800, 1872, 1890, 2700, 3150, 3168, 3240, 3480, 3528, 3570, 3720, 3744, 4410, 4440, 4536, 4590, 4704, 4872, 4896, 4950, 5208, 5292, 5472, 5600, 5670, 6000, 6090, 6210, 6216, 6624, 6630, 6660, 6888
Offset: 1

Views

Author

Ant King, Feb 18 2009

Keywords

Comments

For any given N we can always find at least N Pythagorean triangles with the same perimeter.

Examples

			As 924 is the third smallest integer that can occur as the perimeter of exactly 5 Pythagorean triples - specifically (42,440,442), (77,420,427), (132,385,407), (198,336,390) and (231,308,385) - then a(3)=924.
		

References

  • Sierpinski, W.; Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.
  • Beiler, Albert H.; Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.

Crossrefs

Programs

  • Mathematica
    SetSystemOptions["ReduceOptions"->{"DiscreteSolutionBound"->100000}];AllPerimeterTriples[n_Integer]/;n>0:=Module[{result=Reduce[Reduce[{x^2+y^2==z^2,z>y>x>0,Element[{x,y,z},Integers],x+y+z==n},{x,y,z}]]},If[result===False,{},Sort[{x,y,z}/.{ToRules[result]}]]];Select[Range[10000],Length[AllPerimeterTriples[ # ]]==5 &]

A382268 Numbers k such that a right triangle can be formed from a chain of linked rods of lengths 1, 2, 3, ..., k, with the perimeter equal to the total length.

Original entry on oeis.org

15, 20, 24, 35, 39, 44, 48, 55, 56, 63, 75, 76, 80, 84, 91, 95, 99, 104, 111, 119, 120, 132, 135, 140, 143, 144, 152, 155, 168, 175, 176, 187, 188, 195, 203, 207, 215, 216, 219, 224, 252, 259, 260, 264, 272, 275, 279, 287, 288, 296, 299, 308, 315, 320, 324, 335, 351, 360
Offset: 1

Views

Author

Ali Sada and Daniel Mondot, Mar 19 2025

Keywords

Comments

The corresponding perimeters T(a(n)) must be in the intersection of T = A000217 (triangular numbers) with A010814 (perimeters of integer sided right triangles). A number k is in the sequence if there exists a solution {k1, k2, k3} with k > k1 > k2 > k3 >= 0 such that for a < b < c in { T(k1) - T(k2), T(k2) - T(k3), T(k) - T(k1) + T(k3) } one has a^2 + b^2 = c^2. - M. F. Hasler, Mar 20 2025

Examples

			The first triangle is when k = 15. The segments are [6+7+8+9+10] [11+12+13+14] [15+1+2+3+4+5]. The sums of the segments are (40, 50, 30), which is 10 times the primitive right triangle (3, 4, 5).
The second term, k = 20, corresponds to 5 distinct solutions:
  S1 = {18, 16, 9}: a = 9+...+1 + 20+19 = 84, b = 18+17 = 35, c = 16+...+10 = 91,
  S2 = {17, 11, 3}: a = 20+19+18 + 3+2+1 = 63, c = 17+...+12 = 87, b = 11+...+4 = 60,
  S3 = {17, 11, 2}: a = 20+19+18 + 2+1 = 60, c = 17+...+12 = 87, b = 11+...+3 = 63,
  S4 = {16, 9, 4}: a = 20+...+17 + 4+...+1 = 84, c = 16+...+10 = 91, b = 9+...+5 = 35,
  S5 = {15, 8, 1}: c = 20+...+16 + 1 = 91, a = 15+...+9 = 84, b = 8+...+2 = 35.
We note that S2 and S3, and S1, S4 and S5, have the same side lengths, but different decompositions.
		

Crossrefs

Programs

  • PARI
    select( {is_A382268(n)=my(Tn=n*(n+1)\2,T1,T2,S); Tn%2==0 && is_A005279(Tn\2) && forstep(n1=n-1,sqrtint(Tn-1)+1,-1, T1=n1*(n1+1)\2; forstep(n2=n1-1,sqrtint(2*T1-Tn-1)+1,-1, T2=n2*(n2+1)\2; forstep(n3=n2-1,0,-1, #(S=Set([Tn-T1+S=n3*(n3+1)\2,T2-S,T1-T2]))>2 && S[3]^2 == S[1]^2+S[2]^2 && return(S))))}, [1..100])\\ M. F. Hasler, Mar 22 2025

A009129 Perimeter of more than one Pythagorean triangle.

Original entry on oeis.org

60, 84, 90, 120, 132, 144, 168, 180, 210, 240, 252, 264, 270, 280, 288, 300, 312, 330, 336, 360, 390, 396, 408, 420, 432, 440, 450, 456, 462, 468, 480, 504, 510, 520, 528, 540, 546, 552, 560, 570, 576, 588, 600, 612, 616, 624, 630, 660, 672, 680, 684, 690, 700, 720
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A010814.

Programs

  • PARI
    is(k)=my(m2,mm2,s); for(m=2,sqrtint(k\2), m2=2*m; mm2=2*m^2; forstep(n=if(m%2,2,1),min(k\m2-m,m-1),m%2+1, if(k%(mm2+m2*n)==0 && gcd(m,n)==1 && s++>1, return(1)))); 0 \\ Charles R Greathouse IV, Feb 03 2018
    
  • PARI
    list(lim)=my(v=List(),ct=Map(),m2,mm2,t); for(m=2, sqrtint(lim\2), m2=2*m; mm2=2*m^2; forstep(n=if(m%2,2,1),min(lim\m2-m,m-1),m%2+1, if(gcd(m,n)>1, next); t=mm2+m2*n; forstep(k=t,lim,t, mapput(ct,k,mapisdefined(ct,k))))); for(n=60,lim, if(mapisdefined(ct,n) && mapget(ct,n), listput(v,n))); ct=0; Vec(v) \\ Charles R Greathouse IV, Feb 03 2018

A334761 Perimeters of Pythagorean triangles whose hypotenuse divides the difference of squares of its long and short legs.

Original entry on oeis.org

60, 120, 180, 240, 300, 360, 390, 420, 480, 540, 600, 660, 680, 720, 780, 840, 900, 960, 1020, 1080, 1140, 1170, 1200, 1260, 1320, 1360, 1380, 1400, 1440, 1500, 1560, 1620, 1680, 1740, 1800, 1860, 1920, 1950, 1980, 2030, 2040, 2100, 2160, 2220, 2280, 2340, 2400
Offset: 1

Views

Author

Wesley Ivan Hurt, May 10 2020

Keywords

Comments

The smallest terms corresponding to 2,...,5 triangles are a(15) = 780, a(191) = 9360, a(3324) = 159120, and a(19433) = 928200, respectively. - Giovanni Resta, May 11 2020

Examples

			a(1) = 60; the triangle [15,20,25] has perimeter 60. The difference of squares of its long and short leg lengths is (20^2 - 15^2) = 400 - 225 = 175 and 25|175.
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[s = Solve[x^2 + y^2 == (p-x-y)^2 && z^2 == x^2 + y^2 && 0 0, {x, y, z}, Integers]; If[s != {} && AnyTrue[{x, y , z} /. s, Mod[#[[2]]^2 - #[[1]]^2, #[[3]]] == 0 &], Print@Sow@p], {p, 12, 1000, 2}]][[2, 1]] (* Giovanni Resta, May 11 2020 *)

Extensions

Terms a(31) and beyond from Giovanni Resta, May 11 2020

A048759 Longest perimeter of a Pythagorean triangle with n as length of one of the three sides.

Original entry on oeis.org

12, 12, 30, 24, 56, 40, 90, 60, 132, 84, 182, 112, 240, 144, 306, 180, 380, 220, 462, 264, 552, 312, 650, 364, 756, 420, 870, 480, 992, 544, 1122, 612, 1260, 684, 1406, 760, 1560, 840, 1722, 924, 1892, 1012, 2070, 1104, 2256, 1200, 2450, 1300, 2652
Offset: 3

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Crossrefs

Programs

  • Magma
    [(3*n^2+4*n-n^2*(-1)^n)/4: n in [3..60]]; // Vincenzo Librandi, Jul 19 2015
  • Mathematica
    A048759[n_] := (3 - (-1)^n)*n^2 / 4 + n; Array[A048759, 100, 3] (* or *)
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {12, 12, 30, 24, 56, 40}, 100] (* Paolo Xausa, Feb 29 2024 *)
  • PARI
    Vec(-2*x^3*(2*x^5+x^4-6*x^3-3*x^2+6*x+6)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Sep 13 2014
    

Formula

a(n) = n*A029578(n+2) = n+A055523(n)+A055524(n).
a(2*k) = 2*k*(k+1), a(2*k+1) = 2*(2*k+1)*(k+1).
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - Colin Barker, Sep 13 2014
G.f.: -2*x^3*(2*x^5+x^4-6*x^3-3*x^2+6*x+6) / ((x-1)^3*(x+1)^3). - Colin Barker, Sep 13 2014
a(n) = (3*n^2+4*n-n^2*(-1)^n)/4. - Luce ETIENNE, Jul 18 2015
E.g.f.: x*((4 + x)*cosh(x) + (3 + 2*x)*sinh(x) - 4*(1 + x))/2. - Stefano Spezia, May 24 2021

A370599 a(n) is the number of distinct triangles with integral side-lengths for which the perimeter 2*n divides the area.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 1, 2, 2, 0, 0, 1, 1, 0, 4, 0, 1, 3, 0, 0, 1, 0, 0, 0, 0, 0, 3, 1, 2, 1, 0, 0, 3, 0, 0, 3, 2, 1, 4, 0, 2, 0, 3, 0, 2, 0, 0, 2, 2, 3, 1, 0, 2, 4, 1, 0, 8, 1, 0, 1
Offset: 1

Views

Author

Felix Huber, Mar 09 2024

Keywords

Comments

If the perimeter 2*n of a triangle with integral edge-lengths divides its area A, then this also applies to a triangle stretched with positive integer k, because A*k^2/(2*n*k) = k*A/(2*n). Therefore a(d) <= a(n) for all positive divisors d of n and a(m) >= a(n) for all positive integer multiples m of n.
With an odd perimeter, according to Heron's formula the area A would have the form A = sqrt((2*k - 1)/8), where k is a positive integer. The area A would be irrational and the integer perimeter would not divide the area A. For this reason, only triangles with an even perimeter are considered in this sequence.

Examples

			a(18) = 1, because only the triangle (9, 10, 17) satisfies the condition: A/(2*n) = 36/36 = 1. (9, 10, 17) is one of the five triangles for which the perimeter is equal to the area (see A098030).
a(42) = 4, because exactly the 4 triangles (10, 35, 39) with A/(2*n) = 168/84 = 2, (14, 30, 40) with A/(2*n) = 168/84 = 2, (15, 34, 35) with A/(2*n) = 252/84 = 3 and (26, 28, 30) with A/(2*n) = 336/84 = 4 satisfy the condition.
a(426) = 0, because no triangle satisfies the condition. Therefore, a(n) = 0 for all n for which n*k = 426 for positive integers k.
		

Crossrefs

Programs

  • Maple
    A370599 := proc(n) local u, v, w, A, q, i; i := 0; for u to floor(2/3*n) do for v from max(u, floor(n - u) + 1) to floor(n - 1/2*u) do w := 2*n - u - v; A := sqrt(n*(n - u)*(n - v)*(n - w)); if A = floor(A) then q := 1/2*A/n; if q = floor(q) then i := i + 1; end if; end if; end do; end do; return i; end proc;
    seq(A370599(n), n = 1 .. 87);

Formula

a(n*k) >= a(n) for positive integers k.

A376608 Sides x < y < z of Pythagorean triangles ordered first by increasing perimeter x+y+z, then by shorter leg x.

Original entry on oeis.org

3, 4, 5, 6, 8, 10, 5, 12, 13, 9, 12, 15, 8, 15, 17, 12, 16, 20, 7, 24, 25, 10, 24, 26, 15, 20, 25, 20, 21, 29, 18, 24, 30, 16, 30, 34, 12, 35, 37, 21, 28, 35, 9, 40, 41, 15, 36, 39, 24, 32, 40, 27, 36, 45, 14, 48, 50, 20, 48, 52, 24, 45, 51, 30, 40, 50, 28, 45, 53, 11, 60, 61, 33, 44, 55
Offset: 1

Views

Author

Hugo Pfoertner, Sep 29 2024

Keywords

Examples

			   Triangle
   |  Perimeter
   |       x   y   z
   1  12 [ 3,  4,  5]
   2  24 [ 6,  8, 10]
   3  30 [ 5, 12, 13]
   4  36 [ 9, 12, 15]
   5  40 [ 8, 15, 17]
   6  48 [12, 16, 20]
   7  56 [ 7, 24, 25]
   8  60 [10, 24, 26]
   9  60 [15, 20, 25]
  10  70 [20, 21, 29]
		

Crossrefs

A374597 uses this order of sides.

A270417 Number of integer-sided right triangles with semiperimeter n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 16 2016

Keywords

Comments

Number of positive integer solutions to x*y*(y+z) = n with y and z coprime and of opposite parity and z < y.
Records occur at 1, 6, 30, 60, 120, 210, 360, 420, 840, 1260, 2310, 2520, 4620, 9240, 13860, 27720, 55440, 60060, ... - Antti Karttunen, Sep 25 2018

Examples

			a(25)=0 since 2*25 = 50 is not the perimeter of a suitable triangle;
a(30)=2 since 2*30 = 60 = 15+20+25 = 10+24+26;
a(35)=1 since 2*35 = 70 = 20+21+29.
		

Crossrefs

Cf. A010814. Nonzero for terms in A005279.

Programs

  • Mathematica
    a[n_] := Count[{x, y, z} /. {ToRules[Reduce[x>0 && y>0 && z>0 && zJean-François Alcover, Jun 03 2017 *)
  • PARI
    A270417(n) = { my(s=0); fordiv(n,x,fordiv(n/x,y,my(w=n/(x*y)); if((w < 2*y)&&(w>y)&&(w%2)&&(1==gcd(w,y)),s++))); (s); }; \\ (Here z = w-y) - Antti Karttunen, Sep 25 2018

A334791 Perimeters of Pythagorean triangles with squarefree area.

Original entry on oeis.org

12, 30, 70, 84, 132, 182, 260, 340, 374, 390, 420, 462, 476, 494, 510, 598, 646, 782, 798, 870, 966, 1012, 1054, 1254, 1276, 1302, 1334, 1508, 1518, 1612, 1628, 1716, 1804, 1860, 1892, 1924, 2030, 2046, 2132, 2220, 2262, 2310, 2380, 2444, 2460, 2494, 2516, 2542
Offset: 1

Views

Author

Wesley Ivan Hurt, May 10 2020

Keywords

Comments

The smallest terms corresponding to 2, 3, and 4 triangles are a(32) = 1716, a(1325) = 81510, and a(5027) = 317460, respectively. - Giovanni Resta, May 11 2020

Examples

			a(1) = 12; There is one Pythagorean triangle, [3,4,5], with perimeter 12 whose area 3*4/2 = 6 (squarefree).
		

Crossrefs

Cf. A010814.

Programs

  • Mathematica
    Reap[ Do[s = Solve[ x^2 + y^2 == (p-x-y)^2 && 0 0, {x, y}, Integers]; If[s != {} && AnyTrue[x y/2 /. s, SquareFreeQ], Print@ Sow@ p], {p, 12, 1000, 2}]][[2, 1]] (* Giovanni Resta, May 11 2020 *)

Extensions

Terms a(39) and beyond from Giovanni Resta, May 11 2020

A334799 Perimeters of Pythagorean triangles whose short leg divides its area.

Original entry on oeis.org

12, 24, 30, 36, 48, 56, 60, 72, 80, 84, 90, 96, 108, 112, 120, 132, 140, 144, 150, 154, 156, 160, 168, 180, 182, 192, 204, 208, 210, 216, 224, 228, 234, 240, 252, 264, 270, 276, 280, 288, 300, 306, 308, 312, 320, 324, 330, 336, 340, 348, 352, 360, 364, 372, 374, 380
Offset: 1

Views

Author

Wesley Ivan Hurt, May 12 2020

Keywords

Examples

			a(1) = 12; There is one Pythagorean triangle with perimeter 12, [3,4,5] whose area is 6 and 3|6.
a(2) = 24; There is one Pythagorean triangle with perimeter 24, [6,8,10] whose area is 24 and 6|24.
		

Crossrefs

Previous Showing 21-30 of 37 results. Next