Problem: There are $$$n$$$ sticks of length $$$1,2,3,...,n$$$. How many incongruent triangles can be formed by using three of the given sticks?
My solution: After solving the problem, I found the number of triangles, $$$x$$$, to be:
However, I am not satisfied with this expression. Can it be simplified? (Can we express this equation without using the summation sign?)
I will give you two formulas for the number of scalene triangles with side lengths in $$${1,\dots,n}$$$. The first is
and the second is
Let $$$\epsilon_n=(1+(-1)^{n+1})/16$$$. Formula $$$(2)$$$ says that $$$\frac{n(n-2)(2n-5)}{24}$$$ is equal to the number of triangles plus $$$\epsilon_n$$$. Since $$$0\le \epsilon_n\le 1/16$$$, this means the number of triangles is given by $$$\lfloor n(n-2)/(2n-5)/24\rfloor$$$.
Can you solve it after this part?
For any integer $$$i$$$: If $$$i$$$ is even, $$$\frac{i+1}{2}$$$ is not an integer, and $$$\left\lceil \frac{i+1}{2} \right\rceil = \frac{i+2}{2}$$$. If $$$i$$$ is odd, $$$\frac{i+1}{2}$$$ is already an integer, so $$$\left\lceil \frac{i+1}{2} \right\rceil = \frac{i+1}{2}$$$. Thus, $$$\left\lceil \frac{i+1}{2} \right\rceil$$$ simplifies to: $$$\left\lceil \frac{i+1}{2} \right\rceil = \frac{i+2}{2}$$$ for even $$$i$$$ and $$$\left\lceil \frac{i+1}{2} \right\rceil = \frac{i+1}{2}$$$ for odd $$$i$$$.