5 pirates find 3000 gold coins. In how many ways they can distribute them, if the captain gets at least 500 and not more then 2000 coins. the rest get at least 150 but not more then 1000 coins.(each one)
I've tried to use this generating function: $(x^{150}+x^{151}+...+x^{1000})^4 * (x^{500}+x^{501}+...+x^{2000})$
Then I thought this approach is better:
we will try to decide how many coins the othe four get, and the pirate will have one option... then, we need to solve: $t_1+t_2+t_3+t_4=n$ where $t_1,t_2,t_3,t_4$ between 150, 2000 and $n$ is: $1000,1001,....,2500$ because $t_i$ is at least 150, we can solve: $y_1+y_2+y_3+y_4=n-600$ we only need to sum the solutions for any $n$ in range. I couldn't solve it, I don't know how to insert the condition that $t_i\leq1000$
Thank You.
We can solve from the generating function itself, rewriting it as:
$ \displaystyle \begin{align} g(x)&= \dfrac{x^{600}\,(1-x^{851})^4}{(1-x)^4}\cdot \dfrac{x^{500}\,(1-x^{1501})}{(1-x)}\\\\ &=\dfrac{x^{1100}\,(1-x^{851})^4\,(1-x^{1501})}{(1-x)^5} \end{align} $
Expand:
$\begin{align} g(x)&=\left(x^{1100}-x^{2601}\right)\, \left(1-\binom{4}{1}x^{851}+\binom{4}{2}x^{1702}-\binom{4}{3}x^{2553}+\binom{4}{4}x^{3404}\right)\sum_{n=0}^{\infty}\binom{n+4}{4}x^n \end{align} $
Extract $[x^{3000}]$, which is:
$\displaystyle \binom{4}{0}\, \binom{1904}{4}-\binom{4}{1}\, \binom{1053}{4}+\binom{4}{2}\, \binom{202}{4}-\binom{403}{4}=341444579376 $