How this instrument works
A stepped pyramid built from unit blocks, with a square base n blocks on a side, is built in layers: the top layer is a single 1x1 block, the next layer down is a 2x2 square of 4 blocks, the one below that a 3x3 square of 9 blocks, and so on down to the n x n base layer. The total block count is the sum of every layer's square: 1^2 + 2^2 + 3^2 + ... + n^2, a sequence with a well-known closed-form shortcut instead of adding every term by hand.
That shortcut is n(n+1)(2n+1)/6, one of the classic sum-of-squares identities in mathematics, giving the exact total in one calculation regardless of how many layers the pyramid has. It shows up well beyond block-stacking puzzles — the same sum of squares appears in statistics, physics and combinatorics anywhere a running total of squared integers needs a closed form instead of a loop.
This is a genuine building-block puzzle as much as it is a formula: model pyramid kits, physical block-stacking games, and 'how many spheres in this stack' style puzzles all reduce to exactly this sum. Knowing the total in advance means you can check you have enough pieces, or verify a partially built pyramid against the count it should reach once finished.
- Enter Base length (blocks per side) — how many blocks sit along one edge of the bottom layer.
- Read Total blocks needed — the sum of every layer's blocks, from the single block at the top down to the full base.
- Each layer below the top uses one more block per side than the layer above it, and holds that side length squared in blocks.
- Compare totals for different base sizes to see how quickly the block count grows — it accelerates faster than the base length itself.
Worked example — a 5-block-wide base
Enter 5 for Base length — a pyramid five blocks wide at the base. Its five layers hold 1, 4, 9, 16 and 25 blocks respectively, from the top down: 1^2, 2^2, 3^2, 4^2 and 5^2.
Adding those five layers by hand, 1 + 4 + 9 + 16 + 25 = 55, matching the closed-form result: (5 x 6 x 11) / 6 = 330 / 6 = 55. Total blocks needed reads 55, the exact number of unit blocks this five-wide stepped pyramid requires from apex to base.
Questions
How many blocks are in a 5-wide stepped pyramid?
55 blocks total. Each of the five layers holds a perfect square number of blocks — 1, 4, 9, 16 and 25 from top to bottom — and 1 + 4 + 9 + 16 + 25 = 55, which also matches the closed-form formula n(n+1)(2n+1)/6 = (5 x 6 x 11)/6 = 55.
What is the formula for total blocks in a square stepped pyramid?
n(n+1)(2n+1)/6, where n is the number of blocks along one side of the base. This is the classic sum-of-squares identity, giving the total of 1^2 + 2^2 + ... + n^2 in a single calculation instead of adding every layer by hand.
Why does each layer hold a square number of blocks?
Because each layer of a square stepped pyramid is itself a square, k blocks on a side for the k-th layer down from the apex, and a k-by-k square grid contains k^2 blocks. Stacking every layer from k=1 at the top to k=n at the base is exactly the sum of the first n square numbers.
How quickly does the block count grow as the base gets wider?
Much faster than the base length itself, because the formula is roughly proportional to the cube of n. Doubling the base length from 5 to 10 blocks doesn't double the total — it multiplies it by about seven, from 55 blocks up to 385 blocks, since bigger pyramids add proportionally bigger layers at every step.
Is this the same as the sum of the first n square numbers?
Yes exactly — the total block count in an n-wide square stepped pyramid is, by construction, the sum 1^2 + 2^2 + 3^2 + ... + n^2, better known in mathematics as the n-th square pyramidal number, with n(n+1)(2n+1)/6 as its standard closed-form expression.