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
A repeating block abc equals abc/999 and a repeating digit a equals a/9. The condition becomes 7a = 3b + 4c, and then it is a short digit search.
Solution
Step 1: turn the repeating decimals into fractions. If , then , and subtracting gives . So
In the same way (for example ). So the right side is
Step 2: simplify the equation. We need . Since , multiply both sides by :
Divide by : .
Step 3: rearrange to see the structure. Write as :
The left side is a multiple of , so is too, which forces to be a multiple of . Likewise must be a multiple of . Digits are between and , so is between and .
Step 4: try each possible value of . Then .
| Digits that work | Count | ||
|---|---|---|---|
| and , so or : , | |||
| and , so or : , | |||
| needs , but then | |||
| needs , but then |
Check one: for , and .
Step 5: add. .
The answer is .
Why this works
Repeating decimals are fractions over , , , and so on, so the decimal condition is really an equation in whole-number digits. Rearranging it as shows that the differences must be multiples of and , which cuts a three-digit search down to a handful of cases.
Alternative approach
Go through in and look for digit pairs from to . The counts for to come out as , again in total. For example, needs , which has the solutions .
The trap
Counting only the nine numbers like 111 and 222 whose digits are all equal, or letting b or c be 0 (all three digits must be nonzero).
Concise 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 .
Review in the AoPS books
- Introduction to Number Theory, Chapter 11: Decimals and Fractions
- Introduction to Number Theory, Chapter 7: Algebra With Integers
- Intermediate Algebra, Chapter 20: Some Advanced Strategies (§20.2)
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
Techniques
Split into exhaustive cases and handle each · Substitute to simplify (u = x+1/x, shifting, scaling)