Summation Notation in Generalized Bernoulli Trials

So I'm reading through Robert Ash's *Basic Probability Theory* and I see the summation notation reproduced in the picture below.

https://lh3.googleusercontent.com/_6...%20%281%29.JPG

I'm not familiar with this sort of writing--are we summing first from $\displaystyle n_{1}$ to some assumed upper bound like $\displaystyle n$, then do it again from $\displaystyle n_{2}$ and so on?

If so then I'm have a hard time seeing how the first equality is supposed to be true. I would think the RHS would come out p_{1}^{n} + ...