Series expansion of infinite series raised to the $n$th power So I know there is a well-known straightforward way to expand something like
$$(a+b)^n$$
and that there are formulas which allow us to expand trinomials and multinomials in general. My question is,

Is there any known way to expand something like $$\left[\sum_{k=0}^{\infty} a_k\right]^n$$ or at least to determine the first few terms?


Here is my attempt at a solution, Let $f(x) = \sum_{k=0}^{\infty}a_k x^k$, then we have that
\begin{align*}
f(x)^n &= \left( \sum_{k=0}^{\infty}a_k x^k \right)^n \\
       &= \sum_{k=0}^{\infty} \left(\sum_{\substack{0 \leq r_1,\ldots,r_n \leq k \\ r_1 + \cdots + r_n = k}}a_{r_1} \cdots a_{r_n}\right) x^k \\
\end{align*}
Now for any specific choice of $r_1,\ldots,r_n$ satisfying the condition
$$0 \leq r_1,\ldots, r_n \leq k,\quad r_1 + \cdots + r_n = k$$
there are, say, $m \leq n$ many distinct elements in the set $S = \{r_1,\cdots,r_n\}$, call these distinct elements
$$s_1,\ldots,s_m$$
and define
$$N(s_i) = \# \text{ of times $s_i$ appears in $(r_1,\ldots,r_n)$}$$
then we see that the number of times
$$a_{r_1}\cdots a_{r_n}$$
is counted is equal to
$$C(r_1,\ldots,r_n) := \frac{n!}{N(s_1)! \cdots N(s_m)!} \quad \text{(The multinomial coefficient)}.$$
Thus we have
$$f(x)^n = \sum_{k = 0}^{\infty} \left( \sum_{\substack{0 \leq r_1 \leq\ldots \leq r_n \leq k \\ r_1 + \cdots + r_n = k}}C(r_1,\ldots,r_n)a_{r_1} \cdots a_{r_n} \right) x^k$$
Notice that now the inner sum is over a smaller set and hence (in theory) makes the calculation easier.
