Finding the Generating Function for $\sum_{n_1 +n_2 + \ldots + n_k = n} n_1 n_2 \cdot \ldots \cdot n_k$ I'm studying problem 2.6 (p. 65) in Herbert Wilf's generatingfunctionology (released by the author for free online).  This problem actually has a solution already written in the back of the book (p. 203) which I'm trying to understand.
Problem: For $k, n \in \mathbb{N}$, let $f(n,k)$ be defined as follows:
$$
\sum_{n_1 +n_2 + \ldots + n_k = n} n_1 n_2 \cdot \ldots \cdot n_k
$$
Find the following: 

(i) the ordinary power series generating function of $f$ (i.e., the
  $opsgf$ of $f$)
(ii) a simple formula for it

Book Solution:
$$
\sum_{n_1 +n_2 + \ldots + n_k = n} n_1 n_2 \cdot \ldots \cdot n_k \\
= [x^n] \left(\sum_r rx^r \right)^k \\
= [x^n] \left \{ \frac{x}{(1-x)^2} \right \}^3 \\
= [x^n] \frac{x^k}{(1-x)^{2k}} \\
$$
Hence $\sum_n f(n,k) x^n = \frac{x^k}{(1-x)^{2k}}$.  Explicitly, since
$$
\frac{1}{(1-x)^{2k}} = \sum_{r \ge 0} {r + 2k - 1 \choose r} x^r,
$$
we find that $f(n,k) = {n+k-1 \choose n-k}$.
Question: I'm at a loss why the first jump in the equality above holds.  In particular, why do we start with
$$
\sum_{n_1 +n_2 + \ldots + n_k = n} n_1 n_2 \cdot \ldots \cdot n_k \\
= [x^n] \left(\sum_r rx^r \right)^k
$$
as above? I think I understand this is saying that $f(n,k)$  is the $nth$ term of the power series expansion of $\left(\sum_r rx^r\right)^k$.  Why are we raising $\sum_r rx^r$ to the $k$th power?  What fundamentally is going on here?
 A: For the first step 
Every $n_i$ can have a value  $1,2,..$ so the generating function for this $n_i$ is $\sum_r rx^r$. So look at 
$$
(\sum_r rx^r)^k
$$If you look to the coefficient of $x^n$ then you have $n_1+...+n_k=n$ because of the exponents and as coefficients it has $$
\sum_{n_1+...n_k=n}n_1\cdot...\cdot n_k
$$
I hope this makes it understandable.
A: $$\begin{array}{ll} \sum_{n\ge0}\left(\sum_{n_1+\cdots+n_k=n}n_1\cdots n_k\right) x^n & =\sum_{n\ge0}\sum_{n_1+\cdots+n_k=n} (n_1 x^{n_1})\cdots(n_k x^{n_k}) \\
& =\sum_{n_1\ge0}\cdots\sum_{n_k\ge0}(n_1x^{n_1})\cdots(n_k x^{n_k}) \\ 
& = \left(\sum_{n_1\ge0}n_1x^{n_1}\right)\cdots\left(\sum_{n_k\ge0}n_kx^{n_k}\right)\end{array}. $$
A: One more method you can look at this is, we know $$\frac{1}{1-x}=\sum_{x=0}^\infty x^n$$ So applying operator $xD$ where D is derivative w.r.t x on it, we have $$ \frac{x}{(1-x)^2} = \sum_{x=0}^{\infty} n x^n$$
Now if raise both side to k, then we have 
$$ \frac{x^k}{(1-x)^{2k}}= \sum_{n_1+n_2+\ldots+n_k=n}n_1n_2\ldots n_k$$
This is the generating function that was needed
