2. [5 points] Several pairwise distinct natural numbers are written on the board. If the smallest number is multiplied by 32, the sum of the numbers on the board will become 581. If the largest number is multiplied by 17, the sum of the numbers on the board will also become 581. What numbers could have been written on the board?
Answer: $16,17,21,31$ or $16,18,20,31$.

Solution. Let there be $n$ numbers $x_{1}32 x_{1} \geqslant$ $32 \cdot(16 \cdot 2)>581$, which is impossible. Therefore, $k=1$, from which $x_{1}=16, x_{n}=31$.

Then $32 x_{1}+x_{n}=32 \cdot 16+31=543$, and the sum of the remaining numbers is $581-543=38$, with the remaining numbers being greater than 16 and less than 31. This cannot be just one number, as it would be greater than 31. If there are two numbers, the different natural numbers with a sum of 38 are 17 and 21 or 18 and 20. There cannot be more than two numbers, as their sum would exceed $16 \cdot 3=48$.