A palindrome between and is chosen at random. What is the probability that it is divisible by ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
A palindrome abba equals 1001a + 110b. 1001 is a multiple of 7, so only the middle digit b matters, and b must be 0 or 7.
Solution
A four-digit palindrome reads the same both ways, like . It has the form : first digit from to and middle digit from to . That makes palindromes.
1. Split by place value. Take :
In the same way every palindrome equals .
2. The first part is always a multiple of , because (in fact ).
3. So the palindrome is a multiple of exactly when is. Since has no factor of , the factor must come from itself. So is a multiple of : or .
4. For every first digit , of the middle digits work. The probability is .
Check two examples: and .
The answer is .
Why this works
Writing a number in terms of its digits (place value) shows which digits actually matter for a divisibility question. The fact is worth memorizing: it is why every four-digit palindrome is a multiple of , and why here only the middle digit decides divisibility by .
The trap
Forgetting that 0 is an allowed middle digit, which gives 1/10 instead of 1/5.
Concise solution
A four-digit palindrome has the form with digits and , so there are of them. In terms of place value,
Since , the term is always a multiple of . So the palindrome is divisible by exactly when is. Because , this means , i.e. or .
For each of the choices of , exactly of the choices of work, so the probability is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 7: Introduction to Probability
- Introduction to Algebra, Chapter 11: Special Factorizations
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Set up the equation/formula and compute; no special trick needed