MathsReadCompetitive mathematics
Pattern recognition · integer answereasy6 min

Every third turns

Cyclic Patterns

A pointer begins facing north and rotates 90 degrees clockwise after every tick: N, E, S, W, N, ... . Represent N=1, E=2, S=3, W=4. What number describes its direction at tick 2027, counting the initial north direction as tick 1? Submit one integer.

Learning goal: Use the repeating period four.

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

Look for the length of the compass cycle.

Hint 2

Subtract 1 before taking the remainder.

Hint 3

Match position in the period to direction code.

Common mistake to avoid

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

How to approach this problem

Translate tick number into the number of rotations after the initial position. Reduce that number modulo four.

Worked example with different values

At tick 10, nine rotations have occurred; nine modulo four is one, so the direction is east.

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 →