How many triangles with integral side lengths are possible, provided their perimeter is $36$ units?
How many triangles with integral side lengths are possible, provided their perimeter is $36$ units?
My approach:
Let the side lengths be $a, b, c$; now,
$$a + b + c = 36$$
Now, $1 \leq a, b, c \leq 18$.
Applying multinomial theorem, I'm getting $187$ which is wrong.
Please help.
Solution 1:
The number of triangles with perimeter $n$ and integer side lengths is given by Alcuin's sequence $T(n)$. The generating function for $T(n)$ is $\dfrac{x^3}{(1-x^2)(1-x^3)(1-x^4)}$. Alcuin's sequence can be expressed as
$$T(n)=\begin{cases}\left[\frac{n^2}{48}\right]&n\text{ even}\\\left[\frac{(n+3)^2}{48}\right]&n\text{ odd}\end{cases}$$
where $[x]$ is the nearest integer function, and thus $T(36)=27$. See this article by Krier and Manvel for more details. See also Andrews, Jordan/Walch/Wisner, these two by Hirschhorn, and Bindner/Erickson.