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 32 results. Next

A010814 Perimeters of integer-sided right triangles.

Original entry on oeis.org

12, 24, 30, 36, 40, 48, 56, 60, 70, 72, 80, 84, 90, 96, 108, 112, 120, 126, 132, 140, 144, 150, 154, 156, 160, 168, 176, 180, 182, 192, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252, 260, 264, 270, 276, 280, 286, 288, 300, 306, 308, 312, 320, 324
Offset: 1

Views

Author

Ben Manvel (manvel(AT)lagrange.math.colostate.edu)

Keywords

Comments

A number k is in this sequence iff k is a multiple of some term in A024364.

Crossrefs

Twice A005279.
Cf. A024364.

Programs

  • Maple
    isA010814 := proc(an) local a::integer,b::integer,c::integer ; for c from 1 to floor(an/2) do for a from floor(c/sqrt(2)) to c-1 do if issqr(c^2-a^2) then b := sqrt(c^2-a^2) ; if a+b+c = an then RETURN(true) ; fi ; fi ; od ; od : RETURN(false) ; end : for n from 3 to 400 do if isA010814(n) then printf("%d,",n) ; fi ; od ; # R. J. Mathar, Jun 08 2006
  • Mathematica
    lst={};Do[Do[If[IntegerQ[c=Sqrt[a^2+b^2]],AppendTo[lst,a+b+c]],{b,a-1,Floor[Sqrt[a]],-1}],{a,4,4*5!}];Take[Union@lst,100] (* Vladimir Joseph Stephan Orlovsky, Nov 23 2010 *)
    q[n_] := EvenQ[n] && Module[{d = Divisors[n/2]}, AnyTrue[Range[3, Length[d]], d[[#]] < 2 * d[[#-1]] &]]; Select[Range[350], q] (* Amiram Eldar, Oct 19 2024 *)
  • PARI
    select( {is_A010814(n)=n%2==0&&is_A005279(n\2)}, [1..333]) \\ M. F. Hasler, Mar 20 2025

Extensions

More terms from Ray Chandler, Mar 13 2004

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.

A103606 Primitive Pythagorean triples in nondecreasing order of perimeter, with each triple in increasing order, and if perimeters coincide then increasing order of the even members.

Original entry on oeis.org

3, 4, 5, 5, 12, 13, 8, 15, 17, 7, 24, 25, 20, 21, 29, 12, 35, 37, 9, 40, 41, 28, 45, 53, 11, 60, 61, 16, 63, 65, 33, 56, 65, 48, 55, 73, 13, 84, 85, 36, 77, 85, 39, 80, 89, 20, 99, 101, 65, 72, 97
Offset: 1

Views

Author

Alexandre Wajnberg, Mar 24 2005

Keywords

Comments

The NAME was corrected by a proposal of Wolfdieter Lang. - Ralf Steiner, Sep 29 2019
The corresponding perimeters are given in A024364. - Wolfdieter Lang, Oct 06 2014
Note that the multiplicity of primitive Pythagorean triples (increasingly ordered) with perimeter P is not always 1. See A024408 for P numbers with multiplicity k >= 2, and the first example with k = 2 for P = 1716. - Wolfdieter Lang, Sep 24 2019

References

  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 34, page 328.

Crossrefs

Subsequence of A103605.

Programs

  • Mathematica
    A103605 = Cases[Import["https://oeis.org/A103605/b103605.txt", "Table"], {, }][[All, 2]];
    SortBy[Select[Partition[A103605, 3], GCD @@ # == 1&], {#[[1]] + #[[2]] + #[[3]]&, If[EvenQ[#[[1]]], #[[1]], #[[2]]]&}] // Flatten (* Jean-François Alcover, May 26 2020 *)

Extensions

Corrected at the suggestion of Ralf Steiner by Wolfdieter Lang, Sep 24 2019
Errors in b-file noticed by Kevin Ryde corrected by Jean-François Alcover, May 26 2020

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

A009096 Ordered perimeters of Pythagorean triangles, listed with multiplicity.

Original entry on oeis.org

12, 24, 30, 36, 40, 48, 56, 60, 60, 70, 72, 80, 84, 84, 90, 90, 96, 108, 112, 120, 120, 120, 126, 132, 132, 140, 144, 144, 150, 154, 156, 160, 168, 168, 168, 176, 180, 180, 180, 182, 192, 198, 200, 204, 208, 210, 210, 216, 220, 224, 228, 234, 240, 240, 240, 240, 252, 252
Offset: 1

Views

Author

Keywords

Examples

			The perimeters are listed with multiplicity, for example a(8) = a(9) = 60 = 15 + 20 + 25 = 10 + 24 + 26. - _M. F. Hasler_, Jul 04 2025
		

Crossrefs

Cf. A103605 (the corresponding triples), A024364 (perimeters of primitive Pythagorean triangles).

Formula

a(n) = A103605(3n) + A103605(3n-1) + A103605(3n-2). - M. F. Hasler, Jul 04 2025

Extensions

Name clarified by M. F. Hasler, Jul 04 2025

A155171 Numbers p such that if q = p+1 then (a = q^2-p^2, b = 2*p*q, c = q^2 + p^2) is a primitive Pythagorean triple with s-1 and s+1 primes, where s = a+b+c.

Original entry on oeis.org

1, 2, 7, 10, 20, 29, 44, 50, 65, 70, 76, 77, 101, 104, 107, 115, 154, 175, 197, 202, 226, 227, 247, 275, 371, 380, 412, 457, 490, 500, 574, 596, 647, 671, 682, 710, 764, 829, 926, 1052, 1085, 1102, 1127, 1186, 1204, 1205, 1225, 1256, 1280, 1324, 1325, 1331
Offset: 1

Views

Author

Keywords

Examples

			p=1,q=2,a=3,b=4,c=5,s=12-+1 primes.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],AppendTo[lst,n]],{n,8!}];lst

Extensions

Definition edited by N. J. A. Sloane, Jul 19 2022

A155173 Short leg A of primitive Pythagorean triangles such that perimeter s is average of twin prime pairs, q=p+1, A=q^2-p^2, C=q^2+p^2, B=2*p*q, s=A+B+C; s -/+ 1 are primes.

Original entry on oeis.org

3, 5, 15, 21, 41, 59, 89, 101, 131, 141, 153, 155, 203, 209, 215, 231, 309, 351, 395, 405, 453, 455, 495, 551, 743, 761, 825, 915, 981, 1001, 1149, 1193, 1295, 1343, 1365, 1421, 1529, 1659, 1853, 2105, 2171, 2205, 2255, 2373, 2409, 2411, 2451, 2513, 2561, 2649
Offset: 1

Views

Author

Keywords

Comments

With p=1, then q=2,a=3,b=4,c=5, and s=12-+1 (11, 13) both primes.

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],AppendTo[lst,a]],{n,8!}];lst

Extensions

Name edited by Zak Seidov, Mar 21 2014

A155174 Long leg B of primitive Pythagorean triangles such that perimeters are Averages of twin prime pairs, q=p+1, a=q^2-p^2, c=q^2+p^2, b=2*p*q, s=a+b+c, s-+1 are primes.

Original entry on oeis.org

4, 12, 112, 220, 840, 1740, 3960, 5100, 8580, 9940, 11704, 12012, 20604, 21840, 23112, 26680, 47740, 61600, 78012, 82012, 102604, 103512, 122512, 151800, 276024, 289560, 340312, 418612, 481180, 501000, 660100, 711624, 838512, 901824, 931612
Offset: 1

Views

Author

Keywords

Comments

p=1,q=2,a=3,b=4,c=5,s=12-+1 primes, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],AppendTo[lst,b]],{n,8!}];lst

A155175 Hypotenuse C of primitive Pythagorean triangles such that perimeters are Averages of twin prime pairs, q=p+1, a=q^2-p^2, c=q^2+p^2, b=2*p*q, s=a+b+c, s-+1 are primes.

Original entry on oeis.org

5, 13, 113, 221, 841, 1741, 3961, 5101, 8581, 9941, 11705, 12013, 20605, 21841, 23113, 26681, 47741, 61601, 78013, 82013, 102605, 103513, 122513, 151801, 276025, 289561, 340313, 418613, 481181, 501001, 660101, 711625, 838513, 901825, 931613
Offset: 1

Views

Author

Keywords

Comments

p=1,q=2,a=3,b=4,c=5,s=12-+1 primes, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],AppendTo[lst,c]],{n,8!}];lst

A155176 Perimeter s/6 (divided by 6) of primitive Pythagorean triangles such that perimeters are Averages of twin prime pairs, q=p+1, a=q^2-p^2, c=q^2+p^2, b=2*p*q, s=a+b+c, s-+1 are primes.

Original entry on oeis.org

2, 5, 40, 77, 287, 590, 1335, 1717, 2882, 3337, 3927, 4030, 6902, 7315, 7740, 8932, 15965, 20592, 26070, 27405, 34277, 34580, 40920, 50692, 92132, 96647, 113575, 139690, 160557, 167167, 220225, 237407, 279720, 300832, 310765, 336777, 389895
Offset: 1

Views

Author

Keywords

Comments

p=1,q=2,a=3,b=4,c=5,s=12-+1primes, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],AppendTo[lst,s/6]],{n,8!}];lst
Showing 1-10 of 32 results. Next