# 2019 AMC 10B Problems/Problem 12

## Problem

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$

## Solution

Convert $2019$ to base $7$. This will get you $5613_7$, which will be the upper bound. To maximize the sum of the digits, we want as many $6$s as possible (which is the highest value in base $7$), and this would be the number $4666_7$. Thus, the answer is $4+6+6+6 = \boxed{\textbf{(C) }22}$

Note: the number can also be $5566_7$, which will also give the answer of $22$.

## Solution 2

Note that all base 7 numbers with 5 digits or more is greater than 2019. Since the first answer that is possible using a 4 digit number is 23, we start with the smallest base 7 number that digits adds up to 23, 5666. 5666 in base 10 is greater than 2017, so we continue with trying 4666, which is less than 2019. So the answer is $\boxed{\textbf{(C) }22}$

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 