Number of ways to divide 10000 dollars evenly between two people with 50 20 dollars, 40 50 dollars, 70 100 dollars. I am treating this as a composition type of question.
I define the set T = {0,20,40,...,1000} ; F = {0,50,100,...,2000} ; S = {0,100,200,...7000}
Then I just use the product lemma on T, F and S to form the corresponding generating series.
Is my method correct or am I completely wrong.  I have reached up to the point that I described but I don't know where to proceed.
Thanks
 A: For simplicity, let us first divide the dollars by 10. Then we have 2, 5 and 10 dollars and our goal is to sum them up to 500, as in this case the remaining dollars will sum up to 500 in exactly one way. Next, notice that 5 is odd, so the number of 5's has to be even. Thus we may count them as 10's, but we have to take into account that there are different ways to compose the overall number if 10's. 
As there are only 50 of the 2 dollars, their sum will be in range [0,100], so the sum of the 5 and 10 dollars has to be in range [400,500]. If it is in this range and the number of 5's is even, there is exactly one way to choose 2's such that the overall sum is 500. 
The range can be achieved, by choosing at least 40 and at most 50 of the 10's. In these cases, we are free to choose 0 to 20 of these tens, which are actually composed of pairs of 5's. So, the overall result is ($i$ is the number of 10's, $j$ is the number of pairs of 5's and these determine the number of 2's).
$$\sum_{i=40}^{50} \sum_{j=0}^{20} 1 = 11 \cdot 21 = 231.$$
There are 231 ways to choose dollars that sum up to 5000. 
A: You could look at the coefficient of $x^{5000}$ in the polynomial
$$
P(x)=\left(\sum_{i=0}^{50}x^{20i}\right)\left(\sum_{j=0}^{40}x^{50j}\right)\left(\sum_{k=0}^{70}x^{100k}\right)
$$
