TOPICS
Search

Triangle Counting


Given rods of length 1, 2, ..., n, how many distinct triangles T(n) can be made? Lengths for which

 l_i>=l_j+l_k
(1)

obviously do not give triangles, but all other combinations of three rods do. The answer is

 T(n)={1/(24)n(n-2)(2n-5)   for n even; 1/(24)(n-1)(n-3)(2n-1)   for n odd.
(2)

The values for n=1, 2, ... are 0, 0, 0, 1, 3, 7, 13, 22, 34, 50, ... (OEIS A002623). Somewhat surprisingly, this sequence is also given by the generating function

 f(x)=(x^4)/((1-x)^3(1-x^2))=x^4+3x^5+7x^6+13x^7+....
(3)

See also

Triangle Tiling

Explore with Wolfram|Alpha

References

Honsberger, R. More Mathematical Morsels. Washington, DC: Math. Assoc. Amer., pp. 278-282, 1991.Sloane, N. J. A. Sequence A002623/M2640 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Triangle Counting

Cite this as:

Weisstein, Eric W. "Triangle Counting." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/TriangleCounting.html

Subject classifications