# How many non-negative integer are there for $x_1+x_2+x_3+x_4+x_5=12$ where $x_1<x_2<x_3$

I have a combinatorics problem:

How many non-negative integer are there for $$x_1+x_2+x_3+x_4+x_5=12$$ where $$x_1

I tried to subtract the number of integers in which $$x_1=x_2=x_3$$ from the number of the whole possible solutions.However I could not do the rest.Can you enlighten me ,please?

Note: $$x_1,x_2,x_3$$ do not have to be consecutive. They are just smaller than each other ,respectively.

• Try this as an example. – rtybase Jun 28 at 19:34
• What about $x_4$ and $x_5$? Are they arbitrary? – user Jun 28 at 21:12
• @user yes ,they are – LEO Jun 28 at 21:25

Let $$x_2=x_1+a, x_3=x_2+b$$ so that the original equality can be written as: $$3x_1+2a+b+x_4+x_5=12$$ where $$a$$ and $$b$$ are positive and the other are non-negative integer numbers.
The number of integer solutions to the equation is: $$[x^{12}]\frac1{1-x^3}\frac{x^2}{1-x^2}\frac{x}{1-x}\frac{1}{1-x}\frac{1}{1-x}= [x^{12}]\frac{x^3}{(1-x^3)(1-x^2)(1-x)^3}=189.$$ where $$[x^n]$$ means the coefficient at $$x^n$$ in the series expansion of the following expression.