We have buckets of paint in three colours: red, blue and yellow. We have an infinite amount of 3-litre buckets and 6 of 1-litre buckets of each colour. In how many ways can we get 120 litres of paint?
The suggested way of solving the exercise is to use a generating function.
So we get $f(x) = (\sum_{i = 0}^{\infty}{(3x)^{i}})^{3} \cdot (\sum_{i=0}^{6}{(x)^{i}})^{3} = \frac{1}{1 - 3x } \cdot \frac{1 - x^7}{1 - x}$
We used to find the common denominator by finding the common denominator of each factor in examples with 1, 2 and 4 litres of paint and then expand them with binomial theorem. Yet it is not possible in that case. What should I do instead? Or maybe there is a better method for that?
I don't think the following is a satisfactory solution, but I think we should at least get the generating function correct, which it is not in the OP.
My interpretation of the problem is that we want to count the number of solutions in integers to $$3x_1 + 3x_2 + 3x_3 + x_4 +x_5 +x_6 =r$$ where $0 \le x_i$ for $i=1,2,3$, $0 \le x_i \le 6$ for $i=4,5,6$, and $r=120$. The generating function for the number of solutions is $$\begin{align} f(x) &= (1 + x^3 +x^6 + x^9 +\dots)^3 (1+x+x^2+x^3+x^4+x^5 +x^6)^3 \\ &= \left( \frac{1}{1-x^3} \right)^3 \left( \frac{1-x^7}{1-x} \right)^3 \\ &= \frac{(1-x^7)^3}{(1-x)^6 (1+x+x^2)^3} \end {align}$$ We would like to know the coefficient of $x^{120}$ when $f(x)$ is expanded as a power series. According to the Series function in Mathematica, the answer is $85,292$, but I don't know how Mathematica gets its answer. One possible pencil-and-paper approach is to apply the method of partial fractions to $f(x)$, but that appears to require more computation than I would like to do. I would be happy to have someone prove me wrong on that by finding a shortcut.