Skip to main content

2020 AIME II Problem 5

Problem 5 of 15EasierNumber TheoryArithmeticProblem-Solving Techniques

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.

Your answer

Integer from 0 to 999
Show solution

Solution

The smallest value whose base-sixteen representation uses a digit beyond 99 is 10.10. Thus we seek the least nn for which the base-eight digit sum of f(n)f(n) is 10.10. Checking possible values of f(n)f(n) in order, every value 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+(410−1)=2⋅410−1=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.
AoPS wiki

Tagged: number base · digits · work backwards

More practice