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: 
You can calculate the generating function instead. Define
$$
\begin{aligned}
F(X,Y)&=
\sum\_{n=0}^\infty X^n\sum\_{Q=0}^\infty Y^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}} \frac{1}{n\_0!n\_1!\cdots n\_k!}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}\\
&=\sum\_{n=0}^\infty X^n\sum\_{Q=0}^\infty Y^Q
\sum\_{n\_0, \cdots, n\_k\geq 0} \frac{1}{n\_0!n\_1!\cdots n\_k!}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}
\delta\left(n-\sum\_{j=0}^k n\_j\right)
\delta\left(Q-\sum\_{j=0}^k jn\_j\right)\\
&=
\sum\_{n\_0, \cdots, n\_k\geq 0} 
\frac{1}{n\_0!n\_1!\cdots n\_k!}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k} X^{\sum\_j n\_j} Y^{\sum\_j jn\_j}\\
&=\prod\_{m=0}^k \exp(x\_m XY^m)
\end{aligned}
$$
where by $\delta(Z)$ I mean the Kronecker delta equating $Z=0$. What you are looking for the $n!$ times the coefficient of $X^nY^Q$ in the expansion of $F(X,Y)$ (in other words, $(Q!)^{-1}\partial\_X^n \partial\_Y^Q F\mid\_{X=Y=0}$).
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.