Given $n \ge 0$, find the number of non-negative integer solutions of the following equation $$2x_1+x_2+x_3+x_4+x_5=n$$
I tried putting one $x_1$ on the right-hand side, as follows
$$x_1+x_2+x_3+x_4+x_5=n-x_1.$$
Then I am not sure what to do. On the left-hand side, we now have non-negative numbers, but not sure how to write this sum because of the right-hand side.
We choose a value for $x_1$ from $0$ to $\lfloor{\frac{n}{2}}\rfloor$.
Then we use combinations with repetition to distribute $r=n-2x_1$ identical objects into the 4 remaining slots ($x_2,x_3,x_4,x_5$).
So for each choice of $x_1$,
we have $m+r-1 \choose r$ solutions
$m+r-1 \choose r$, where m is 4.
=$n-2x_1+3 \choose n-2x_1$
=$n-2x_1+3 \choose 3$
So the total number of solutions is
$\sum_{x_1=0}^{\lfloor\frac{n}{2}\rfloor} {n-2x_1+3 \choose 3}$
Note sure if there's a simplification of this.