MathsReadCompetitive mathematics
Pattern recognition · integer answermedium7 min

Three-color stripe cycle

Cyclic Patterns

A stripe pattern cycles red, blue, green, blue, and repeats. Red=1, blue=2, green=3. What is the color code of stripe 2026, where stripe 1 is red? Submit one integer.

Learning goal: Determine the period of the symmetric stripe pattern.

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

Although there are 3 colors, the period is 4.

Hint 2

The repeating block is R,B,G,B.

Hint 3

Use (2026-1) mod 4 to locate the code.

Common mistake to avoid

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

How to approach this problem

Assign each position of the repeat block its own index, even when two positions share a color. Use (position−1) modulo the block length.

Worked example with different values

For the block A,B,C,B, item 11 has zero-based remainder 2, so it is C.

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 →