Problem

Source:

Tags: number theory, combinatorics, game



Two players alternately write numbers in the cells of an $n\times n$ square board. Hereby, in the intersection of the $i$-th row and the $j$-th column the first player may write the greatest common divisor of numbers $i$ and $j$, whereas the second player may write their least common multiple. When the board is filled up, the numbers of the first column are divided by $1$, those of the second column by $2$, etc., those of the last column by $n$. Then the product of the obtained numbers in the board is computed. If the result is smaller than $1$, the first player wins, otherwise the second player wins. Which player has a winning strategy?