Problem:
For each positive integer n, let f(n) be the sum of the digits in the base-four representation of n, and let g(n) be the sum of the digits in the base-eight representation of f(n). For example, f(2020)= f(133210four β)=10=12eight β, and g(2020)= the digit sum of 12eight β=3. Let N be the least value of n such that the base-sixteen representation of g(n) cannot be expressed using only the digits 0 through 9. Find the remainder when N is divided by 1000.
Solution:
We want g(n)β₯1016β=1610β. Since g(n) is the digit sum of f(n) written in base 8, we seek the smallest f(n) such that its base-8 digit sum is at least 10.
Try f(n)=378β=3β
8+7=31, which has digit sum 3+7=10. This is the smallest such value. So we want the least n for which f(n)=31 β that is, the base-4 digit sum of n is 31.
To minimize n, maximize the use of digit 3 in base-4. Using ten 3's gives 3β
10=30, which is too small. Use one more digit: 3β
10+1=31.
So the minimal base-4 number with digit sum 31 is 133333333334β (one 1 followed by ten 3's).
Convert to base-10:
n=1β
410+3β
(49+48+β―+40)
Use geometric sum:
3β
(3410β1β)=410β1
So:
n=410+(410β1)=2β
410β1
Now compute 2β
410β1(mod1000).
Note that 410=220=1048576, so 2β
410=2097152 and 2097152(mod1000)=152.
So, N = 2 \cdot 4^{10} - 1 \equiv 152 - 1 = \boxed{151} \pmod
The problems on this page are the property of the MAA's American Mathematics Competitions