Chaitanya's Random Pages

March 14, 2012

The sum of consecutive squares formula

Filed under: mathematics — ckrao @ 10:26 pm

This post shows two ways of seeing why the following sum of consecutive squares is true.

\displaystyle 1^2 + 2^2 + 3^2 + \ldots + n^2 = \frac{n(n+1)(2n+1)}{6}

The first way involves writing the numbers 1 to n in an equilateral triangle, where the nth row consists of n ns.  The sum of the numbers in such a triangle is 1.1 + 2.2 + \ldots + n.n which is what we wish to find.

We then consider the same triangle rotated by 120, then 240 degrees. This gives us three triangles, illustrated here in the case n = 4.

 

Something magical happens when we add the corresponding entries of each triangle – we get the same number (2n+1) everywhere!

The reason for this is that when one goes from an entry to an adjacent one (either left-right or diagonally), in one triangle the number increases by 1, in another it decreases by 1 and in the third it remains the same. Overall the sum of the three corresponding entries in each triangle is unaltered. This can be made rigorous by using coordinates (an exercise for the interested reader!).

Hence three times the sum of the numbers in each original triangle is (2n+1) times the number of entries in the triangle: 1 + 2 + \ldots + n.

In other words,

\displaystyle 1^2 + 2^2 + \ldots + n^2 = (2n+1)(1 + 2 + \ldots + n) = \frac{n(n+1)(2n+1)}{6},

as desired.

 

The second way of seeing why the sum is true (that can be made into a rigorous proof) is to show that 6 times the sum is n(n+1)(2n+1). We consider six pyramids where the nth level (counting from the top) consists of an n\times n array of unit cubes. This is photographed here (while I visited this awesome place in Dresden, Germany) in the case n=3.

 

These pyramids can then be joined together to form a rectangular box of dimension n \times (n+1) \times (2n+1) as required.

Layer by layer, this appears as follows, where each pyramid is shown in a different colour.

To show that this was no fluke, here is the corresponding illustration of the 4x4x4 case, which should demonstrate how the above can be generalised.

 

 

About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: