Problem 9.8. From the set $\{1,2,3, \ldots, n\}$, 9 distinct numbers are chosen and written in the cells of a $3 \times 3$ table such that the products of the numbers in each row, column, and diagonal are equal. Determine the smallest value of $n$ for which such a table exists.
Solution. Let $k$ be the product mentioned in the statement, and $x$ the number in the central cell of the table. The number $x$ appears in 4 products - in row 2, in column 2, and in both diagonals. The product of all numbers in row 2, column 2, and both diagonals is $k^{4}$. In this product, the number $x$ appears 4 times, and all others appear once. Therefore, $k^{4}=k^{3} x^{3}$, which means $k=x^{3}$. Consider the first of the two adjacent tables with the obvious notation. By equating each product containing $x$ to $x^{3}$, we find

$$
a h=c f=d e=b g=x^{2}
$$

![](https://cdn.mathpix.com/cropped/2024_06_06_ebb691b03839f1f57afag-4.jpg?height=174&width=197&top_left_y=1232&top_left_x=1495)

| 12 | 1 | 18 |
| :---: | :---: | :---: |
| 9 | 6 | 4 |
| 2 | 36 | 3 |

Since the number $x^{2}$ can be written as a product of two distinct numbers in 4 ways, the smallest possible value for $x$ can be $6\left(6^{2}=36=1 \cdot 36=2 \cdot 18=3 \cdot 12=4 \cdot 9\right)$. In this case, the set of numbers in the table would be $\{1,2,3,4,6,9,12,18,36\}$. For $n=36$, such a table exists, for example, the second of the adjacent tables.

We will show that for $n>36$. Thus, the number $x$ can only have prime divisors 2 and 3. But then all numbers in the table will be of the form $2^{m} \cdot 3^{n}$ and cannot be greater than 32. It follows that in the table, 9 numbers from the set

$$
A=\{1,2,3,4,6,8,9,12,16,18,24,27,32\}
$$

will appear. From equation (1), it follows that $x$ can be represented in at least 4 ways as a product of two factors, one greater than $x$ and the other less than $x$. Therefore, $6 \leqslant x \leqslant 16$. We will show that none of the numbers $x \in[6,16]$ have 4 representations. We have:

1) $16^{2}=8 \cdot 32$; 2) $12^{2}=6 \cdot 24=8 \cdot 18=9 \cdot 16$; 3) $9^{2}=3 \cdot 27$; 4) $8^{2}=4 \cdot 16=2 \cdot 32$; 5) $6^{2}=2 \cdot 18=3 \cdot 12=4 \cdot 9$.

Thus, $n=36$.