## Task 2 - 060912

If we form the cross sum of a natural number and then (if possible) the cross sum of this number again, etc., we finally obtain a single-digit number, which we will call the "final cross sum." By definition, the cross sum of a single-digit number is set to be the number itself.

Calculate how many natural numbers from 1 to 1000 have the "final cross sum" 9!
The first cross sum $Q_{n}$ of a one-, two-, or three-digit number $n$ can be at most 27, namely for a number consisting exclusively of the largest digit $9 \Rightarrow Q_{999}=9+9+9=27$. This is simultaneously the only number that has this cross sum and is one of the sought-after numbers, since $Q_{27}=9$.

The next smaller first cross sum, whose last cross sum is 9, is 18. This is followed only by the cross sum 9, whose last cross sum is of course also 9. We now need to find all numbers whose cross sum is 9 or 18.

In the range of one- and two-digit numbers, $9, 18, 27, \ldots, 81, 90$ are the only numbers with a cross sum of 9, and 99 is the only number with a cross sum of 18. This results in a total of 11 numbers.

In the range from 100 to 199, we also get 11 such numbers: 108, 117, 126, ..., 171, 180 with a cross sum of 9, and 189 and 198 with a cross sum of 18.

This pattern continues in each hundred range with 11 numbers whose cross sum is 9 or 18.

Thus, there are 10$\cdot$11+1 numbers whose cross sum is 9, 18, or 27, and whose last cross sum is 9.