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.

User: Andrés Sancho

Andrés Sancho's wiki page.

Andrés Sancho has authored 2 sequences.

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.

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.