Possible Duplicate:
How do I come up with a function to count a pyramid of apples?
Proof that $\sum\limits_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$?
Finite Sum of Power?

I know that the sum of the squares of the first n natural numbers is $\frac{n(n + 1)(2n + 1)}{6}$. I know how to prove it inductively. But how, presuming I have no idea about this formula, should I determine it? The sequence $a(n)=1^2+2^2+...+n^2$ is neither geometric nor arithmetic. The difference between the consecutive terms is 4, 9, 16 and so on, which doesn't help. Could someone please help me and explain how should I get to the well known formula assuming I didn't know it and was on some desert island?

  • 3
    $\begingroup$ The first chapter of Concrete Mathematics by Graham, Knuth, and Patashnik presents about seven different techniques for deriving this identity, so you might be interested to look at that. $\endgroup$
    – MJD
    Aug 16 '12 at 18:19
  • 1
    $\begingroup$ Coincidentally, I uploaded a web page recently regarding this topic. There I don't prove the formula (or even present it), but I provide the student a geometric strategy for finding it. mathuprising.comlu.com/sumofsquares $\endgroup$
    – John Joy
    Aug 19 '14 at 16:18
  • 1
    $\begingroup$ You can find a formal approach for even higher powers here as well as a nice geometric approach here. $\endgroup$ Mar 10 '16 at 12:08
  • $\begingroup$ Khan Academy videos youtu.be/i7iKLZQ-vCk and youtu.be/MkGXR8umLco $\endgroup$ Jul 19 '21 at 15:17

This is proven, for example, in Stewart's Calculus:

Consider the following sum: $$\sum_{i=1}^n((1+i)^3-i^3).$$

First, looking at it as a telescoping sum, you will get $$\sum_{i=1}^n((1+i)^3-i^3)=(1+n)^3-1.$$

On the other hand, you also have $$\sum_{i=1}^n((1+i)^3-i^3)=\sum_{i=1}^n(3i^2+3i+1)=3\sum_{i=1}^ni^2+3\sum_{i=1}^ni+n.$$

Using these two expressions, and the fact that $\sum_{i=1}^ni=\frac{n(n+1)}{2}$, you can now solve for $\sum_{i=1}^ni^2$.

  • 4
    $\begingroup$ Shouldn't it be $3\sum_{i=1}^ni^2+3\sum_{i=1}^ni+\sum_{i=1}^n1$ instead of $3\sum_{i=1}^ni^2+3\sum_{i=1}^ni+1$? $\endgroup$ Oct 15 '14 at 11:54

You could start out by guessing that the formula you are looking for is a cubic, which means it can be written as $an^3+bn^2+cn+d$.

You might guess this either by analogy with the sum of first powers being a square or by analogy with integration. Then you can calculate the first four terms and solve for $a, b, c, d$. Another way is to observe that $a(n + 1)^3 + b(n + 1)^2 + c(n + 1) + d - (an^3 + bn^2 + cn + d) = (n + 1)^2$ and equate like powers of $n$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.