Question: You are given n sticks of lengths 1 to n unit respectively. Using three different sticks how many different triangles can you form?
I have found a formula on the internet. That is if n is odd triangle=(n-1)*(n-3)*(2n-1)/24 else triangle=n*(n-2)*(2n-5)/24
But I could not prove this or find any proof. Can anyone provide with a proof of this formula? How to derive this? Or share if there are other ways to solve this problem? Thanks in advance.