MathsReadCompetitive mathematics
Pattern recognition · integer answereasy5 min

Matchstick railway

Geometric Patterns

A row contains 37 adjacent unit squares. Every unit side takes one matchstick and any side shared by neighbouring squares is counted only once. The squares form one straight row with no gaps. How many matchsticks are needed? One square uses 4, and two adjacent squares use 7. Submit one integer.

Learning goal: Model the linear growth of a row of joined squares.

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

Start with one square and add a second.

Hint 2

Each new square shares one existing side.

Hint 3

Use 4 sticks for the first square and 3 for each of the remaining 36.

Common mistake to avoid

Counting four new sticks per square and double-counting shared edges.

How to approach this problem

Count the first square in full and then count only newly added sides. Shared edges are already present.

Worked example with different values

Five adjacent squares need 4+4×3=16 matchsticks.

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 →