There are exactly positive integers such that the base- integer is divisible by (where is in base ten). What is the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
In base b, 2024 means 2(b³ + b + 2). So b³ + b + 2 must be a multiple of 8, which depends only on b's remainder mod 8.
Solution
1. Turn the base- number into ordinary arithmetic. The digits in base mean
For example, in base this is . (The digit is only allowed if , which is why the problem starts at .)
2. Pull out the common factor . . So is a multiple of exactly when is a multiple of .
3. Only the remainder of matters. If you add to , then changes by a multiple of (every term in has a factor of , and so does ). So whether is a multiple of depends only on the remainder when is divided by . Test the eight possible remainders:
| remainder of | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| 2 | 4 | 12 | 32 | 70 | 132 | 224 | 352 | |
| multiple of ? | no | no | no | yes | no | no | yes | yes |
So the good values of are those that leave remainder , or when divided by . (In congruence notation, , which just means those remainders.)
4. Count them from to . Since , the numbers to contain exactly numbers with each remainder.
- Remainder : The first one, , is too small ( must be at least ), so this gives .
- Remainder : All count.
- Remainder : All count.
5. Add: . Its digits add to .
The answer is .
Why this works
A number written in base is really an expression in , so a question about dividing it becomes a question about . Pull out common factors first (here the turned into ). Then only 's remainder matters, so a short table of cases settles everything. At the end, watch the edges of the range: the starting value removes one number.
The trap
Counting b = 3 among the numbers that leave remainder 3, even though b must be at least 5. That gives 759 and the wrong digit sum 21.
Concise solution
In base , . So exactly when .
The value of depends only on , so test the eight residues:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
|---|---|---|---|---|---|---|---|---|
| 2 | 4 | 12 | 32 | 70 | 132 | 224 | 352 | |
| mod 8 | 2 | 4 | 4 | 0 | 6 | 4 | 0 | 0 |
So the condition holds exactly when .
Now count such with . Since , each residue class contains numbers in . The class starts at , which is excluded (we need ), leaving ; the classes and start at and , so they contribute each. Hence
and the digit sum is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.2)
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
Techniques
Organized listing / direct enumeration · Set up the equation/formula and compute; no special trick needed