2018 AMC 10A Problem 19
A number is randomly selected from the set , and a number is randomly selected from . What is the probability that has a units digit of ?
Show solution without answering
Key insight
Only the last digit of m matters: 1 always works, 5 never, 9 needs an even exponent, 3 and 7 need a multiple of 4.
Solution
There are equally likely pairs . The last digit of depends only on the last digit of , so look at each on its own.
- List the last digits of small powers.
| last digit of | |||||
|---|---|---|---|---|---|
The patterns repeat, so:
- last digit : always ends in ;
- last digit or : ends in exactly when is a multiple of ;
- last digit : never ends in ;
- last digit : ends in exactly when is even.
2. Count the useful values of . From to there are numbers. Of these, are even, and are multiples of : .
3. Count favorable pairs for each .
- : all values of .
- : values.
- : values.
- : values.
- : values.
4. Add and divide. favorable pairs out of , so the probability is .
The answer is .
Why this works
Last digits of powers repeat in a short cycle (at most long), so whether ends in depends only on where falls in that cycle. The range to is exactly numbers, which is five full cycles of , so the counts come out evenly. Different last digits have different cycles, so handle each separately and add.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
There are equally likely pairs . The units digit of depends only on the units digit of , so handle each separately. The values of form a complete block of consecutive integers, containing even numbers and multiples of ().
- : units digit for every . favorable.
- : units digits of cycle ; we need . favorable.
- : always ends in . favorable.
- : cycles ; need . favorable.
- : cycles ; need even. favorable.
Total favorable pairs: , so 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
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
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.