# Blocks of Pyramid Pattern Expression [duplicate]

There is a pattern following, and trying to find the algebraic expression

Each layer (from the top).

Diagram.

So the first layer has 1, second has 4, third has 9, and the fourth has 16.

That's how the sequence is increasing.

What I'm looking for is,

When the second layer is added with the first layer,

Third layer is added with the second and first,

Fourth is added with third,second and first.

So something like this.

I am trying to find the algebraic expression for this pattern.

Any ideas??

Thank you

## marked as duplicate by Arthur, user147263, Ivo Terek, Joel Reyes Noche, Rick DeckerDec 18 '14 at 1:02

There is a well-known formula for the sum of the first $n$ squares, but I don't want spoil your investigation, so I will give you some hints.
Multiply all the terms by six, and factor the results. Notice that all of them are multiple of $n$ and $n+1$.