Math puzzle guide

How to solve number pyramids and magic squares

The rules, a real puzzle from this page solved one step at a time, the shortcuts worth keeping beside the sheet, and which settings match which grade.

How to play number pyramids

  1. Each brick is the sum of the two bricks directly below it.
  2. If both bricks under a gap are filled in, add them.
  3. If the brick above a gap and the gap's neighbor are filled in, subtract: the gap is the brick above minus its neighbor.
  4. Every number you write opens up the bricks next to it, so look again after each one.
An easy number pyramid with its bottom row printed662
The puzzle. Easy prints the whole bottom row.
The same pyramid with every brick filled in20128662
The answer. 6 + 6 = 12, 6 + 2 = 8, and 12 + 8 = 20 on top.

Number pyramids are also called addition pyramids, math pyramids, sum pyramids and brick wall puzzles. They are the same puzzle.

How to solve a number pyramid, step by step

Here is a Medium pyramid from this page, with numbers up to 100. Medium prints fewer bricks, so some can only be found backwards. Each figure shows the sheet after one more brick, the new one in green.

  1. Step 1: 9 + 4 = 1320134094

    Step 19 + 4 = 13: the two bricks under it, added.

  2. Step 2: 20 − 13 = 7201374094

    Step 220 − 13 = 7: the brick above it, minus its neighbor.

  3. Step 3: 7 + 40 = 4720471374094

    Step 37 + 40 = 47: the two bricks under it, added.

  4. Step 4: 20 + 47 = 676720471374094

    Step 420 + 47 = 67: the two bricks under it, added.

  5. Step 5: 7 − 4 = 367204713740943

    Step 57 − 4 = 3: the brick above it, minus its neighbor.

  6. Step 6: 40 − 3 = 376720471374094337

    Step 640 − 3 = 37: the brick above it, minus its neighbor.

That is the whole method on Easy and Medium: find a brick with one gap next to it, add or subtract, and look again. Working backwards is the same fact as adding, read the other way, so the answer key is still just the sums.

When no brick has a single gap: the Hard step

A Hard pyramid always reaches a point where every sum on the sheet is missing two numbers. The way through is to give one missing brick a name. This Hard sheet gets one brick in (100 − 72 = 28) and then sticks.

A Hard pyramid where no brick has a single gap1007228446
Stuck. Every empty brick has another empty brick beside or under it.
The same pyramid with one brick called n and its neighbors written in terms of n1007228n + 44n + 644n6
Call it n. Write the bricks above it in terms of n until two of them hold up a brick you already know. Here that is the 72.

(n + 44) + (n + 6) = 722n + 50 = 722n = 22n = 11

The Hard pyramid finished1007228551711441165
Finished. With n = 11, every other brick has a single gap again.

Nobody needs the word algebra to do this, and on a Hard sheet nothing else works: the sheet is checked to be impossible without the letter. On a base of 3 the shortcut is direct. If the top and both bottom corners are printed, the middle brick is the top minus both corners, halved.

How to solve a magic square

  1. Every row, every column and both diagonals add up to the same total.
  2. If the total is not printed, find a line with every number filled in and add it up.
  3. Find a line with one gap. The gap is the total minus the other numbers in the line.
  4. Each number you write can leave another line with one gap.

This Medium square leaves the total off, so the first job is to find it. It also happens to be the classic one: the numbers 1 to 9 once each, totaling 15.

  1. Step 1: 2 + 9 + 4 = 15Total = 156294

    Step 12 + 9 + 4 = 15: a complete line, added up.

  2. Step 2: 15 − 6 − 2 = 7Total = 1567294

    Step 215 − 6 − 2 = 7: the total, minus the rest of its line.

  3. Step 3: 15 − 6 − 4 = 5Total = 15675294

    Step 315 − 6 − 4 = 5: the total, minus the rest of its line.

  4. Step 4: 15 − 7 − 5 = 3Total = 156753294

    Step 415 − 7 − 5 = 3: the total, minus the rest of its line.

  5. Step 5: 15 − 5 − 9 = 1Total = 1561753294

    Step 515 − 5 − 9 = 1: the total, minus the rest of its line.

  6. Step 6: 15 − 6 − 1 = 8Total = 15618753294

    Step 615 − 6 − 1 = 8: the total, minus the rest of its line.

There is only one way to place 1 to 9 in a magic square: all 8 arrangements are the same square turned or flipped, known as the Lo Shu. A sheet of them would be one puzzle eight times, so the builder uses other numbers, and every square on a sheet is different.

Shortcuts to keep beside the sheet

A pyramid's top brick is its bottom row added up with weights, and the weights are a row of Pascal's triangle. It is a quick way to check an answer, and on a Hard sheet it is another way in.

BaseTop brick, from the bottom row a, b, c…Smallest possible top
3 bricksa + 2b + c4
4 bricksa + 3b + 3c + d8
5 bricksa + 4b + 6c + 4d + e16
6 bricksa + 5b + 10c + 10d + 5e + f32

Magic squares have shortcuts too. Each one below holds for every square, which is what makes it safe to use:

SquareAlways true
3 × 3The middle number is always a third of the total.
3 × 3The total is always three times the middle, so it is always a multiple of 3.
3 × 3Any two numbers opposite each other across the middle add up to twice the middle.
3 × 3The largest and the smallest numbers always sit in the middle of a side, never in a corner.
4 × 4The four corners add up to the total.
4 × 4The four middle squares add up to the total.
4 × 4The middle two of the top row and the middle two of the bottom row add up to the total.
4 × 4The middle two of the left column and the middle two of the right column add up to the total.

Checked at build time against every 3 × 3 magic square with different numbers up to 30 (304 of them, found by brute force) and all 7,040 4 × 4 squares of 1 to 16. The builder's 4 × 4 squares are those, scaled and shifted, which keeps every one of these sums equal to the total.

Which math puzzle to print for each grade

Organized by the sum being practiced, with the Common Core standard that names it. The last column is measured on 12 sheets at the settings shown.

PracticingSettingsStandardWhat the sheet asks
Adding within 20Pyramids, base of 3, up to 20, Easy1.OA.C.6Every brick above the bottom row is two numbers added, and 25% of those sums cross a ten.
The missing number in 8 + ? = 11Pyramids, base of 4, up to 20, Medium1.OA.D.881% of the bricks are found by working backwards, which is that question in pyramid form.
Adding and subtracting within 100Pyramids, base of 4, up to 100, Medium2.NBT.B.5Six sums to a pyramid, and 40% of them carry.
Adding up to four two-digit numbersMagic squares, 3 × 3 or 4 × 4, up to 100, Easy2.NBT.B.6Every line is three numbers to one total, four on a 4 × 4, and 74% of the 3 × 3 lines carry.
Adding and subtracting within 1,000Pyramids, base of 5, up to 1,000, Medium2.NBT.B.7, 3.NBT.A.2Ten sums to a pyramid, and 63% of them carry.
Letters that stand for numbers, and two-step equationsPyramids, base of 3 or 4, up to 20 or 100, Hard6.EE.A.2, 7.EE.B.4a24 of the 24 Hard sheets measured end in an equation with 2n or more, like the 2n + 50 = 72 worked above.
  • Mixed abilities: keep the puzzle and the numbers and change only the level. Everyone practices sums of the same size, and Hard adds the n step for those who are ready.
  • Large print fits four small puzzles to a page, or two wide pyramids or 4 × 4 squares.
  • Answer keys come after the sheets, nine or twelve puzzles to a page, so they are easy to hold back.

Easy, Medium and Hard: what changes

Most worksheets grade difficulty by how many numbers they leave out. Here each level is named after the step a sheet cannot be finished without, and the generator checks that a Medium sheet cannot be finished by adding alone and a Hard sheet cannot be finished without the n step.

LevelNumber pyramidsMagic squaresNumbers printed
EasyAdd up. The whole bottom row is printed. Every other brick is two numbers added together.Work backwards. The total is printed and every gap is found from a line with one number missing.4 of 10 bricks · 3 of 9 squares
MediumWork backwards. Some bricks can only be found backwards, as the brick above minus its neighbor.Work backwards. No total is printed. Add up the one complete line to find it, then work as on Easy.4 of 10 bricks · 4 of 9 squares
HardCall it n. At some point no brick has a single gap. Call one missing brick n and follow it until a sum says what n is.Call it n. The total is printed, but no line can be finished on its own. Call one square n and follow it through the lines.4 of 10 bricks · 2 of 9 squares

Measured at build time on 12 sheets per level: pyramids with a base of 4 and 3 × 3 squares, both with numbers up to 100. Every Medium and Hard pyramid in the sample needed its level’s step.

Look at the pyramids: every level prints four of the ten bricks. What changes is which ones. With the whole bottom row printed, every gap is two numbers added. Print some bricks higher up instead, and the gaps below them have to be found backwards. Spread them so that no sum has a single gap, and only the n step gets in.

What "numbers up to" changes

The range is the arithmetic setting. It caps every number on the finished sheet, answers and totals included, so a sheet set to 20 never asks a child to write 21. What it changes most is how often a sum crosses a ten, which is where most mistakes in written adding happen.

Share of the sums on a finished sheet whose adding carries into the next column: pyramids up to 10, 14%; pyramids up to 20, 33%; pyramids up to 100, 53%; pyramids up to 1000, 69%; magic squares up to 20, 61%; magic squares up to 100, 86%; magic squares up to 1000, 94%.Pyramids, up to 1014%Pyramids, up to 2033%Pyramids, up to 10053%Pyramids, up to 1,00069%Squares, up to 2061%Squares, up to 10086%Squares, up to 1,00094%050100Sums that cross a ten, percent
Sums that cross a ten, by range. Measured on 12 Medium sheets per bar, pyramids with a base of 3 and 3 × 3 squares. At every range a square carries more often than a pyramid, because each line adds three numbers rather than two. Squares start at 20 because no magic square of different numbers has a total below 15.

Answer keys you can trust

  • One answer, proved. The solver only writes a number that follows from the ones already on the sheet, so reaching the end proves nothing else could go there.
  • From the rule on the sheet alone. Many magic square worksheets lean on an unwritten rule, such as "use 1 to 9 once each", and still leave two right answers: print three numbers of the 1-to-9 square and 32 of the 672 possible sheets (about 1 in 21) fit two squares, with one in the key. Squares here are solved from the printed sums only.
  • Every printed number is needed. The generator removes numbers for as long as the level's own steps still finish the sheet. Take any printed number away and it stops working.
  • The level is real. A sheet that turns out easier than its level is reworked, and the builder says so if one ever slips through.
  • No puzzle repeats in a pack while different ones are left. At the smallest settings they can run out, and the builder says how many repeated.

Free to print, and what this page does not do

Every sheet is made in your browser, and there is no account. More in how we make puzzle packs. The terms of use let teachers, tutors, clubs and families print and copy the sheets and their answer keys for a whole class.

  • Only adding and subtracting, and only whole numbers. There are no multiplication pyramids, decimals or negative numbers yet.
  • Each level makes different puzzles. There is no option yet to print one pyramid at all three levels, with the same answer, for a mixed group.
  • The 4 × 4 squares are the 7,040 arrangements of 1 to 16, scaled and shifted, so their numbers are always evenly spaced. A sharp-eyed solver can use that.
  • No cross-number or target-number puzzles. A target-number sheet usually has many right answers, and every sheet here is built around there being exactly one.