Mathwords logoMathwords

Pyramidal Number — Definition, Formula & Examples

A pyramidal number is a figurate number that represents the total count of objects arranged in a pyramid with a polygonal base, where each layer is a smaller polygon stacked on top of the previous one.

The kkth square pyramidal number is defined as the sum of the first kk perfect squares: Pk=i=1ki2P_k = \sum_{i=1}^{k} i^2. More generally, pyramidal numbers arise from summing successive polygonal numbers of a given type, producing a three-dimensional figurate number.

Key Formula

Pk=k(k+1)(2k+1)6P_k = \frac{k(k+1)(2k+1)}{6}
Where:
  • PkP_k = The kth square pyramidal number
  • kk = The number of layers in the pyramid (a positive integer)

How It Works

To find a pyramidal number, you stack layers of polygonal numbers. For a square pyramid, the bottom layer has k2k^2 objects, the next has (k1)2(k-1)^2, and so on up to 121^2 at the top. You sum all the layers to get the total. The closed-form formula lets you skip the summation and compute the result directly.

Worked Example

Problem: Find the 5th square pyramidal number.
Step 1: Write out the sum of the first 5 perfect squares.
P5=12+22+32+42+52=1+4+9+16+25P_5 = 1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 1 + 4 + 9 + 16 + 25
Step 2: Alternatively, apply the closed-form formula with k = 5.
P5=56116=3306=55P_5 = \frac{5 \cdot 6 \cdot 11}{6} = \frac{330}{6} = 55
Answer: The 5th square pyramidal number is 55.

Visualization

Why It Matters

Pyramidal numbers appear in combinatorics—for instance, Pk=(k+23)+(k+13)P_k = \binom{k+2}{3} + \binom{k+1}{3} connects them to binomial coefficients. They also show up in physics when counting stacked objects (like cannonballs) and in computer science when analyzing nested loop iterations.

Common Mistakes

Mistake: Confusing square pyramidal numbers with tetrahedral numbers.
Correction: Tetrahedral numbers sum triangular numbers (1,3,6,10,1, 3, 6, 10, \ldots), while square pyramidal numbers sum perfect squares (1,4,9,16,1, 4, 9, 16, \ldots). The formulas differ: tetrahedral uses k(k+1)(k+2)6\frac{k(k+1)(k+2)}{6}, square pyramidal uses k(k+1)(2k+1)6\frac{k(k+1)(2k+1)}{6}.