Maths

Finding the Remainder of \(9^{2018} \mod 7\) - Understanding Modular Patterns

When you first see an expression like

\[ 9^{2018} \mod 7, \]

it looks impossible to compute. The number \(9^{2018}\) is unimaginably large — far beyond what any calculator can display.

Fortunately, modular arithmetic has a wonderful property: even enormous powers often fall into small repeating cycles. Once you notice the pattern, the problem becomes surprisingly simple.

This post walks you through the reasoning step by step.