So I was looking at the Wikipedia of the binomial theorem when I read this:
Multi-binomial theorem
When working in more than two dimensions, it is often useful to deal with products of binomial expansions. By the binomial theorem this is equal to
$$(x_1+y_1)^{n_1}\cdots(x_d+y_d)^{n_d}=\sum_{k_1=0}^{n_1}\cdots\sum_{k_d=0}^{n_d}\binom{n_1}{k_1}x_1^{k_1}y_1^{n_1-k_1}\cdots\binom{n_d}{k_d}x_d^{k_d}y_d^{n_d-k_d}$$
Now say I wanted to write out $(a+b+c)^n$ in this way. Would I use this theorem to write it out as$$\sum_{r=0}^n\sum_{s=0}^r\dfrac{n!a^{n-r}b^{r-s}c^s}{s!(n-r)!(r-s)!}$$which would be gotten from$$(a+b+c)^n$$$$=(a+d)^n,d=b+c$$$$=\sum_{r=0}^n\binom nra^{n-r}d^r$$$$=\sum_{r=0}^n\binom nra^{n-r}(b+c)^r$$$$=\sum_{r=0}^n\binom nra^{n-r}\sum_{s=0}^r\binom rsb^{r-s}c^s$$$$=\sum_{r=0}^n\sum_{s=0}^r\dfrac{n!a^{n-r}b^{r-s}c^s}{s!(n-r)!(r-s)!}$$or how would I write out trinomial expansion?