2017 AMC 10B Problem 14
An integer is selected at random in the range . What is the probability that the remainder when is divided by is ?
Show solution without answering
Key insight
The fourth powers of 1, 2, 3, 4 all leave remainder 1 when divided by 5. So N to the 16th leaves 1 unless N is a multiple of 5.
Solution
is far too big to compute, but we only need its remainder when divided by . The remainder of a product depends only on the remainders of the factors, so only 's own remainder matters. For example, and both leave remainder , and and both leave remainder .
- Try the small remainders and raise each to the fourth power:
| remainder when divided by |
- So whenever is not a multiple of , leaves remainder . In symbols, , which just means " leaves remainder when divided by ."
- Now . Four factors that each leave remainder multiply to something that leaves remainder .
- If is a multiple of , then is too, and the remainder is .
- So the remainder is exactly when is not a multiple of .
- From to there are multiples of . That leaves numbers that work.
- The probability is .
The answer is .
Why this works
For remainder questions about huge powers, work with remainders from the start and look for a power that brings you back to . Here the fourth power does it for every number not divisible by (a fact known as Fermat's little theorem), and is a multiple of . Because is a multiple of , each remainder appears equally often, giving exactly .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Only the remainder of mod matters. Compute fourth powers of each nonzero residue:
So whenever , . If , then .
Thus leaves remainder exactly when is not a multiple of . Since , the range to contains multiples of and non-multiples. The probability is
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 7: Introduction to Probability
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- Introduction to Number Theory, Chapter 10: Units Digits
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.