Here's a proof of the identity
Think of it as stacking squares on top of each other to make a staircase/pyramid. Here's what the cross section looks like:
Each layer is a horizontal cross section of that staircase. Our goal is to find a formula to sum up all of the balls.
In our case of , we can sum it up like this:
There are seven balls on the "first step" of our first layer. Here's what I mean:
That's (1) times (7) = 7 balls
Now, for the "second step" in our staircase, we have to take into consideration the balls from the base layer and the layer above that.
Now that's (2) times (5) = 10 balls
For the third step, we have to take into consideration the balls from the first, second and third layer.
That's (3) times (3)
The full sum looks like this:
If you plug in 4 to the formula, it agrees with this sum, which is .
For the first term, it's
For the second term, it's
For the th term, it's
Play around with it and plug some numbers in, and you will see that this is the case.
This agrees with the theorem that the sum of consecutive odd numbers is a perfect square. Here's a diagram to refresh your memory:
which can be represented as
We know that