Triangle counting in this problem asks for the number of nondegenerate triangles
that can be formed by choosing three distinct rods from one rod of each length 1,
2, ...,
,
where
is an integer. Each choice of three rods is counted once.
If the largest length
and the other two lengths
and
satisfy
|
(1)
|
then the rods do not form a nondegenerate triangle. All other choices satisfy the triangle inequality and do form a triangle. The answer is
|
(2)
|
The values for ,
2, ... are 0, 0, 0, 1, 3, 7, 13, 22, 34, 50, ... (OEIS A002623,
with
for
).
The ordinary generating function
is
|
(3)
|
for .