[Math] Sigma Notation multiple sigma

calculusnotation

Sigma in sigma

I'm an engineer students, I want to now the runtime of loop inside loop, I get the calculation in sigma notation like the picture above.
Can somebody explain to me how sigma inside sigma can be like this? For example how (i^2-1) can be (i^4-i^2)
Sorry for bad English.

Best Answer

Note that $$\sum_{j=0}^{n}j=\sum_{j=1}^{n}j=\frac{n(n+1)}{2}.$$ Now setting $n=i^2-1$ gives you $$\sum_{j=0}^{i^2-1}j=\frac{(i^2-1)((i^2-1)+1)}{2}=\frac{(i^2-1)i^2}{2}=\frac{i^4-i^2}{2}.$$

Related Question