# How many solutions are there to the equation $x_1 + x_2 + x_3 + x_4 +x_5= 10$ where $x_1, x_2, x_3, x_4, x_5$ are positve integers?

My question is : How many solutions are there to the equation $$x_1 + x_2 + x_3 + x_4 +x_5= 10$$ where $$x_1, x_2, x_3, x_4, x_5$$ are positve integers and $$x_1$$ is an odd number?

I tried to solve it using Stars and bars, by getting to this formula $$x_1=2y_1, x_2=y_2+1,x_3=y_3+1,x_4=y_4+1,x_5=y_5+1.$$ which equals to $$2y_1+y_2+y_3+y_4+y_5=6$$. I don't know how to continue .

• There are just $3$ cases, $x_1 \in \{1,3,5\}$. For each case, distribute the remaining stars to $x_2$ to $x_5$. – peterwhy Dec 29 '19 at 1:47

As mentioned in the comments, there are three cases: $$x_1\in \{1,3,5\}$$. That's because the minimum value of $$x_2+x_3+x_4+x_5$$, when all are positive integers, is $$4$$ and so the maximum odd value of $$x_1$$ is $$5$$. If we set $$x_1 =1$$, then there are $$9$$ stars left and $$8$$ spaces to place $$3$$ bars since all four remaining variables must be positive integers. This gives $${8\choose 3}=56$$ possibilities.
If $$x_1 = 3$$, there are $$6$$ spaces for the bars and $${6\choose 3} = 20$$ possibilities.
Finally, if $$x_1 = 5$$, there are $$4$$ spaces for the bars, for a total of $${4\choose 3} = 4$$ possibilities.
Hence there are $$56+20+4 = 80$$ possibilities in total.
Required number of solutions is the coefficient of $$x^{10}$$ in the expansion of $$(x+x^3+x^5+x^7+\cdots)(x+x^2+x^3+x^4+\cdots)^4$$ $$=x^5(1+x^2+x^4+\cdots)(1+x+x^2+x^3+\cdots)^4$$ $$=\frac{x^5}{(1-x^2)(1-x)^4}$$ $$=\frac{x^5}{(1+x)(1-x)^5}$$ Now, expand both terms of denominator in power series expansion using formula and then find required coefficient.