In this game, you and your opponent takes turn to choose a number between 2 and 40. After a number is chosen, any number that shares a common divisor (excluding 1) with this number cannot be chosen. If a player has no number to choose from in his turn, he loses.
Suppose you get to choose a number first. What is your optimal strategy? What is your opponent optimal strategy? Who is guaranteed to win this game?
The prime numbers between $2$ and $40$ are precisely:
$2,3,5,7,11,13,17,19,23,29,31,37$
At the first step choose the number $2$. In this case your opponent will not be able to choose a number which is divisible by $3$ distinct primes, because such a number doesn't exist. (he can't choose $30=2\cdot 3\cdot 5$ anymore) He'll have to choose a number which is either divisible by $1$ odd prime or by $2$ odd primes.
Assume your opponent chose a number divisible by exactly one prime. Then in the next step you choose the product of the $2$ smallest remaining primes. (which will be either $3$ times something, or $5\cdot 7=35$) From now on numbers divisible by $3$ and $5$ are also forbidden, and so in the next turns both of you will just have to choose one of the remaining primes, no other options. The number of remaining primes is even, and this sequence of turns started from your opponent, so your opponent will be the first one who will run out of numbers. So you win.
Similarly, assume that in the second turn your opponent chose a number divisible by $2$ exactly distinct odd primes. One of these primes must be either $3$ or $5$. If the number he chose is divisible by both of them, you choose $7$ in the next step. Otherwise, choose the remaining prime between $3$ and $5$. Now again, from this point both of you will have to choose one of the remaining prime numbers (since you can't use numbers divisible by $2$, $3$, $5$ anymore), and you end up winning like in the previous case.