2020 AIME II Problem 5

Below is the professionally curated solution for Problem 5 of the 2020 AIME II, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2020 AIME II solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:number basedigitswork backwards

Difficulty rating: 2450

5.

For each positive integer n,n, let f(n)f(n) be the sum of the digits in the base-four representation of nn and let g(n)g(n) be the sum of the digits in the base-eight representation of f(n).f(n). For example, f(2020)=f(1332104)=10=128,f(2020) = f(133210_4) = 10 = 12_8, and g(2020)=the digit sum of 128=3.g(2020) = \text{the digit sum of } 12_8 = 3. Let NN be the least value of nn such that the base-sixteen representation of g(n)g(n) cannot be expressed using only the digits 00 through 9.9. Find the remainder when NN is divided by 1000.1000.

Solution:

The base-sixteen representation of g(n)g(n) needs a digit beyond 99 exactly when g(n)10.g(n) \ge 10. So we need the base-eight digit sum of f(n)f(n) to be at least 10.10. Checking values in order, every number less than 3131 has base-eight digit sum at most 9,9, while 31=37831 = 37_8 has digit sum 10.10. Since the least nn achieving a given base-four digit sum increases with that sum, we want the least nn with f(n)=31.f(n) = 31.

A base-four digit is at most 3,3, so a digit sum of 3131 requires at least 1111 digits, and the smallest 1111-digit choice is a leading 11 followed by ten 33s: N=133333333334=410+(4101)=24101=2097151.N = 13333333333_4 = 4^{10} + (4^{10} - 1) = 2 \cdot 4^{10} - 1 = 2097151.

The remainder when N=2097151N = 2097151 is divided by 10001000 is 151.151.

← Problem 4Full ExamProblem 6

Problem 5 in Other Years