Suppose I have this equation:

$\displaystyle P_{i+1} = P_{i} + W_{i} (\lambda_{i}-P_{i})$

But I have a list of things $\displaystyle i...n$ so that I need to loop through n times. How can I write a mathematical expression for $\displaystyle P_{n}$ that is based on the entire list, not just $\displaystyle n-1$?

Hope this makes some sense! Thanks in advance.