# Finding the Number of Ordered Triples $(x_1,x_2,x_3)$ such that $x_1 + 2x_2 + 3x_3 = n$

I would like to find the number of ordered triples $(x_1,x_2,x_3)$ such that $x_1 + 2x_2 + 3x_3 = n$. For each $n$ call this number $r(n)$. So after reading some similar questions on this site I'm pretty sure this is just some form of the partition function, and my book states explicitly that it is equivalent to asking for all partitions $x_1 + x_2 + x_3 = n$ where $x_1 \leq x_2 \leq x_3$, unfortunately I don't fully understand the wikipedia article on the partition function, so let's just leave that aside for now..

What I was first asked to do was show that $\sum_0^{\infty}r(n)z^n = \frac{1}{(1-z)(1-z^2)(1-z^3)}$. So I successfully did this using the Cauchy Product Formula, and then I was asked to find the partial fraction decomposition of this rational equation into a particular form, which I did:

$$-\frac{\frac{1}{6}}{(z-1)^3} + \frac{\frac{1}{4}}{(z-1)^2} - \frac{\frac{17}{72}}{z-1} + \frac{\frac{1}{8}}{z+1} - \frac{\frac{1}{9}e^{\frac{2\pi i}{3}}}{z-e^{\frac{2\pi i}{3}}} - \frac{\frac{1}{9}e^{\frac{-2\pi i}{3}}}{z-e^{\frac{-2\pi i}{3}}}$$

So now I'm asked to show that $r(n)$ is the integer nearest $\frac{(n+3)^2}{12}$.

My thinking was that I was supposed to use this decomposition and convert each fraction back to series form, combine them all, and then the coefficients of this series would be given by $\frac{(n+3)^2}{12}$. But I can't seem to simplify the series(plural) even close to that, can anyone take a look at this for me? Thanks.

-
Let me answer the part that you asked to leave aside, because it's rather straightforward. Pick $x_1, x_2, x_3$ such that $x_1 \leq x_2 \leq x_3$. Draw these as adjacent vertical bars. Now read your bars horizontally instead of vertically: you can see this as a number of stacked 3-bars, followed by some 2-bars, then some 1-bars. These numbers will be the coefficients in the equation $x_1 + 2x_2 + 3x_3 = n$. –  Théophile Jun 22 '12 at 1:18
@Théophile: Thanks, I'll check that out. –  Thoth Jun 22 '12 at 2:35

Life is more pleasant if you set up the partial fractions this way: $${1\over(1-z)(1-z^2)(1-z^3)}={1/6\over(1-z)^3}+{1/4\over(1-z)^2}+{1/4\over1-z^2}+{1/3\over1-z^3}$$ Can you take it from there?
I wish I could but for some reason I'm just not seeing it, maybe I'm doing the Cauchy Product wrong, here is what I'm getting: $\frac{1}{12}\sum (n+1)(n+2)z^n + \frac{1}{4}\sum (n+1)z^n + \frac{1}{4}\sum z^{2n} + \frac{1}{3}\sum z^{3n}$. Is this right? Is there some simplification I'm not seeing. –  Thoth Jun 22 '12 at 1:41
So far, so good. So the coefficient of $x^n$ is $(1/12)(n+1)(n+2)+(1/4)(n+1)$ plus something between 0 and $7/12$. Now see how this compares to the target, $(1/12)(n+3)^2$. –  Gerry Myerson Jun 22 '12 at 1:56