How many three-digit numbers are not divisible by , have digits that sum to less than , and have the first digit equal to the third digit?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Numbers are aba with a not 0 or 5; every b works for a at most 4, but a from 6 to 9 needs b below 20-2a.
Solution
Write the number as with and . The last digit is , so "not divisible by " means (and , already excluded). The digit sum condition is .
Case : , so all values of work: numbers.
Case : need , so : numbers.
Case : need : numbers.
Case : need : numbers.
Case : need : numbers.
Total: .
The answer is .
Why this works
The palindrome condition reduces the problem to two free digits, and each remaining condition constrains one of them. Handling the outer digit case by case keeps the digit-sum inequality simple: it is automatic for small and a short arithmetic progression for large .
Alternative approach
Count the complement: there are palindromes . Remove the with , leaving . Among those, digit sum requires with : that is numbers. .
The trap
Forgetting that 'not divisible by 5' rules out a = 5 as the last digit, which adds 10 extra numbers and gives 70.
Common mistakes
- Forgetting that 'not divisible by 5' rules out a = 5 as the last digit, which adds 10 extra numbers and gives 70.
- Using "sum less than 20" as "at most 20," which admits and adds numbers.
Techniques
Split into exhaustive cases and handle each