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 3 of 6: Bound by maximizing the digit sum over
Detailed analysis
Among the integers from to , the largest digit sum belongs to (since a two-digit number has except when forces , and ), giving . Hence .