[Math] Intuition behind the formula for $\sum i^{2}$

intuitionsummation

I've been trying to figure out the intuition behind the closed formula:

$$\sum i^{2} = \frac{(n)(n+1)(2n+1)}{6}$$

This is not hard to prove via induction, so I'm not interested in the proof that this is true. Rather, I'm more interested in why somebody would even make this guess for an inductive step. What's so confusing to me is that $\sum i = \frac{(n)(n+1)}{2}$ makes sense using the Gaussian trick of taking the number line and folding it in half and realizing that $(1+n) = (2+(n-1)) = (3 +(n-2)) … $ so that you end up with this form.

But, what's the intuition for $i^{2}$? Looking at these two formulas, one realizes very quickly that

$$\sum i^{2} = \sum i * \frac{(2n+2)}{3}$$

But, why is that true intuitively? What's the intuition for this?

Best Answer

Since you asked for an intuitive explanation consider a simple case of $1^2+2^2+3^2+4^2$ using a set of children's blocks to build a pyramid-like structure.

First you arrange $16$ blocks in a $4\times4$ square. Next you place on top of this arrangement, $9$ blocks in a $3\times3$ square aligning the blocks of the upper left corner of each square, one above the other. On top of this construction place $4$ blocks in a $2\times2$ square, similarly aligned. Finally crown the upper left corner with a single block for the $1\times1$ square.

The following table represents the number of block in each column of the arrangement viewed from above:

$\begin{array}{cccc} 4&3&2&1\\ 3&3&2&1\\ 2&2&2&1\\ 1&1&1&1 \end{array}$

We can find the total number of blocks in the arrangement by adding the number of columns containing a single block to twice the number of columns containing two blocks then adding three times the number of columns containing three blocks and finally adding four times the one column containing four blocks.

\begin{eqnarray} \sum_{i=1}^4i^2=1\cdot(4+3)+2\cdot(3+2)+3\cdot(2+1)+4\cdot1 \end{eqnarray}

If we do the same thing with a pyramid of blocks having $n\times n$ blocks on its base then the summation would look like the following:

\begin{eqnarray} \sum_{i=1}^{n}i^2&=&1\cdot(n+n-1)+2\cdot(n-1+n-2)+3\cdot(n-2+n-3)\\ &+&\cdots+(n-1)\cdot(2+1)+n\cdot1\\ &=&1\cdot(2n-1)+2\cdot(2n-3)+3\cdot(2n-5)+\cdots+(n-1)\cdot3+n\cdot1\\ &=&\sum_{i=1}^{n}i(2n-2i+1)\\ &=&2n\sum_{i=1}^{n}i-2\sum_{i=1}^{n}i^2+\sum_{i=1}^{n}i\\ \sum_{i=1}^{n}i^2&=&(2n+1)\sum_{i=1}^{n}i-2\sum_{i=1}^{n}i^2\\ 3\sum_{i=1}^{n}i^2&=&(2n+1)\sum_{i=1}^{n}i\\ &=&\dfrac{n(n+1)(2n+1)}{2}\\ \sum_{i=1}^{n}i^2&=&\dfrac{n(n+1)(2n+1)}{6} \end{eqnarray}

Related Question