Problem 4
When is written in decimal notation, the sum of its digits is . Let be the sum of the digits of . Find the sum of the digits of . ( and are written in decimal notation.)
Step 2 of 6: Bound by maximizing the digit sum over
Detailed analysis
Among all integers from to , the one with the largest digit sum is (five nines), since a -digit number in this range must start with and adding more nines to a shorter number can never beat five nines: . Hence .