The number of ways of dividing a number by three separate integers. How many ways can I arrive at the number $45$ by exactly using $5$, $10$ and $20$.  I can use each number as many times as necessary. (e.g $9×5$, $20+(5×5)$) this leads to the question, if the number wasn't $45$ but $x$ is there a general formula to answer the above question from number $a$, $b$ and $c$? (where $a$, $b$ and $c$ may not be whole numbers) - Many thanks!
 A: There is a methodology/formula, as you say. It might not be completely satisfactory for you because it is recursive. As far as solving the recursion, since I learned it in an algorithmics/complexity context, my focus was not there; an experienced combinatorist would have to give their input on that front.
Define a recursive function $f:\Bbb Z\times\Bbb Z\to \mathbb Z$ by $$f(x,a) = \left\{\begin{align}&0, \quad &x < 0 \\ &1,\quad &x = 0 \\ &f(x-a,a),\quad &\text{otherwise}\end{align}\right.$$
What this formula returns is $1$ if $a$ is a multiple of $x$, and $0$ if not. Another way of looking at this, to put it in your context, is that it returns the "number of ways" of getting $x$ by just using $a$. Granted, this can only be $0$ or $1$, but in this view we can use the function as inspiration to get the result you want.
Now say we have a collection of integers $A =\{a_1,\dots,a_s\}$. A first approach might be to add up all the $f(x,a_i)$, but this would only give the result "how many ways can we get $x$ by using a single $a_i$ at a time". Thus, we need $f$ to "branch out" at each level of the recursion. This is achieved by a new function $F_A:\Bbb Z\to \mathbb Z$ defined as $$F_A(x) = \left\{\begin{align}&0, \quad &x < 0 \\ &1,\quad &x = 0 \\ &\sum_{i=1}^sF_A(x-a_i),\quad &\text{otherwise}\end{align}\right.$$
This gives the desired result. The proof is based on induction and is a bit heavy, but let's just see that it works for $x = 12$, $A =\{2,5\}$. I've dropped the $A$ subindex, same colors indicate which expression has been expanded, and I reassign color once to make further expansions clearer:
$$\require{cancel}\begin{align}F(12) &= \color{red}{F(10)} + \color{blue}{F(7)} \\ &=\color{red}{F(8) + F(5)}+ \color{blue}{F(5) + F(2)} \\ &= \color{green}{F(8)} + \color{purple}{F(5)} + \color{orange}{F(5)}+\color{fuchsia}{F(2)} \end{align} \\=\color{green}{F(3) + F(6)} + \color{purple}{F(0) + F(3)}+\color{orange}{F(0) + F(3)}+\color{fuchsia}{\cancel{F(-3)} + F(0)}$$
Obviously all the $F(3)$s won't reach exactly $0$, so I'll drop them now: $$\require{cancel}\begin{align}\dots&=\color{green}{F(4) + F(1)}+\color{purple}{1}+\color{orange}{1}+\color{fuchsia}{1} \\ &=\color{green}{\cancel{F(-1)}+F(2)}+\color{orange}{\cancel{F(-4)+F(-1)}} + 3 \\&=\color{green}{\cancel{F(-3)}+F(0)} + 3 \\ &= 1 + 3 = \fbox{4}\end{align}$$
This coincides with what we know already: $$\begin{align}12 &= 5+5+2 \\&= 2 + 2 + 2 + 2 + 2\end{align}$$
taking into account that our formula counts $5 + 5 + 2, 5+2+5,2+5+5$ as three different sums. To solve this, we modify the recursion to only count ordered sums (with this we have to add a second argument): $$\mathrm F_A(x,a_j) = \left\{\begin{align}&0, \quad &x < 0 \\ &1,\quad &x = 0 \\ &\sum_{\substack{i=1 \\ a_i\geq a_j}}^s\mathrm F_A(x-a_i,a_i),\quad &\text{otherwise}\end{align}\right.$$
The result we want is then simply $$\sum_{j=1}^s\mathrm F_A(x,a_j)$$ i.e. the above formula gives the number of ways to obtain $x$ by adding numbers in the set $A$. Check for yourself that this works with $12$ and $\{2,5\}$!
The formulas might be a bit obscured by the notation, I will admit. In any case the "algorithm" should be very intuitive: start with the total amount $x$, and subtract from it numbers in the collection in every possible way, and every time you reach $0$, add $1$ to the total count.
For related info, read up on the change-problem.
