1. Let $S(x)$ denote the sum of the digits of a natural number $x$. Solve the equations:

a) $x+S(x)+S(S(x))=1993$

b)* $x+S(x)+S(S(x))+S(S(S(x)))=1993$.

2*. It is known that the number $n$ is the sum of the squares of three natural numbers. Show that the number $n^{2}$ is also the sum of the squares of three natural numbers.
1. a) According to the divisibility rule for 3 (see fact 6), the numbers $x$ and $S(x)$ give the same remainder when divided by 3. The same remainder will also be given by the number $S(S(x))$. Therefore, the sum

$$
x + S(x) + S(S(x))
$$

is divisible by 3 (since it is the sum of three numbers with the same remainder when divided by 3). However, 1993 is not divisible by 3, so there are no solutions.

b) It is clear that $x < 1993$. It is not difficult to see that among the numbers less than 1993, the largest sum of digits, 27, is achieved by the numbers 1989 and 999. Therefore, $S(x) \leq 27$. Further, $S(S(x)) \leq S(19) = 10$. Finally, $S(S(S(x))) \leq 9$. From the equation, it follows that

$$
\begin{aligned}
& x = 1993 - S(x) - S(S(x)) - S(S(S(x))) \geq \\
& \quad \geq 1993 - 27 - 10 - 9 = 1947
\end{aligned}
$$

Similarly to part "a", all numbers $x, S(x), S(S(x))$, and $S(S(S(x)))$ give the same remainder when divided by 9, while 1993 gives a remainder of 4, so the number $x$ must give a remainder of 1 (see the comment). Among the numbers from 1947 to 1993, the numbers that give a remainder of 1 when divided by 9 are 1954, 1963, 1972, 1981, and 1990. Checking these numbers, we find that only 1963 fits.

Comment. We used the following statement: if the sum of four numbers with the same remainder when divided by 9 gives a remainder of 4 when divided by 9, then each of these numbers gives a remainder of 1. This can be strictly proven either by enumeration or as follows: let the desired remainder be $x$. Then $4x$ gives a remainder of 4 when divided by 9. That is, $4(x-1) = 4x - 4$ is divisible by 9, and thus $x-1$ is divisible by 9. Therefore, $x = 1$, see fact 7.