# Programmable Multinomial Expansion

1. Aug 14, 2009

### EngWiPy

Hello,

How can we write a programmable multinomial expansion? I mean the summation over all non-negative integer indices, is somewhat difficult to program in Mathematica, at least for me. Is there any suggestions, please?

I saw this formula at the Mathematica official website, but I didn't know how to interpret it:

$$\left(a_1+a_2+\cdots+a_m\right)^n=\sum_{n_1,n_2,\dots,n_m=0}\delta_{n;n_1+n_2+\cdots+n_m}\left(n;n_1,n_2,\ldots,n_m\right)\prod_{k=1}^ma_k^{n_k}$$

what does it mean $$n_1,n_2,\ldots,n_m=0$$? and what is the delta function $$\delta_{n;n_1+n_2+\cdots+n_m}\left(n;n_1,n_2,\ldots,n_m\right)$$??

Last edited: Aug 14, 2009
2. Aug 14, 2009

### mathman

$$n_1,n_2,\ldots,n_m=0$$ means start the sum with all ni=0.
$$\delta_{n;n_1+n_2+\cdots+n_m}\left(n;n_1,n_2,\ldots,n_m\right)$$ =1 when the sum of the ni=n and =0 otherwise.

Note: For some reason I get an s where there should be ... In the checking before I submit it is correct???

Last edited: Aug 14, 2009
3. Aug 16, 2009

### EngWiPy

well, after we start all the indices from 0? Can you elaborate more, because I have no clear idea how to program this expansion in Mathematica.

4. Aug 16, 2009

### mathman

I don't know anything about mathematica. Also (more important) the description you gave does not indicate what the upper limits of the summations for the m indices. In any case each ni goes from 0 to its upper limit.

5. Aug 16, 2009