What is the greatest possible sum of the digits in the base-seven representation of a positive integer less than ?
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
Below 2019 there are at most four base-7 digits; digit sum 23 needs three 6s and a 5, but 5666 base 7 = 2057 is too big.
Solution
Since , every positive integer below has at most four base-seven digits, each at most . So the digit sum is at most , attained only by , which is too large.
A digit sum of would need four digits totaling with each at most , so the digits must be in some order. The smallest such number is
So is impossible.
A digit sum of is achievable:
The answer is .
Why this works
Maximizing a digit sum is a trade-off between using large digits and staying under the limit. Bound the digit count from the powers of the base, find the theoretical maximum sum, and then check whether the smallest number achieving each candidate sum fits under the limit. Here , so the leading digit forces the next digits down sharply, while dropping to leading digit frees all the remaining digits to be .
The trap
Assuming the maximum is 6666 base 7 (sum 24) without converting it, or reading 2019 as if it were already in base 7.
Common mistakes
- Assuming the maximum is 6666 base 7 (sum 24) without converting it, or reading 2019 as if it were already in base 7.
- Insisting on the largest leading digit and settling for (also sum ) without realizing gives the same sum; both are fine, but forgetting to check is the real risk.
Techniques
Bound the quantity above/below or estimate to pin it down · Consider the largest/smallest element or boundary case