login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A373051 Number of non-similar triangles possible with distinct positive integer side lengths of at most n units. 2

%I #37 Jun 10 2024 18:42:52

%S 0,0,0,1,3,7,13,21,33,47,67,87,117,147,187,227,283,331,403,467,551,

%T 631,741,829,959,1073,1217,1349,1531,1667,1877,2053,2273,2473,2737,

%U 2941,3247,3499,3811,4083,4463,4739,5159,5499,5907,6281,6787,7155,7701,8131,8675,9155,9805

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

%C 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.

%C For all n, this number is strictly less than n^3. For all n > 5, this number is strictly greater than n.

%C For all n > 3, this sequence is strictly increasing.

%C The first n terms can be calculated in O(n^3) time.

%C a(n) <= A000292(n + 2). - _David A. Corneth_, May 22 2024

%H David A. Corneth, <a href="/A373051/b373051.txt">Table of n, a(n) for n = 1..10000</a> (first 2893 terms from Andrés Sancho)

%H David A. Corneth, <a href="/A373051/a373051.gp.txt">PARI program</a>

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

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

%o (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; }

%o (PARI) \\ See PARI link

%Y Cf. A000292, A123323, A373041.

%K nonn

%O 1,5

%A _Andrés Sancho_, May 20 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 26 10:23 EDT 2024. Contains 373718 sequences. (Running on oeis4.)