MathsReadCompetitive mathematics
Pattern recognition · integer answermedium9 min

Matchsticks in adjacent cubes

3d Visual Patterns

One cube frame has 12 matchstick edges. Each new cube is joined to the previous one along a complete square face, sharing 4 of its edges; no other edges overlap. How many distinct matchsticks are needed for 18 cubes in a straight row? Submit one integer.

Learning goal: Subtract the four shared edges each time.

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

A first isolated cube needs 12 edges.

Hint 2

Every additional cube needs 12-4 new edges.

Hint 3

Use 12+(n-1)*8.

Common mistake to avoid

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

How to approach this problem

A new cube shares an entire face with the preceding cube. Subtract those four already-present edges from the twelve edges of the new cube.

Worked example with different values

Four joined cubes require 12+3×8=36 distinct edges.

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 →