Probability of one number dividing another

81 Views Asked by At

Suppose there's a set $\{1,..., M\}$. What's the probability that a number $n$ selected from the set uniformly at random will divide $M$, i.e., $M \mod n = 0$? The answer should only depend on M.

To start with, I considered the probability of each remainder $0, 1, ..., n-1$ and the ceiling/floor function, but I can't find a good way of fixing double-counting.

1

There are 1 best solutions below

0
On

Let $M = \prod p_i^{b_i}$ be the unique prime factorization of $M$.

The $M$ will have $\prod (b_i + 1)$ factors all equal or less then $M$.

So the probability that $n$ is one of the $\prod (b_i + 1)$ factors is $\frac {\prod (b_i + 1)}{\prod p_i^{b_i}}$