OFFSET
1,5
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
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 2893 terms from Andrés Sancho)
David A. Corneth, PARI program
FORMULA
a(n) = 1 + 2*Sum_{k=5..n} A373041(k) for n >= 5.
EXAMPLE
For n = 5, the 3 solutions are (4, 3, 2), (5, 4, 2), and (5, 4, 3).
PROG
(C++) int a(int n) { int term = 0; for (int x = 4; x <= n; x++) { for (int y = ceil(x / 2.0f) + 1; y < x; y++) { for (int z = x - y + 1; z < y; z++) { if (gcd(gcd(x, y), z) == 1) { term++; } } } } return term; }
(PARI) \\ See PARI link
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrés Sancho, May 20 2024
STATUS
approved