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

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

A316842 Three-column table read by rows giving primitive integer sides of proper triangles (i,j,k) with i >= j >= k >= 1, j+k > i, gcd(i,j,k) = 1.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 23 2018, following a suggestion from Donald S. McDonald

Keywords

Examples

			Table begins:
[1,1,1],
[2,2,1],
[3,2,2],
[3,3,1],
[3,3,2],
[4,3,2],
[4,3,3],
[4,4,1],
[4,4,3],
[5,3,3],
[5,4,2],
...
		

Crossrefs

There are A123323(k) rows that begin with k.
The three columns are A316846, A316847, A316848.
A316850 is a compressed version.
See A316841 for all triples (including imprimitive triples).
See A316852 and A317181 & A317183 for perimeter and area.
Other related sequences: A051493, A070080, A070081, A070082, A070110.

A054875 Number of pairwise incongruent triangles with integer sides and positive integer area and longest side of length n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 0, 3, 1, 3, 1, 0, 3, 2, 0, 0, 3, 4, 4, 0, 1, 2, 7, 0, 1, 0, 3, 3, 2, 5, 0, 6, 7, 4, 4, 0, 2, 4, 0, 0, 5, 0, 6, 7, 10, 4, 1, 3, 4, 0, 4, 0, 10, 3, 0, 3, 1, 11, 3, 0, 8, 1, 5, 0, 4, 6, 7, 13, 0, 3, 9, 0, 10, 0, 6, 0
Offset: 1

Views

Author

Henry Bottomley, May 26 2000

Keywords

Crossrefs

Programs

  • Mathematica
    okQ[x_, y_, z_] := If[x + y <= z, False, Module[{s = (x + y + z)/2}, IntegerQ[ Sqrt[s(s-x)(s-y)(s-z)]]] ]; a[n_] := Module[{num = 0}, Do[Do[If[okQ[x,y,n], num++], {x,1,y}], {y,1,n}]; num]; Array[a, 100] (* Amiram Eldar, Nov 22 2018 *)

Extensions

Name and offset changed to align with 2012 changes to A054876 by Peter Munn, Nov 23 2018

A239246 Number of primitive Heronian triangles with n as greatest side length.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 2, 0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 1, 3, 2, 0, 1, 2, 3, 0, 0, 0, 0, 2, 1, 5, 0, 4, 3, 4, 1, 0, 2, 1, 0, 0, 2, 0, 2, 4, 6, 4, 0, 2, 2, 0, 2, 0, 1, 3, 0, 1, 0, 8, 2, 0, 5, 1, 2, 0, 0, 6, 2, 7, 0, 3, 0, 0, 3, 0, 2, 0, 0, 9
Offset: 1

Views

Author

Frank M Jackson, Mar 13 2014

Keywords

Examples

			a(17)=3 as there are 3 primitive Heronian triangles with greatest side length of 17. They are (9, 10, 17), (8, 15, 17) and (16, 17, 17).
		

Crossrefs

Programs

  • Mathematica
    nn=200; lst={}; Do[s=(a+b+c)/2; If[IntegerQ[s]&&GCD[a, b, c]==1, area2=s(s-a)(s-b)(s-c); If[area2>0&&IntegerQ[Sqrt[area2]], AppendTo[lst, c]]], {c, 3, nn}, {b, c}, {a, b}]; Table[Length@Select[lst, #==n &], {n, 1, nn}] (* using T. D. Noe's program at A083875 *)

A316846 Column 1 of table A316842.

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

N. J. A. Sloane, Jul 23 2018

Keywords

Crossrefs

Formula

k appears A123323(k) times.

Extensions

Terms a(54) and beyond from Lars Blomberg, Jul 27 2018

A123324 Number of integer-sided triangles with all sides <= n and sides relatively prime.

Original entry on oeis.org

1, 2, 5, 9, 17, 24, 39, 53, 74, 94, 129, 155, 203, 242, 294, 346, 426, 483, 582, 658, 760, 855, 998, 1098, 1258, 1390, 1561, 1711, 1935, 2083, 2338, 2538, 2788, 3012, 3312, 3534, 3894, 4173, 4521, 4817, 5257, 5551, 6034, 6404, 6848, 7255, 7830, 8222, 8831
Offset: 1

Views

Author

Keywords

Comments

Number of triples a,b,c with a<=b<=c

Crossrefs

Programs

  • Mathematica
    A123323[n_] := DivisorSum[n, Floor[(#+1)^2/4]*MoebiusMu[n/#]&]; Array[ A123323, 60] // Accumulate (* Jean-François Alcover, Dec 07 2015 *)
  • PARI
    A123323(n)=sum(k=1,n,sumdiv(k,d,floor((d+1)^2/4)*moebius(k/d)));

Formula

Partial sums of A123323.
G.f.: (G(x)+x-x^2)/(2(1-x)), where G(x) = Sum_{k >= 1} mobius(k)*x^k*(1+2*x^k-x^(2*k))/(1-x^k)^2/(1-x^(2*k)).

A123325 Number of distinct angles in all integer-sided triangles with all sides <= n.

Original entry on oeis.org

1, 3, 9, 17, 35, 49, 82, 109, 149, 188, 262, 316, 419, 500, 607, 698, 876, 1004, 1222, 1383, 1589, 1782, 2108, 2318, 2634, 2914, 3253, 3564, 4088, 4411, 5000, 5392, 5917, 6410, 6995, 7468, 8308, 8926, 9661, 10268, 11313, 11976, 13136, 13951, 14875
Offset: 1

Author

Keywords

Comments

Using the law of cosines, the angle A opposite side a has cos A = (b^2 + c^2 - a^2) / (2bc) and the cosine uniquely identifies an angle of a triangle.

Crossrefs

Programs

  • PARI
    A123325(n)=local(i,j,k,l); r=0; l=listcreate(n^3); for(i=1,n, for(j=1,n, for(k=1,n, if(gcd(i,gcd(j,k))==1&&2*max(i,max(j,k))
    				

A373041 2*a(n) is the number of triangles with integer sides (x, y, n), x < y < n, and gcd(x, y, n) = 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 10, 10, 15, 15, 20, 20, 28, 24, 36, 32, 42, 40, 55, 44, 65, 57, 72, 66, 91, 68, 105, 88, 110, 100, 132, 102, 153, 126, 156, 136, 190, 138, 210, 170, 204, 187, 253, 184, 273, 215, 272, 240, 325, 234, 340, 276, 342, 301, 406, 280, 435, 345, 414, 368, 480
Offset: 5

Author

Andrés Sancho and Hugo Pfoertner, May 21 2024

Keywords

Comments

Offset 5 is chosen to exclude the only count not divisible by 2, which represents the triangle with sides (2,3,4).

Crossrefs

Programs

  • PARI
    a(n) = {if(isprime(n), n\=2; return(n*(n-1)/2)); my(res = 0, g, sn = vecprod(factor(n)[,1])); for(b = (n + 3)\2, n-1, g = gcd(b, sn); if(g == 1, res+=(2*b - n - 1);, my(d, e); d = divisors(g); for(i = 1, #d, e = (-1)^(omega(d[i])); t = ((b-1)\d[i])*e; t-= ((n-b)\d[i])*e; res+=t))); res>>1} \\ David A. Corneth, May 22 2024

Formula

a(n) = (A373051(n) - A373051(n-1))/2 for n >= 5.
a(n) = (A123323(n) - 3*A023022(n))/2 for n >= 5.

A373051 Number of non-similar triangles possible with distinct positive integer side lengths of at most n units.

Original entry on oeis.org

0, 0, 0, 1, 3, 7, 13, 21, 33, 47, 67, 87, 117, 147, 187, 227, 283, 331, 403, 467, 551, 631, 741, 829, 959, 1073, 1217, 1349, 1531, 1667, 1877, 2053, 2273, 2473, 2737, 2941, 3247, 3499, 3811, 4083, 4463, 4739, 5159, 5499, 5907, 6281, 6787, 7155, 7701, 8131, 8675, 9155, 9805
Offset: 1

Author

Andrés Sancho, May 20 2024

Keywords

Comments

Also, number of triangles possible with integer side lengths x, y, and z such that z < y < x <= n and gcd(x, y, z) = 1.
For all n, this number is strictly less than n^3. For all n > 5, this number is strictly greater than n.
For all n > 3, this sequence is strictly increasing.
The first n terms can be calculated in O(n^3) time.
a(n) <= A000292(n + 2). - David A. Corneth, May 22 2024

Examples

			For n = 5, the 3 solutions are (4, 3, 2), (5, 4, 2), and (5, 4, 3).
		

Crossrefs

Programs

  • PARI
    \\ See PARI link

Formula

a(n) = 1 + 2*Sum_{k=5..n} A373041(k) for n >= 5.

A128522 A054525 * A128174 * A000012.

Original entry on oeis.org

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

Author

Gary W. Adamson, Mar 07 2007

Keywords

Comments

Row sums = A123323: (1, 1, 3, 4, 8,7, 15, 14, ...). Left column = A083290: (1, 0, 1, 1, 2, 1, 3, 2, 3, 2, ...) A128521 = A128174 * A054525 * A000012.

Examples

			First few rows of the triangle:
  1;
  0, 1;
  1, 1, 1;
  1, 1, 1, 1;
  2, 2, 2, 1, 1;
  1, 1, 1, 2, 1, 1;
  3, 3, 3, 2, 2, 1, 1;
  2, 2, 2, 2, 2, 2, 1, 1;
  3, 3, 3, 3, 3, 2, 2, 1, 1;
  ...
		

Formula

A054525 * A128174 * A000012 as infinite lower triangular matrices.
Showing 1-10 of 10 results.