2020 AIME II Problem 5

Attempt Problem 5 of the 2020 AIME II below, then check your answer against the professionally curated solution 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 problems are used with official legal permission of the Mathematical Association of America (MAA).

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)=10f(2020) = f(133210_4) = 10 =128,= 12_8, and the digit sum of 12812_8 is 3,3, so g(2020)=3.g(2020) = 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.

Answer: 151
Concepts:number basedigitswork backwards
Difficulty rating: 2450
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. \begin{aligned} N &= 13333333333_4 \\ &= 4^{10} + (4^{10} - 1) \\ &= 2 \cdot 4^{10} - 1 = 2097151. \end{aligned}

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

← Problem 4#4
Full Exam

Problem 5 in Other Years