Problem 905: (2019 AMC 10b, 12)
What is the greatest possible sum of the digits in the base-seven representation of a positive integer less than $2019$?
$\textbf{(A)}\ 11 \qquad\textbf{(B)}\ 14 \qquad\textbf{(C)}\ 22 \qquad\textbf{(D)}\ 23 \qquad\textbf{(E)}\ 27$
- $2019=5\cdot343+6\cdot49+1\cdot7+3$, so $2019=5613_7$, and every number below $2019$ has at most four base-$7$ digits.
- If the first digit is $5$, the number is at most $5613_7$. If the second digit is $6$, the third digit is at most $1$ and the sum is at most $5+6+1+6=18$; otherwise the sum is at most $5+5+6+6=22$.
- If the first digit is at most $4$, the sum is at most $4+6+6+6=22$, and $4666_7=1714<2019$ reaches it.
- So the greatest digit sum is $22$.
- The answer is (C).
What is the greatest possible sum of the digits in the base-six representation of a positive integer less than $1000$?