Determining Degeneracies of Operator (Quantum Mechanics / Linear Algebra) 
Hello all! Above is my question. I am fine all the way up to the final part about the degeneracy. I find counting degeneracies quite difficult, and this is no exception! I have really no idea why the trace is as that power series, and don't know why the degeneracies are as given.
By the standard power series / binomial expansion, I get
$$ d_n = {(-1)^n \over n!} \prod_{m=0}^{n-1}(-D-m) = {1 \over n!} \prod_{m=0}^{n-1}(D+m).$$
(Empty sum is identity, as usual.) I can't work out why this is the degeneracy (I know it is related to $n \choose r$, but not sure how to use that...). I can't see any reason why this should be the coefficients in the power series expansion.
Also, while I'm on the topic of degeneracies, how can I show that the degeneracy of the $n-$th excited state of the 3D harmonic oscillator ($E_{n_1,n_2,n_3} = \hbar \omega (n_1 + n_2 + n_3 + 3/2))$ is $(n+1)(n+2)/2$ (which I know is equal to $\sum_{r=0}^{n+1}r$). I guess it's just the number of ways that three (positive) integers can add up to $n$, but I don't know how to prove that.
Thank you in advance for your help!

(Please note: I'm going away shortly, so if I don't respond to your answer, then I'm not ignoring it, I simply haven't seen it yet; once I see any responses, I shall reply asap! Thanks!)

(Oh, and please no-one try to move this to physics.SE - this is a maths questions; I am not asking what the physical significance of this is, just the maths behind it - it's linear algebra really! Sorry to be blunt, but I had someone move one over incorrectly before - rather annoying! Thanks!)
 A: When you have $D$ oscillators the state will be $| n\rangle = | n_1, n_2, \cdots, n_D\rangle$ and the trace you want:
$$
Tr(x^{\mathcal{N}}) = \sum_{n} \langle n|x^{\mathcal{N}}|n\rangle = \sum_{n_1, \cdots, n_D =0}^{\infty} \langle n_1, \cdots, n_D|x^{\mathcal{N}}| n_1,\cdots, n_D \rangle
$$
The second sum is actually (all number operators commute with each other)
$$
\sum_{n_1, \cdots, n_D = 0}^{\infty} x^{n_1 + \cdots +n_D } = \sum_{n_1 =0}^{\infty}x^{n_1} \sum_{n_2=0}^{\infty}x^{n_2} \cdots \sum_{n_D =0}^{\infty}x^{n_D} = (1-x)^{-D}
$$
In the last step one uses the result derived in (a). 
The degeneracy of the operator $\mathcal{N}$ is the amount of all such partitions of the integer $n$ into the sum $n_1 +n_2 + \cdots + n_D$, this is a standard combinatioral problem (solved usually by introducing "separations"), the answer is 
$$
d_n = \binom{n+D-1}{n}
$$
One can see this number is exactly the coefficent in the trace expansion by noting that the one can recast the sum into the form
$$
\sum_{n_1, \cdots, n_D = 0}^{\infty} x^{n_1 + \cdots +n_D } = \sum_{n=0}^{\infty} \sum_{n_1 + \cdots + n_D =n}x^{n} = \sum_{n=0}^{\infty} d_n x^n
$$
(all we have done is classify the terms of the sum according to their powers)
Your approach seems to make use of the generating function for $d_n$, which should also work.
For the 3D harmonic oscillator you have $D=3$ so you get
$$ 
d_3 = \binom{n+3-1}{n} = \binom{n+2}{n} = \frac{(n+1)(n+2)}{2}
$$
