<s>[INST] Number of Ways of Writing $n$ as Sum I have a general question about numbers:

How many ways can we write $n$ as the sum of the numbers $1$,$2$ and $3$?

I know that we start with the following functions: $$\frac{1}{1-z} = 1+z+z^2+ \dots$$ $$\frac{1}{1-z^2} = 1+z^2+ z^4+ z^6 + \dots$$ $$\frac{1}{1-z^3} = 1+ z^3+ z^{6}+ z^{9} + \dots$$ 
Multiplying these together we get $$\sum C(n) z^n = \frac{1}{(1-z)(1-z^2)(1-z^3)}$$ where $C(n)$ is our answer. In other words, by multiplying out the polynomials and looking at the coefficients, I can verify that I get the answer. But how do I know that this gives me the answer? How would I get an explicit formula for $C(n)$? I think I have to do something with partial fractions. So $$\frac{1}{(1-z)(1-z^2)(1-z^3)} = \frac{A}{1-z} + \frac{B}{1-z^2}+ \frac{C}{1-z^3}$$ and we have to solve for $A$, $B$ and $C$? 
 [/INST] Since I have it worked out, and it hasn't been posted, here is the explicit decomposition of the partial fractions.  We have
$$\frac{1}{(1-z)(1-z^{2})(1-z^{3})}$$ $$=\frac{z+2}{9\left(z^{2}+z+1\right)}-\frac{17}{72}\frac{1}{\left(z-1\right)}+\frac{1}{8(z+1)}+\frac{1}{4(z-1)^{2}}-\frac{1}{6(z-1)^{3}}.$$
Personally, I don't know the generating series for $\frac{1}{z^{2}+z+1}$, but I do know it for $\frac{1}{\omega-z}$ and $\frac{1}{\overline{\omega}-z}$, so lets go one step further.  We can derive
$$\frac{z+2}{9\left(z^{2}+z+1\right)}=\frac{1}{9}\left(\frac{\omega}{\omega-z}+\frac{\overline{\omega}}{\overline{\omega}-z}\right).$$
Since we know the expansion 
$$\frac{1}{\left(a-z\right)^{k+1}}=\frac{1}{a^{k+1}\left(1-\frac{z}{a}\right)^{k+1}}=\frac{1}{a^{k+1}}\sum_{n=0}^{\infty}\tbinom{n+k}{k}\frac{z^{n}}{a^{n}},$$
we can sum all of these to get the explicit formula for $C_{n}$.
Hope that helps,
</s>