# Partial sum of n^2

1. Nov 7, 2006

### KingNothing

Is there a nice formula for calculating the partial sum of the series n^2 from 1 to k?

2. Nov 7, 2006

### quasar987

k(k+1)(2k+1)/6

3. Nov 7, 2006

### StatusX

You can derive that as follows:

$$k^3=\sum_{n=1}^k (n^3-(n-1)^3)=\sum_{n=1}^k (n^3-(n^3-3n^3+3n-1))=3\sum_{n=1}^k n^2-3\sum_{n=1}^k n+\sum_{n=1}^k 1=3\sum_{n=1}^k n^2-3k(k+1)/2+k$$

$$\sum_{n=1}^k n^2=\frac{1}{3} (k^3+3k(k+1)/2-k)=\frac{1}{3}(k(k+1)(k-1)+3k(k+1)/2))=k(k+1)(k+1/2)/3=k(k+1)(2k+1)/6$$

Last edited: Nov 7, 2006