MathsReadCompetitive mathematics
Pattern recognition · integer answereasy6 min

Square border tiles

Visual Patterns

Frames of thickness one tile are built around filled square grids. A 3 by 3 grid has 8 border tiles; a 4 by 4 grid has 12. How many border tiles are on a 27 by 27 grid? Submit one integer.

Learning goal: Count boundary cells of an n by n square.

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

Count the four edges separately.

Hint 2

Four corners would otherwise be counted twice.

Hint 3

An n by n frame contains 4n-4 border tiles.

Common mistake to avoid

Assuming the first visible step stays constant without testing the full pattern.

How to approach this problem

Count the outer square and subtract the inner square with two fewer tiles per side. This avoids counting corner tiles twice.

Worked example with different values

An 8×8 frame contains 64−36=28 border tiles.

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 →