Problem 9 · The three-digit parents
The parent of $n$ is one digit followed by nines: $d99$.
Integer answer, at most 4 digitsEvery natural number $n$ has a "parent" number: the smallest natural number whose digits add up to $n$. For example, the parent of $30$ is $3999$, because $3999$ is the smallest number whose digits sum to $30$. If we add up all the three-digit numbers that are the parent of some number, what do we get?
Copa Cangur · SCM
Medium
Closed answer
Reasoned solution
Key idea: to minimise a number with a fixed digit sum, put as many $9$s as possible at the end and the remainder in front.
The parent of $n$ is therefore a leading digit $d \in \{1,\ldots,9\}$ followed by nines. The three-digit parents are exactly $199, 299, \ldots, 999$ (for $n = 19, 20, \ldots, 27$).
$$\sum_{d=1}^{9} (100d + 99) = 100 \cdot 45 + 9 \cdot 99 = 4500 + 891 = 5391.$$
Answer: 5391