Let be a -digit number, and let and be the quotient and the remainder, respectively, when is divided by . For how many values of is divisible by ?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Write n as 99 times q plus the sum q + r. Since 11 divides 99, q + r is a multiple of 11 exactly when n is.
Solution
First see what and are with an example, then find a link between and .
1. Example. Take . Dividing by gives quotient and remainder . So is the first three digits and is the last two, and . In general,
2. Split off . Write as :
3. Use that . The part is always a multiple of . So and differ by a multiple of . That means: is a multiple of if and only if is a multiple of .
(Check with the example: , and .)
4. So count the five-digit multiples of .
- Smallest: has only four digits, so the first one is .
- Largest: , and has six digits.
- The multipliers run from to . That is
numbers. (The counts the starting number: from to there are numbers.)
The answer is .
Why this works
Splitting a number into a front part and a back part, , and noticing that is just more than a multiple of makes the front and back combine into with nothing left over except a multiple of . Whenever a problem mixes the front and back pieces of a number, check how the place value (, , ) sits next to the divisor. Then count carefully, remembering the when counting from one number up to another.
Alternative approach
Count the multiples of in a different way: from to there are of them (since ), and from to there are (since ). The five-digit ones are the difference, .
The trap
Counting the multipliers from 910 to 9090 as 9090 minus 910 = 8180 and forgetting to add 1 for the first one, which is choice (A).
Concise solution
By definition . Rewrite this as
Because , the term is a multiple of , so and leave the same remainder when divided by . Hence exactly when .
So we count five-digit multiples of . The smallest is (since is too small) and the largest is . The multipliers run from to , giving
values of .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Algebra, Chapter 11: Special Factorizations
- Introduction to Number Theory, Chapter 10: Units Digits
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta