Number of integer solutions combinatorics problem what is the number of integer solutions to
$$x_1+x_2+x_3+x_4+x_5=18$$ with $$x_1\ge1\;\;\;x_2\ge2\;\;\;x_3\ge3\;\;\;x_4\ge4\;\;\; x_5\ge5$$
I know I have to use this formula $$\frac{(n+r-1)!}{(n-1)!\;r!}= {{n+r-1}\choose r}$$
My instinct says that I should use $n=18-1-2-3-4=18-15=3$ and $r=5$ but I m not sure it makes sense?
Anyone can help me please?

We can change the problem from its original form
$$x_1+x_2+x_3+x_4+x_5=18$$
$$x_1\ge1,x_2\ge2,x_3\ge3,x_4\ge4,x_5\ge5$$
to
$$y_1+y_2+y_3+y_4+y_5=(x_1-1)+(x_2-2)+(x_3-3)+(x_4-4)+(x_5-5)=3$$
$$y_1\ge0,y_2\ge0,y_3\ge0,y_4\ge0,y_5\ge0$$
and use generating functions approach, giving the following function
$$(1+y+y^2+...+y^k+...)^5$$
and the coefficient of $y^3$ term is the answer, which is 35. Here is another example to look at (which contains another link to another example ...).
