# Explain how $\sum_{k = 1}^n\frac{k^2}{2^{k - 1}} = \sum_{k = 0}^{n - 1}\frac{\left(k + 1\right)^2}{2^k}$?

Can someone explain simply why $$\displaystyle\sum_{k = 1}^n\dfrac{k^2}{2^{k - 1}} = \displaystyle\sum_{k = 0}^{n - 1}\dfrac{\left(k + 1\right)^2}{2^k}$$? I don't get why we go from $$k$$ to $$k+1$$ in the numerator, please help me understand it.

It looks like you are asking why $$\sum_{k=1}^n \frac{k^2}{2^{k-1}}=\sum_{k=0}^{n-1} \frac{(k+1)^2}{2^k}.$$ This is a change of summation index. We have $$1\le k \le n$$, so $$0\le k-1 \le n-1$$. Now let $$j=k-1$$, so $$0\le j \le n-1$$, and $$\sum_{k=1}^n \frac{k^2}{2^{k-1}}=\sum_{k-1=0}^{n-1} \frac{(k-1+1)^2}{2^{k-1}}=\sum_{j=0}^{n-1} \frac{(j+1)^2}{2^j}.$$ Now just change $$j$$ to $$k$$ to obtain $$\sum_{k=0}^{n-1} \frac{(k+1)^2}{2^k}.$$