Modular Arithmetic
Remainders, congruences, last digits, cyclicity, Chinese-remainder style reasoning
Modular ArithmeticAMC 10 Step by Step
Name: Date: October 28, 2026
Number Theory · 38 problems have this as their main idea
38
primary-topic problems (2.9% of all)
33
more as a secondary topic
Where it appears
9
P1-10
9
P11-15
9
P16-20
11
P21-25
What you need to know
- What "mod" means. means and leave the same remainder when divided by ; in other words, divides . Example: , since divides .
- Working with remainders. You can add, subtract, and multiply congruences, swapping any number for its remainder. You may divide both sides by only when shares no factor with . Example: . But while : dividing by failed.
- Units digits cycle. The units digits of repeat with a cycle length that divides . Example: powers of end in ; since , ends in .
- Any modulus. The remainders of mod always start repeating at some point, so once inside the cycle, reduce the exponent by the cycle length. A few powers may come before the cycle starts. Example: mod , powers of go ; the cycle starts at .
- Fermat's Little Theorem. If is prime and does not divide , then .
- Squares. A square leaves remainder or when divided by or by . Divided by , a square leaves , , or , and an odd square always leaves . Example: and .
- Chinese Remainder Theorem. If , a number's remainders mod and mod pin down its remainder mod . Example: remainder mod and mod means remainder mod .
- Digit shortcuts. A number and its digit sum agree mod . Mod , use the alternating digit sum, starting with on the units digit. Mod , keep the last two digits. Example: leaves mod (digit sum ), mod (), and mod .
How AMC 10 tests it
- "What is the units digit (or remainder mod ) of ?" Find the cycle and reduce the exponent (problems 8–15).
- Day-of-week or clock problems: count days, reduce mod or , watch leap years.
- "Find the smallest with , , ": the Chinese Remainder Theorem, by listing or stepping through multiples (problems 12–20).
- Showing an equation has no solutions by working mod , , , or .
- Divisibility in disguise, such as "the average was a whole number after each entry," which means the first entries add up to a multiple of .
Standard approaches
- Reduce the base first, find the cycle length of its powers, and reduce the exponent by that length (never by ).
- In sums of factorials or products, every term past some point is , so only the first few matter. Example: from on, factorials end in , so ends in the same digit as .
- For several congruences, start with the largest modulus and step through its numbers until the others hold. Example: above, gives , and already works.
- For "no integer solutions," use a modulus where squares or cubes have few remainders. Example: leaves , , or mod , so it never equals .
- Use negative remainders to make powers easy: , so .
Worked example
What is the remainder when is divided by ?
(A) (B) (C) (D) (E)
Step 1: the cycle. Multiply by and keep the remainder mod each time: , , , , , . The pattern repeats every powers.
Step 2: place . , so .
Step 3: add. , so . Then .
The answer is .
Pitfalls
- Reducing the exponent by instead of the cycle length. Example: using gives , which is wrong.
- Misplacing remainder : it means the end of the cycle. Example: , so is the th entry, , not the first entry, . Likewise ends in , the last of , not in .
- Dividing both sides by a number that shares a factor with the modulus (see the example above).
- Off-by-one errors in calendar problems: counting the starting day, or February in leap years. Example: days after a Monday is a Thursday (), not a Wednesday.
Traps that recur
- Assuming the bits repeat 111 or 011 from the first few (x₀ = x₁ = x₂ = 1) without computing far enough to see the period-3 pattern 0,1,1. (2022 AMC 10B #25)
- Reducing 90! mod 100 directly (it is 0) or forgetting that removing 21 factors of 5 also requires removing exactly 21 factors of 2. (2010 AMC 10A #24)
- Assuming powers spread out over many residues (answering 25 or 125) instead of testing whether 100 is a multiple of the order of every unit mod 125. (2024 AMC 10B #18)
- Testing only whether each fraction is an integer separately; for odd m none of them is, yet the fractional parts 1/2 + 1/4 + 1/8 + 1/8 add up to exactly 1. (2024 AMC 10B #24)
Problems, easiest first
Open any of them to try it here; the worked solution is on the problem's own page.
← PreviousPage 2 of 2