# probability that two positive integers are relatively prime

The probability that two positive integers chosen randomly are relatively prime is

$$\frac{6}{{\pi}^{2}}=0.60792710185\mathrm{\dots}.$$ |

At first glance this “naked” result is beautiful, but no
suitable definition is there: there isn’t a probability space^{}
defined. Indeed, the word “probability” here is an abuse of
language.
So, now, let’s write the mathematical statement.

For each $n\in {\mathbb{Z}}^{+}$, let ${S}_{n}$ be the set $\{1,2,\mathrm{\dots},n\}\times \{1,2,\mathrm{\dots},n\}$ and define ${\mathrm{\Sigma}}_{n}$ to be the powerset of ${S}_{n}$. Define $\mu :{\mathrm{\Sigma}}_{n}\to \mathbb{R}$ by $\mu (E)=|E|/|{S}_{n}|$. This makes $({S}_{n},{\mathrm{\Sigma}}_{n},\mu )$ into a probability space.

We wish to consider the event of some $(x,y)\in {S}_{n}$ also being in the set ${A}_{n}=\{(a,b)\in {S}_{n}:\mathrm{gcd}(a,b)=1\}$. The probability of this event is

$$P((x,y)\in {A}_{n})={\int}_{{S}_{n}}{\chi}_{{A}_{n}}d\mu =\frac{|{A}_{n}|}{|{S}_{n}|}.$$ |

Our statement is thus the following. For each $n\in {\mathbb{Z}}^{+}$, select random integers ${x}_{n}$ and ${y}_{n}$ with $1\le {x}_{n},{y}_{n}\le n$. Then the limit ${lim}_{n\to \mathrm{\infty}}P(({x}_{n},{y}_{n})\in {A}_{n})$ exists and

$$\underset{n\to \mathrm{\infty}}{lim}P(({x}_{n},{y}_{n})\in {A}_{n})=\frac{6}{{\pi}^{2}}.$$ |

In other words, as $n$ gets large, the fraction of $|{S}_{n}|$ consisting of relatively prime pairs of positive integers tends to $6/{\pi}^{2}$.

## References

- 1 Challenging Mathematical Problems with Elementary Solutions, A.M. Yaglom and I.M. Yaglom, Vol. 1, Holden-Day, 1964. (See Problems 92 and 93)

Title | probability that two positive integers are relatively prime |
---|---|

Canonical name | ProbabilityThatTwoPositiveIntegersAreRelativelyPrime |

Date of creation | 2013-03-22 14:56:08 |

Last modified on | 2013-03-22 14:56:08 |

Owner | mps (409) |

Last modified by | mps (409) |

Numerical id | 21 |

Author | mps (409) |

Entry type | Result |

Classification | msc 11A41 |

Classification | msc 11A05 |

Classification | msc 11A51 |