The sum of the squares of the first n natural numbers

What is the sum of the squares of the first n natural numbers?

The answer is:

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

Here is a calculator that calculates this function for you:

n:

$ 1^2+2^2+...+n^2 $:

Proof:

$ (k+1)^3=k^3+3k^2+3k+1 $

We write the above identity for k from 1 to n:

$ 2^3=1^3+3\cdot 1^2+3\cdot 1+1 $
$ 3^3=2^3+3\cdot 2^2+3\cdot 2+1 $
$ 4^3=3^3+3\cdot 3^2+3\cdot 3+1 $
$ 5^3=4^3+3\cdot 4^2+3\cdot 4+1 $
...
$ (n+1)^3=n^3+3\cdot n^2+3\cdot n+1 $

We add this n identities and we get:

$$(n+1)^3=1^3+3\sum_{k=1}^{n} k^2+3\sum_{k=1}^{n} k+\sum_{k=1}^{n}1$$
$$n^3+3n^2+3n+1=1+3\sum_{k=1}^{n} k^2+3\frac{n(n+1)}{2}+n$$
$$n^3+3n^2+3n=3\sum_{k=1}^{n} k^2+3\frac{n(n+1)}{2}+n$$
$$n^3+3n^2+2n - 3\frac{n(n+1)}{2}=3\sum_{k=1}^{n} k^2$$
$$n(n^2+3n+2) - 3\frac{n(n+1)}{2}=3\sum_{k=1}^{n} k^2$$
$$n(n+1)(n+2) - 3\frac{n(n+1)}{2}=3\sum_{k=1}^{n} k^2$$
$$n(n+1)(n+2-\frac{3}{2})=3\sum_{k=1}^{n} k^2$$
$$n(n+1)(n+2-\frac{3}{2})=3\sum_{k=1}^{n} k^2$$
$$n(n+1)(\frac{2n+1}{2})=3\sum_{k=1}^{n} k^2$$
$$\frac{n(n+1)(2n+1)}{6}=\sum_{k=1}^{n} k^2$$
Average: 4.2 (434 votes)

Back to top