Find the probability that the product of n random numbers taken from the set {1, 2, ...,…
- User
Find the probability that the product of n random numbers taken from the set {1, 2, ..., k} will have an odd number of divisors.
- Assistant
Find the probability that the product of n random numbers taken from the set {1, 2, ..., k} will have an odd number of divisors.
Let denote the probability that the product of randomly chosen numbers from will have an odd number of divisors. Similarly, let denote the probability that the product of randomly chosen numbers from will have an even number of divisors. Note that .
Consider choosing the numbers one at a time. For the first number, we can choose any of the numbers. For the second number, we want to choose a number that will not change the parity of the number of divisors of the product so far. This means we want to choose a number that has the same parity as the number of divisors of the product so far. Since a number has an odd number of divisors if and only if it is a perfect square, we need the product so far to be a perfect square. Thus, we want to choose a number that is a square modulo the product so far. There are squares modulo , where denotes the product of the first number and is included even if no numbers have been chosen yet. Similarly, for the third number, we want to choose a number that is a square modulo , and there are choices.
Continuing in this way, we see that [Q(n,k) = \frac{\left\lfloor\frac{k}{\sqrt{P_{1,k}}}\right\rfloor \left\lfloor\frac{k}{\sqrt{P_{2,k}}}\right\rfloor \cdots \left\lfloor\frac{k}{\sqrt{P_{n-1,k}}}\right\rfloor}{k^n}.]Note that each can be rewritten as for some integer that is not a perfect square, because divides . Using this, we can simplify the expression for as follows: [Q(n,k) = \frac{\left(\frac{k}{\sqrt{a_1}}\right)\left(\frac{k}{\sqrt{a_2}}\right)\cdots \left(\frac{k}{\sqrt{a_{n-1}}}\right) \cdot \left\lfloor\frac{k}{\sqrt{P_{n-1,k}}}\right\rfloor}{k^n}.]To make the calculation easier, we will assume WLOG that is a perfect square (otherwise we can replace with ). Then each is an integer that is strictly less than , and we can write it in the form , where is the smallest prime factor of . Furthermore, is not a perfect square. Thus, we can write [Q(n,k) = \frac{\left(\frac{k}{p_1}\right)^2\left(\frac{k}{p_2}\right)^2 \cdots \left(\frac{k}{p_{n-1}}\right)^2 \cdot \left\lfloor\frac{k}{\sqrt{P_{n-1,k}}}\right\rfloor}{k^n}.]Now we can use the fact that to expand the numerator and then use the fact that is the smallest prime factor of to simplify further: \begin{align*} Q(n,k) &= \frac{\left(\frac{k}{p_1}\right)^2\left(\frac{k}{p_2}\right)^2 \cdots \left(\frac{k}{p_{n-1}}\right)^2 \cdot \left(k - \sqrt{P_{n-1,k}}\right)}{k^n} \ &= \frac{\left(\frac{k}{p_1}\right)^2\left(\frac{k}{p_2}\right)^2 \cdots \left(\frac{k}{p_{n-1}}\right)^2 k - \left(\frac{k}{p_1}\right)^2\left(\frac{k}{p_2}\right)^2 \cdots \left(\frac{k}{p_n}\right)^2}{k^n} \ &= Q(n-1,k) - \frac{\left(\frac{k}{a_n}\right)^2}{k^n}. \end{align*}We have the base case , so we can use the above recursion to calculate for larger values of . Then we can find to get the final answer.
Not yet included in a published release.