Question: Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was wondering how to calculate $\sum\_{Q=0}^{n\*k} Q\cdot f(Q)$.

I've checked several small cases, and it seems that $\sum\_{Q=0}^{n\*k} Q\cdot f(Q) = n(\sum\_{i=0}^{k}x\_i)^{n-1}(\sum\_{i=0}^{k}ix\_i)$, but I'm not sure how to prove that.

Answer: 
Wikipedia on [Bell polynomials](https://en.wikipedia.org/wiki/Bell_polynomials):

> 
> Likewise, the partial ordinary Bell polynomial, in contrast to the usual exponential Bell polynomial defined above, is given by $$\hat{B}\_{n,k}(x\_1,x\_2,\ldots,x\_{n-k+1})=\sum \frac{k!}{j\_1! j\_2! \cdots j\_{n-k+1}!} x\_1{}^{j\_1} x\_2{}^{j\_2} \cdots x\_{n-k+1}{}^{j\_{n-k+1}},$$
>  where the sum runs over all sequences $j\_1, j\_2, j\_3, \ldots, j\_{n−k+1}$ of non-negative integers such that $$
> j\_1 + j\_2 + \cdots + j\_{n-k+1} = k, \\
> j\_1 + 2j\_2 + \cdots + (n-k+1)j\_{n-k+1} = n.$$
> 
> 
> 

So your sum $$\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2n\_2+\ldots+kn\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$
is
$$\sum\_{n\_0=0}^n \binom{n}{n\_0} x\_{0}^{n\_0} \hat{B}\_{Q,n-n\_0}(x\_1, x\_2, \ldots, x\_k)$$

---

Using $${\hat {B}}\_{n,k}(x\_{1},x\_{2},\ldots ,x\_{n-k+1})={\frac {k!}{n!}}B\_{n,k}(1!\cdot x\_{1},2!\cdot x\_{2},\ldots ,(n-k+1)!\cdot x\_{n-k+1})$$ we have

$$\frac{n!}{Q!}\sum\_{n\_0=0}^n \frac{x\_{0}^{n\_0}}{n\_0!} B\_{Q,n-n\_0}(1!\cdot x\_1, 2!\cdot x\_2, \ldots, k!\cdot x\_k)$$

Then the recurrence relation $$B\_{n,k}=\sum\_{i=1}^{n-k+1} \binom{n-1}{i-1} x\_i B\_{n-i,k-1}$$

gives you an evaluation strategy.
I'm going to provide a secondary generating function which is probably more relevant to your updated question. Let's recall your definition,
$$
f(Q):=\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq0 \\\sum\_{j=0}^kjn\_j=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}
$$
and let us calculate $
G(X):=\sum\_{Q=0}^{nk} f(Q)X^Q
$. Before, we do that note that for any $p\geq 0$, $$\boxed{\sum\_{Q=0}^{nk} Q^pf(Q)=\left.\left(X\frac{d}{dX}\right)^p G(X)\right|\_{X=1}}$$ 

First of all, note that under the condition $\sum\_{j=0}^k n\_j = n$ and $n\_0, \cdots, n\_k\geq 0$, one has
$$
nk -\sum\_{j=0}^k jn\_j=
\sum\_{j=0}^k (k-j) n\_j\geq 0
$$
As a result, the equation $z-\sum\_{j=0}^k jn\_j=0$ has exactly one solution for $z$ in the integer range $0\leq z\leq nk$. Using this, we have
$$
\begin{aligned}
G(X)&=\sum\_{Q=0}^{nk} X^{Q}
\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq 0}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}
\delta\left(Q-\sum\_{j=0}^kjn\_j\right)
\\
&=
\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq 0}} \binom{n}{n\_0,\cdots,n\_k}\prod\_{m=0}^k (x\_mX^m)^{n\_m}=\left(\sum\_{m=0}^k x\_m X^m\right)^{n}
\end{aligned}
$$
So to summarize:
$$
\boxed{
G(X)=\sum\_{Q=0}^{nk} f(Q) X^Q = \left(\sum\_{m=0}^k x\_m X^m\right)^{n}
}
$$
This should make the rest obvious.