linguistic:voice_change, information:filtering, linguistic:paraphrasing, linguistic:translation
Probability of coprimality

Given two randomly chosen integers a and b, it is reasonable to ask how likely it is that a and b are coprime. In this determination, it is convenient to use the characterization that a and b are coprime if and only if no prime number divides both of them (see Fundamental theorem of arithmetic).

Informally, the probability that any number is divisible by a prime (or in fact any integer) p is 1 p; {\displaystyle {\tfrac {1}{p}};} for example, every 7th integer is divisible by 7. Hence the probability that two numbers are both divisible by p is 1 p 2, {\displaystyle {\tfrac {1}{p^{2}}},} and the probability that at least one of them is not is 1 − 1 p 2. {\displaystyle 1-{\tfrac {1}{p^{2}}}.} Any finite collection of divisibility events associated to distinct primes is mutually independent. For example, in the case of two events, a number is divisible by primes p and q if and only if it is divisible by pq; the latter event has probability 1 p q. {\displaystyle {\tfrac {1}{pq}}.} If one makes the heuristic assumption that such reasoning can be extended to infinitely many divisibility events, one is led to guess that the probability that two numbers are coprime is given by a product over all primes,

Here ζ refers to the Riemann zeta function, the identity relating the product over primes to ζ (2) is an example of an Euler product, and the evaluation of ζ (2) as π /6 is the Basel problem, solved by Leonhard Euler in 1735.

There is no way to choose a positive integer at random so that each positive integer occurs with equal probability, but statements about "randomly chosen integers" such as the ones above can be formalized by using the notion of natural density. For each positive integer N, let P be the probability that two randomly chosen numbers in { 1, 2, …, N } {\displaystyle \{1,2,\ldots,N\}} are coprime. Although P will never equal 6/ π exactly, with work one can show that in the limit as N → ∞, {\displaystyle N\to \infty,} the probability P approaches 6/ π.

More generally, the probability of k randomly chosen integers being setwise coprime is 1 ζ (k). {\displaystyle {\tfrac {1}{\zeta (k)}}.}