<s>[INST] Combination of problem having identical objects without using generating function approach 
A person goes in for an examination in which there are $4$ papers with a maximum of $m$ marks from each paper. The number of ways in which one can get $2m$ marks is

My Attempt
Number of ways of partitioning $n$ identical objects into $r$ distinct groups, if empty groups are allowed is:${}^{n+r-1}C_{r-1}$.
Here, $n=2m$ and $r=4$
Req. number of ways = ${}^{n+r-1}C_{r-1}-$[#{more than m marks for paper 1}+#{more than m marks for paper 2}+#{more than m marks for paper 3}+#{more than m marks for paper 4}]=$${}^{2m+4-1}C_{4-1}-[{}^{m+4-1}C_{4-1}+{}^{m+4-1}C_{4-1}+{}^{m+4-1}C_{4-1}+{}^{m+4-1}C_{4-1}]={}^{2m+4-1}C_{4-1}-4.{}^{m+4-1}C_{4-1}\\
={}^{2m+3}C_{3}-4.{}^{m+3}C_{3}=\frac{(2m+3)(2m+2)(2m+1)}{3.2}-4\frac{(m+3)(m+2)(m+1)}{3.2}\\
=\frac{m+1}{3}.[4m^2+8m+3-2m^2-10m-12]=\frac{(m+1)(2m^2-2m-9)}{3}
$$
But my reference gives the solution $\dfrac{(m+1)(2m^2+4m+3)}{3}$, so what is going wrong here ?
Note: I am trying to solve this problem without using the generating function approach
 [/INST] We have to count the number of solutions of
$$x_1+x_2+x_3+x_4=2m$$
where $0\leq x_i\leq m$ are integers for $i=1,2,3,4$. 
By Stars and Bars, if we consider just the condition $x_i\geq 0$ we have 
$\binom{2m+3}{3}$ solutions. On the other hand, we can have at most one variable $x_i\geq m+1$. If $i=1$, we have to count the number of solutions of
$$y_1+x_2+x_3+x_4=2m-(m+1)=m-1$$
where $y_1:=x_1-(m+1)\geq 0$, $x_i\geq 0$ for $i=2,3,4$. Such solutions, again by Stars and Bars, are $\binom{(m-1)+3}{3}$. By symmetry, the same number turns out for $i=2,3,4$. Hence the answer is
$$\binom{2m+3}{3}-4\binom{m+2}{3}=\frac{(m+1)(2m^2+4m+3)}{3}.$$
</s>