AMC 10 Step by Step

2019 AMC 10B Problem 12

P11-15~4 minPrint

What is the greatest possible sum of the digits in the base-seven representation of a positive integer less than 20192019 ?

Log in to save your progress.
Show solution without answering

Key insight

Numbers below 2019 have at most four base-7 digits, each at most 6. Check whether the smallest number with each high digit sum still fits under 2019.

Solution

In base seven the place values are 1,7,49,343,24011, 7, 49, 343, 2401, and each digit is between 00 and 66.

1. How many digits? 74=24017^4 = 2401 is bigger than 20192019. So every number below 20192019 uses at most four base-seven digits: the 343343s, 4949s, 77s and 11s places.
2. Highest sum imaginable. Four digits, each at most 66, sum to at most 2424. The only number with digit sum 2424 is 66667=6⋅343+6⋅49+6⋅7+6=24006666_7 = 6 \cdot 343 + 6 \cdot 49 + 6 \cdot 7 + 6 = 2400, too big.
3. Can the sum be 2323? Four digits, each at most 66, adding to 2323 must be three 66s and one 55. The smallest such number puts the 55 in front:
56667=5⋅343+6⋅49+6⋅7+6=1715+294+42+6=2057.5666_7 = 5 \cdot 343 + 6 \cdot 49 + 6 \cdot 7 + 6 = 1715 + 294 + 42 + 6 = 2057.
That is more than 20192019, and the other arrangements are even larger. So 2323 is impossible.
4. Sum 2222 works. Lower the front digit to 44:
46667=4⋅343+294+42+6=1372+342=1714,4666_7 = 4 \cdot 343 + 294 + 42 + 6 = 1372 + 342 = 1714,
which is less than 20192019. Its digit sum is 4+6+6+6=224 + 6 + 6 + 6 = 22.

Sum 2222 is possible, and sums 2323 and 2424 are not, so the greatest is 2222.

The answer is (C) 22\boxed{\textbf{(C)}\ 22}.

Why this works

To make a digit sum big, you want big digits, but the number must stay under the limit. So work down from the largest sum you can imagine and, for each candidate sum, test the smallest number that has it. If even the smallest is too big, that sum is out. It helps to know that 2019=561372019 = 5613_7: its leading digit 55 is followed by small digits, so dropping the leading digit to 44 frees the rest to be 66s.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Since 74=2401>20197^4 = 2401 > 2019, every positive integer below 20192019 has at most four base-seven digits, each at most 66. So the digit sum is at most 2424, attained only by 66667=24006666_7 = 2400, which is too large.

A digit sum of 2323 would need four digits totaling 2323 with each at most 66, so the digits must be 6,6,6,56, 6, 6, 5 in some order. The smallest such number is
56667=5⋅343+6⋅49+6⋅7+6=1715+294+42+6=2057>2019.5666_7 = 5 \cdot 343 + 6 \cdot 49 + 6 \cdot 7 + 6 = 1715 + 294 + 42 + 6 = 2057 > 2019.
So 2323 is impossible.

A digit sum of 2222 is achievable:
46667=4⋅343+294+42+6=1714<2019.4666_7 = 4 \cdot 343 + 294 + 42 + 6 = 1714 < 2019.

The answer is (C) 22\boxed{\textbf{(C)}\ 22}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.