MathsReadCompetitive mathematics
Pattern recognition · integer answermedium10 min

Staircase perimeter

Spatial Perimeter

An order-n staircase is made from left-aligned rows of 1,2,...,n unit squares (shown in reverse row order in the diagram). Only outer unit sides count toward its perimeter; shared interior sides do not. Order 1 has perimeter 4 and order 2 has perimeter 8. What is the perimeter of a staircase of order 20? Submit one integer.

Learning goal: Derive the exposed-edge perimeter of a growing staircase.

Look for the underlying structure rather than guessing the next number. Submit only the final integer; you can open hints below as needed.

Check your answer without signing in. Sign in to save your progress.

Accepted format: a whole number such as 42 or 123456789. No commas, formulas, or source code.

Hints

Hint 1

Sketch staircases of orders 1,2 and 3.

Hint 2

Each extra step changes the outside boundary by a fixed amount.

Hint 3

The perimeter of an order-n staircase is 4n.

Common mistake to avoid

Counting all square boundaries or confusing the number of squares with the perimeter.

How to approach this problem

Trace only the outer boundary in four directions. Alternatively start with four sides per square and subtract two for each shared side.

Worked example with different values

An order-3 staircase has six squares and six shared sides, so its perimeter is 24−12=12.

Apply the same reasoning to the challenge. This example is a separate practice problem.

Learn the technique: Sequence patterns: differences, recurrences and interleaving

Report a question or explanation issue

Sequence patterns · Repeating remainders

Back to problems →