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 to some assumed upper bound like , then do it again from 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} + ...