0

Randomly and independently pick two numbers between $\ 2\ $ and a large number $\ n.\ $ What is the probability that the numbers are coprime in terms of $\ n\ $? This is probably difficult to calculate an exact formula in terms of $\ n,\ $ so I am thinking an approximate formula will do. At least, I think an approximation will be good enough for large enough $n$.

The answer is $1$ - $P($ the two numbers are not coprime).

The probability that both numbers are even is $\approx \frac{1}{2} \times\frac{1}{2} = \frac{1}{4}.$ The probability that both numbers are divisible by $3$ is $\approx \frac{1}{3} \times\frac{1}{3} = \frac{1}{9}.$ But $\ P($ the two numbers have $gcd \geq 2)\ $ is not simply equal to $\ \frac{1}{4} + \frac{1}{9} + \ldots,\ $ because, for example, this is counting numbers divisible by both $2$ and $3$ i.e. multiples of $6$ twice. The probability that both numbers are multiples of $6$ is $\approx \frac{1}{36}.$ So we see that, for example, for $n=1000,$

$P($ the two numbers are not coprime)

$$\approx\ \frac{1}{2^2} + \frac{1}{3^2} - \frac{1}{(3\times 2)^2} + \frac{1}{5^2} - \frac{1}{(5\times 2)^2} - \frac{1}{(5\times 3)^2} + \frac{1}{7^2} - \frac{1}{(7\times 2)^2} - \frac{1}{(7\times 3)^2} - \frac{1}{(7\times 5)^2}$$

$$ +\ \ldots\ $$

$$ +\ \frac{1}{997^2} - \frac{1}{(997\times 2)^2} - \ldots - \frac{1}{(997\times 991)^2}.$$

Is there a known function to approximate closely what this number is, perhaps using the Prime number theorem, or is there a better way to solve the problem entirely?

Adam Rubinson
  • 24,300

0 Answers0