9.1. Find the smallest natural number $n$ for which the decimal representation of $n$ together with $n^{2}$ uses all the digits from 1 to 9 exactly once.
Answer: 567.

Solution: If $n \geqslant 1000$, then $n^{2} \geqslant 10^{6}$, so the decimal representations of $n$ and $n^{2}$ together contain at least 11 digits. If, however, $n \leqslant 316$, then $n^{2} \leqslant 99856$, and the decimal representations of $n$ and $n^{2}$ together contain no more than 8 digits. Therefore, $317 \leqslant n \leqslant 999$.

The sum of all digits from 1 to 9 is 45 and is divisible by 9, so $n+n^{2}$ is also divisible by 9. Since $n+n^{2}=n(n+1)$ is the product of two consecutive numbers, it is divisible by 9 only in two cases: 1) $n$ is divisible by 9; 2) $n+1$ is divisible by 9, i.e., $n$ has a remainder of 8 when divided by 9.

The first such numbers greater than 316 are 323 and 324. Therefore, the desired numbers lie in the arithmetic progressions $323+9 k$ and $324+9 k, k \in \mathbb{N}$. Moreover, the decimal representation of $n$ should not contain identical digits or the digit 0, and it should not end in 1, 5, or 6 (otherwise, its square would end in the same digit). Additionally, if $n$ contains the digit 4 and ends in 2 or 8, it is also not suitable, as then $n^{2}$ would end in 4. Taking this into account, we will sequentially list the remaining possible values of $n \geqslant 317$ in a table:

| $n$ | $n^{2}$ |
| :---: | :---: |
| 324 | 104976 |
| 359 | 128881 |
| 368 | 135424 |
| 369 | 136161 |


| $n$ | $n^{2}$ |
| :---: | :---: |
| 378 | 142884 |
| 387 | 149769 |
| 413 | 170569 |
| 423 | 178929 |


| $n$ | $n^{2}$ |
| :---: | :---: |
| 459 | 210681 |
| 467 | 218089 |
| 512 | 262144 |
| 513 | 263169 |


| $n$ | $n^{2}$ |
| :---: | :---: |
| 539 | 290521 |
| 549 | 301401 |
| 567 | 321489 |
| $\cdots$ | $\ldots$ |

Among the checked numbers, the first one that satisfies the condition of the problem is the number 567. Similarly, by checking possible values of $n \leqslant 999$ "from the end," the largest such number can be found, which is 854 (in this case, the search can be shortened by noting that for $n \geqslant 953$, the decimal representation of $n^{2} \geqslant 908209$ also contains the digit 9).