How many three-digit positive integers are there whose nonzero digits and satisfy (The bar indicates repetition, thus is the infinite repeating decimal )
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
Repeating 0.abc is abc/999 and repeating 0.a is a/9, so the condition becomes 7a = 3b + 4c, i.e. b = a - 4t and c = a + 3t.
Solution
Convert the repeating decimals: and , so the right side is . The condition becomes
which simplifies to , or .
Rewrite as . Since , is a multiple of : and for some integer , so
Now count digit solutions with :
- : , any of values. numbers ().
- : needs ; needs . So : and . numbers.
- : needs ; needs . So : and . numbers.
- : the conditions and (or the mirror pair) are incompatible.
Total: .
The answer is .
Why this works
Repeating decimals are fractions with denominators , so the equation is really a linear Diophantine equation in the digits. Parametrizing all integer solutions of with a single integer turns a three-variable search into a short check of a few values against the digit bounds.
Alternative approach
Casework on in : for each , is determined mod by , and only a few values keep between and . The counts by are , again summing to .
The trap
Counting only the nine solutions with a = b = c, or allowing b or c to be 0 (all three digits must be nonzero).
Common mistakes
- Counting only the nine solutions with a = b = c, or allowing b or c to be 0 (all three digits must be nonzero).
- Miscounting the cases by checking only one of the two digit bounds (for example allowing with , where ).
Techniques
Split into exhaustive cases and handle each · Substitute to simplify (u = x+1/x, shifting, scaling)