Chapter

Multiplicative Order

This module teaches power cycles, modular order, restrictions on prime divisors, and Fermat-type numbers.
Log in to track solved progress and bookmarks.

Theory

Key Idea

The order of \(a\) modulo \(m\) is the length of the power cycle \(a,a^2,a^3,\ldots\) until \(1\) first appears. If \( \gcd(a,m)=1 \), order turns huge powers into small residues and gives restrictions on prime divisors.

Basic Facts

If \(d=\operatorname{ord}_m(a)\), then \(a^k\equiv1\pmod m\) if and only if \(d\mid k\). For a prime \(p\), the order of every nonzero residue modulo \(p\) divides \(p-1\). If \(p\mid a^n-1\), then \( \operatorname{ord}_p(a)\mid n \). If \(p\mid a^n+1\), then the order divides \(2n\), but not \(n\).

When to Use This Method

Use order when a problem contains large powers, divisibility \(p\mid a^n\pm1\), last digits, residue cycles, or restrictions on possible prime divisors.

How to Recognise the Method

Expressions \(a^n\equiv1\), \(a^n\equiv-1\), \(p\mid a^n-1\), \(p\mid a^n+1\) almost always point to order. If the exponent is huge, first find the cycle length, then reduce the exponent modulo that length.

Typical Mistakes

Order is defined only when \( \gcd(a,m)=1 \). Do not claim the order is \(p-1\) when you only know it divides \(p-1\). In problems with \(a^n+1\), one must separately prove that the order does not divide \(n\).

Mini-checklist

1. Are the base and modulus coprime? 2. What is the smallest exponent giving \(1\)? 3. Does the order divide the needed exponent? 4. If a prime \(p\) appears, what follows from \(d\mid p-1\)? 5. Has the case \(p=2\) been checked separately?

Examples

Example 1. First Order

This shows the definition on a small modulus.

Problem. Find \( \operatorname{ord}_7(2) \).

Solution.

Compute powers: \(2^1\equiv2\), \(2^2\equiv4\), \(2^3\equiv8\equiv1\pmod7\). The value \(1\) did not appear earlier, so the order is \(3\).

Comment. The order is the first exponent giving \(1\), not just any exponent.

Example 2. A Large Power Through a Cycle

This teaches reducing the exponent modulo the order.

Problem. Find the remainder of \(2^{100}\) modulo \(7\).

Solution.

From the previous example, \(2^3\equiv1\pmod7\). Since \(100\equiv1\pmod3\), we get \(2^{100}\equiv2^1\equiv2\pmod7\).

Comment. Once the order is known, large powers become short.

Example 3. Order Modulo a Prime

This shows that the order divides \(p-1\).

Problem. Find \( \operatorname{ord}_{11}(3) \).

Solution.

We have \(3^1\equiv3\), \(3^2\equiv9\), \(3^3\equiv27\equiv5\), \(3^4\equiv15\equiv4\), \(3^5\equiv12\equiv1\pmod{11}\). Thus the order is \(5\), and it indeed divides \(10\).

Comment. This illustrates the fact \(d\mid p-1\).

Example 4. A Divisor of \(a^n-1\)

This shows how order restricts a prime divisor.

Problem. Let a prime \(p\mid 2^m-1\). Prove that \( \operatorname{ord}_p(2)\mid m \) and \( \operatorname{ord}_p(2)\mid p-1 \).

Solution.

From \(p\mid2^m-1\), we get \(2^m\equiv1\pmod p\), so the order of \(2\) modulo \(p\) divides \(m\). Since \(p\) is prime and \(2\not\equiv0\pmod p\), the order also divides \(p-1\).

Comment. This often gives restrictions on \(p\).

Example 5. A Divisor of \(a^n+1\)

This teaches not forgetting the condition 'does not divide \(n\)'.

Problem. Let \(p\) be an odd prime divisor of \(a^n+1\), with \(p\nmid a\). What can be said about the order of \(a\) modulo \(p\)?

Solution.

We have \(a^n\equiv-1\pmod p\). Then \(a^{2n}\equiv1\), so the order divides \(2n\). But the order does not divide \(n\), otherwise \(a^n\equiv1\), contradicting \(a^n\equiv-1\) for odd \(p\).

Comment. This is one of the main templates for problems on \(a^n+1\).

Example 6. Prime Divisors of Fermat Type

This prepares for strong problems.

Problem. Let a prime \(q\mid 2^{16}+1\). Prove that \(q\equiv1\pmod{32}\).

Solution.

If \(q=2\), then \(2^{16}+1\) is odd, so \(q\ne2\). From \(2^{16}\equiv-1\pmod q\), we get \(2^{32}\equiv1\), but \(2^{16}\not\equiv1\). The order of \(2\) modulo \(q\) is \(32\), hence \(32\mid q-1\).

Comment. The exponent \(16=2^4\) forces the order to be exactly \(32\).

Example 7. All Primes from One Condition

This shows how Fermat shortens a problem.

Problem. Find all primes \(p\) such that \(p\mid2^p+1\).

Solution.

For \(p=2\), \(2^2+1=5\), not divisible by \(2\). For odd \(p\), Fermat's little theorem gives \(2^p\equiv2\pmod p\). Then the condition gives \(2^p+1\equiv3\equiv0\pmod p\), so \(p=3\). Check: \(2^3+1=9\) is divisible by \(3\).

Comment. Order is not strictly necessary here, but the cycle idea is the same.

Example 8. Fermat Numbers Are Pairwise Coprime

An olympiad example using order and the sign \(-1\).

Problem. Prove that the numbers \(F_n=2^{2^n}+1\) are pairwise coprime.

Solution.

Let \(m

Comment. The same residue cannot be both \(1\) and \(-1\) modulo an odd number.

Problems

Problems

#3.1
#3.1

Order of Two

Modular Arithmetic Grade 8 Grade 9 Grade 10 ★★☆☆☆

Find \( \operatorname{ord}_7(2) \).

Details
Problem: NT-B2-M03-P001
Difficulty: Level 2 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9, Grade 10
#3.2
#3.2

Order of Three

Modular Arithmetic Grade 8 Grade 9 Grade 10 ★★☆☆☆

Find \( \operatorname{ord}_{11}(3) \).

Details
Problem: NT-B2-M03-P002
Difficulty: Level 2 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9, Grade 10
#3.3
#3.3

A Power Modulo Seven

Remainders Grade 8 Grade 9 Grade 10 ★★☆☆☆

Find the remainder of \(2^{100}\) modulo \(7\).

Details
Problem: NT-B2-M03-P003
Difficulty: Level 2 of 5
Tag: Remainders
Grade: Grade 8, Grade 9, Grade 10
#3.4
#3.4

Last Digit

Remainders Grade 8 Grade 9 Grade 10 ★★☆☆☆

Find the last digit of \(3^{2026}\).

Details
Problem: NT-B2-M03-P004
Difficulty: Level 2 of 5
Tag: Remainders
Grade: Grade 8, Grade 9, Grade 10
#3.5
#3.5

Order Through \(-1\)

Modular Arithmetic Grade 8 Grade 9 Grade 10 ★★☆☆☆

Find \( \operatorname{ord}_{13}(5) \).

Details
Problem: NT-B2-M03-P005
Difficulty: Level 2 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9, Grade 10
#3.6
#3.6

Order Criterion

Divisibility Grade 8 Grade 9 Grade 10 ★★★☆☆

Let \( \gcd(a,m)=1 \) and \(d=\operatorname{ord}_m(a)\). Prove that \(a^k\equiv1\pmod m\) if and only if \(d\mid k\).

Details
Problem: NT-B2-M03-P006
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9, Grade 10
#3.7
#3.7

GCD of Exponents

Euclidean Algorithm Grade 8 Grade 9 Grade 10 ★★★☆☆

Let \( \gcd(a,m)=1 \), \(a^r\equiv1\pmod m\), and \(a^s\equiv1\pmod m\). Prove that \(a^{\gcd(r,s)}\equiv1\pmod m\).

Details
Problem: NT-B2-M03-P007
Difficulty: Level 3 of 5
Tag: Euclidean Algorithm
Grade: Grade 8, Grade 9, Grade 10
#3.8
#3.8

A Divisor of \(2^m-1\)

Prime Factorisation Grade 8 Grade 9 Grade 10 ★★★☆☆

Let an odd prime \(p\mid2^m-1\). Prove that \( \operatorname{ord}_p(2)\mid \gcd(m,p-1) \).

Details
Problem: NT-B2-M03-P008
Difficulty: Level 3 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9, Grade 10
#3.9
#3.9

Primes from \(2^p+1\)

Fermat Grade 8 Grade 9 Grade 10 ★★★☆☆

Find all primes \(p\) such that \(p\mid2^p+1\).

Details
Problem: NT-B2-M03-P009
Difficulty: Level 3 of 5
Tag: Fermat
Grade: Grade 8, Grade 9, Grade 10
#3.10
#3.10

Order Three

Quadratic Residues Grade 8 Grade 9 Grade 10 ★★★☆☆

Let \(p\) be prime, \(p\nmid a\), and \(p\mid a^2+a+1\). Prove that \(p=3\) or \(p\equiv1\pmod3\).

Details
Problem: NT-B2-M03-P010
Difficulty: Level 3 of 5
Tag: Quadratic Residues
Grade: Grade 8, Grade 9, Grade 10
#3.11
#3.11

Last Two Digits

Remainders Grade 8 Grade 9 Grade 10 ★★★★☆

Find the last two digits of \(7^{100}\).

Details
Problem: NT-B2-M03-P011
Difficulty: Level 4 of 5
Tag: Remainders
Grade: Grade 8, Grade 9, Grade 10
#3.12
#3.12

An Equation for the Exponent

Modular Arithmetic Grade 8 Grade 9 Grade 10 ★★★★☆

Find all positive integers \(n\) such that \(5^n\equiv1\pmod{31}\).

Details
Problem: NT-B2-M03-P012
Difficulty: Level 4 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9, Grade 10
#3.13
#3.13

When a Power Equals \(-1\)

Modular Arithmetic Grade 8 Grade 9 Grade 10 ★★★★☆

Find all positive integers \(n\) such that \(2^n\equiv-1\pmod{17}\).

Details
Problem: NT-B2-M03-P013
Difficulty: Level 4 of 5
Tag: Modular Arithmetic
Grade: Grade 8, Grade 9, Grade 10
#3.14
#3.14

General Fact for the Plus Sign

Divisibility Grade 8 Grade 9 Grade 10 ★★★★☆

Let \(p\) be an odd prime, \(p\nmid a\), and \(p\mid a^n+1\). Prove that \( \operatorname{ord}_p(a) \) divides \(2n\), but does not divide \(n\).

Details
Problem: NT-B2-M03-P014
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9, Grade 10
#3.15
#3.15

A Divisor of \(2^{16}+1\)

Prime Factorisation Grade 8 Grade 9 Grade 10 ★★★★☆

Let a prime \(q\mid2^{16}+1\). Prove that \(q\equiv1\pmod{32}\).

Details
Problem: NT-B2-M03-P015
Difficulty: Level 4 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9, Grade 10
#3.16
#3.16

A Prime Divisor of \(3^4+1\)

Prime Factorisation Grade 8 Grade 9 Grade 10 ★★★★☆

Find all primes \(p\) such that \(p\mid3^4+1\).

Details
Problem: NT-B2-M03-P016
Difficulty: Level 4 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9, Grade 10
#3.17
#3.17

General Fermat-Type Lemma

Prime Factorisation Grade 8 Grade 9 Grade 10 ★★★★★

Let \(r\ge0\), let \(p\) be an odd prime, \(p\nmid a\), and \(p\mid a^{2^r}+1\). Prove that \(p\equiv1\pmod{2^{r+1}}\).

Details
Problem: NT-B2-M03-P017
Difficulty: Level 5 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9, Grade 10
#3.18
#3.18

Pairwise Coprimality

Fermat Grade 8 Grade 9 Grade 10 ★★★★★

Prove that the numbers \(F_n=2^{2^n}+1\) are pairwise coprime.

Details
Problem: NT-B2-M03-P018
Difficulty: Level 5 of 5
Tag: Fermat
Grade: Grade 8, Grade 9, Grade 10
#3.19
#3.19

Infinitely Many Primes \(1\pmod{2^k}\)

Fermat Grade 8 Grade 9 Grade 10 ★★★★★

Let \(k\) be a fixed positive integer. Prove that there are infinitely many primes \(q\equiv1\pmod{2^k}\).

Details
Problem: NT-B2-M03-P019
Difficulty: Level 5 of 5
Tag: Fermat
Grade: Grade 8, Grade 9, Grade 10
#3.20
#3.20

Hidden Order

Divisibility Grade 8 Grade 9 Grade 10 ★★★★★

Let \(p\) be an odd prime, \(p\nmid a\), and \(p\mid a^6-1\), but \(p\nmid a^3-1\) and \(p\nmid a^2-1\). Prove that \(p\equiv1\pmod6\).

Details
Problem: NT-B2-M03-P020
Difficulty: Level 5 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9, Grade 10

Ladders

No published ladders were found.
Previous Chapter
Next Chapter