2. Find the five-digit number divisible by 3, whose first three digits form a number that is a square of some natural number, and the last three digits form a three-digit number that is a cube of some natural number.
Solution. If the five-digit number is $\overline{a b c d e}$, then $\overline{a b c}$ is the square of some number and $\overline{c d e}$ is the cube of some natural number. Therefore, $\overline{c d e} \in\{125, 216, 343, 512, 729\}$. Since $\overline{a b c}$ is the square of some number, we have $c \in\{0,1,4,5,6,9\}$, so $\overline{c d e} \in\{125, 512\}$. Three-digit numbers that are squares of natural numbers with the unit digit 1 or 5 are: 121, 225, 361, 441, 625, 841, and 961. Since $a+b+c+d+e=3 k$, the desired five-digit number is 22512.