How many distinct four-digit numbers are divisible by and have as their last two digits?
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
The 90 candidates 1023, 1123, ..., 9923 step by 100, which is 1 mod 3, so they cycle through residues and exactly one third, 30, are multiples of 3.
Solution
A four-digit number ending in is where is its first two digits, . That is candidates: .
Consecutive candidates differ by , and , so as increases by the residue of mod increases by . The residues therefore cycle , and in any three consecutive candidates exactly one is a multiple of . Since is a multiple of , exactly candidates are divisible by .
Concretely, is the first, and the multiples of are (step ): .
The answer is .
Why this works
An arithmetic progression whose common difference is coprime to runs through all residues mod in turn, so among any consecutive terms exactly one is divisible by . This makes "how many terms are multiples of " a division problem rather than a digit-sum casework problem, and the same idea handles any modulus and any fixed ending.
Alternative approach
Digit sums: with thousands digit (–) and hundreds digit (–), divisibility by requires , i.e. . For each , the valid form one residue class mod among –: values when (that is : ) and values otherwise. Total .
The trap
Counting 100 candidates by allowing a leading zero, or arguing about digit sums and missing that a tens-digit of 0 is allowed while a thousands digit of 0 is not.
Common mistakes
- Counting candidates by allowing a leading zero, or arguing about digit sums and missing that a tens digit of is allowed while a thousands digit of is not.
- Using step instead of in the final count, or miscounting the residue class sizes among – (four s, three s, three s).
Techniques
Set up the equation/formula and compute; no special trick needed