Let $S$ be a set of $k$ distinct natural numbers, each from the interval $[2,n]$, with least common multiple $\mathop{lcm}$. What fraction $\rho$ of the numbers $2,3,4,\ldots,\mathop{lcm}$ are divisible by a member of $S$?
For example, if $S=(4,6,8,9)$, then $|S|=k=4$, $n=9$, and $\mathop{lcm}=72$. The numbers $2,\ldots,\mathop{lcm}$ that are divisible by a member of $S$ are $$D=(4,6,8,9,12,16,18,20,24,27,28,30,32,36,40,42,44,45,48,52,54,56,60,63,64,66,68,72)\;.$$ There are $|D|=28$ of these numbers, so $\rho=|D|/\mathop{lcm}=28/72=0.39$: 39% of the numbers up to $\mathop{lcm}$ are divisible by a member of $S$.
This question arose in a colleague's work on online algorithms analyzing a stream of numbers represented by $S$. A few more examples before asking specific questions:
- For $S=(2, 4, 8, 16, 32)$, $|D|=16$ and $\rho=0.5$.
- For $S=(b^1, b^2, b^3, \ldots, b^r)$, $|D|=b^{r-1}$ and $\rho=1/b$.
- For $S=(2, 3, 5, 7, 11)$, $\mathop{lcm}=2310$, $|D|=1830$, and $\rho=0.79$.
- For $S=(2, 3, 4, 5, 6, 7, 8, 9, 10, 11)$, $\mathop{lcm}=27720$, $|D|=21960$, and $\rho=0.79$.
Q1. As a function of $n$, the largest number in $S$, what is the maximum value of $\rho$ achievable?
Q2. As a function of $n$ and $k$, what is the expected value of $\rho$ if the $k$ elements of $S$ are chosen randomly from the range $[2,n]$? For example, for $n=10$ and $k=4$, $\rho \approx 0.55$.
Q3. Given $S$, can $D$ be computed in time proportional to $|D|$? Can $|D|$ be computed faster, in $o(|D|)$?
Especially Q1 feels like it should be known. Thanks for pointers or tips!