Problem

Source: 2021 AMO #4 / JMO #5

Tags: number theory, greatest common divisor, AMC, USA(J)MO, USAMO, Hi



A finite set $S$ of positive integers has the property that, for each $s \in S,$ and each positive integer divisor $d$ of $s$, there exists a unique element $t \in S$ satisfying $\text{gcd}(s, t) = d$. (The elements $s$ and $t$ could be equal.) Given this information, find all possible values for the number of elements of $S$.