
6. For any natural number $n$, let $S(n)$ denote the sum of the digits of $n$. Find the number of all 3-digit numbers $n$ such that $S(S(n))=2$.


Solution: Observe that $S(S(n))=2$ implies that $S(n)=2,11$ or 20 . Hence we have to find the number of all all 3 digit numbers $\overline{a b c}$ such that $a+b+c=2,11$
and 20. In fact we can enumerate all these:

$$
\begin{gathered}
a+b+c=2: \overline{a b c}=101,110,200 ; \\
812,821, c=182,128,218,281,731,713,317,371,137,173,722,272,227,740,704 \\
407,470,650,605,560,506,641,614,416,461,164,146,623,632,362,326,263,236 \\
a+b+c=20 ; \overline{a b c}=992,929,299,983,938,398,389,839,893,974,947,794,749 \\
479,497,965,956,659,695,596,569,884,848,488 \\
875,875,785,758,578,587,866,686,668,776,767,677
\end{gathered}
$$

There are totally 85 three digit numbers having second digital sum equal to 2 . $\qquad$

