Learn
Sequences where terms repeat cyclically according to arithmetic modulo a fixed number.
Modular arithmetic partitions the integers into residue classes modulo n: a ≡ b (mod n) means that n divides (a − b). A modular pattern is a sequence whose values cycle through a fixed set of residues as the index advances — for example, the units digit of n² cycles 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, ... with period 10. Cyclic repetition of any period is the tell-tale sign that the rule is modular.
a_n = f(n) mod m, with a_n eventually periodic with period dividing m
- n mod 3: 0, 1, 2, 0, 1, 2, 0, 1, 2, ...
- units digit of 2^n: 2, 4, 8, 6, 2, 4, 8, 6, ... (period 4)
- days of the week: cycle of length 7
How to recognize it
- Values repeat with a fixed period
- All values lie in a small finite set (0 to m−1 for some m)
- The rule involves remainders, cycles, or clock-style wrap-around
Common mistakes
- Confusing period length with modulus (they can differ)
- Assuming the cycle starts at index 0 when there is a transient prefix
- Using m = 0 or a negative modulus (both undefined here)