# Taking Rational Numbers at Random

^{†}

*AppliedMath*

**2023**,

*3*(3), 648-663; https://doi.org/10.3390/appliedmath3030034 (registering DOI)

## Abstract

**:**

## 1. Introduction

## 2. Probability on Rational Numbers

## 3. Distributions on ${\mathbb{Q}}_{0}$

## 4. Equiprobable Numerators

## 5. Asymptotic Equiprobability

**Lemma**

**1.**

**Proof.**

**Theorem**

**1.**

**Proof.**

## 6. Denominator Distributions

#### 6.1. Geometric Denominators

#### 6.2. Poisson and Equiprobable Denominators

## 7. Final Remarks: Sequencing Rational Numbers

**${\mathit{\nu}}_{\mathit{m}}\le \mathit{m}-\mathbf{1}$ for $\mathit{m}\ge \mathbf{2}$**: in our table $n=0$ and $n=m$ are accepted only for $m=1$ so that, in every row with $m\ge 2$, the first and last number are always missing; then, apparently, ${\nu}_{m}=(m+1)-2=m-1$; in particular,**${\mathit{\nu}}_{\mathit{m}}=\mathit{m}-\mathbf{1}$ only, for $\mathit{m}$ prime number**.**For $\mathit{m}\ge \mathbf{3}$, if $\mathit{n}=\mathit{k}\ge \mathbf{1}$ is accepted, then $\mathit{n}=\mathit{m}-\mathit{k}\le \mathit{m}-\mathbf{1}$ is also accepted**because, if ${}^{k}{/}_{m}$ is irreducible, then ${}^{(m-k)}{/}_{m}=1-\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{k}{/}_{m}$ is also irreducible, namely, the accepted values always show up in pairs; in particular, since $n=1$ is always accepted, then $n=m-1$ is also always accepted, and hence,**${\mathit{\nu}}_{\mathit{m}}\ge \mathbf{2}$ for $\mathit{m}\ge \mathbf{3}$**(the two numbers coincide for $m=2$, so that ${\nu}_{2}=1$).**${\mathit{\nu}}_{\mathit{m}}$ always is an even number for $\mathit{m}\ge \mathbf{3}$**because, according to point 2, the accepted numerators n always show up in pairs; moreover,**if $\mathit{m}\ge \mathbf{3}$ is even, then $\mathit{n}=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{\mathit{m}}{/}_{\mathbf{2}}$ is not accepted**because, for $m=2\ell $ (and $\ell \ge 2$), the numerator would be $n=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{m}{/}_{2}=\ell $, and ${}^{n}{/}_{m}=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{\ell}{/}_{2\ell}$ would be a reducible fraction.**For $\mathit{m}\ge \mathbf{3}$, the sum of an accepted pair always is $\mathbf{1}$**because we are adding ${}^{k}{/}_{m}$ and ${}^{(m-k)}{/}_{m}=1-\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{k}{/}_{m}$; as a consequence,**the sum of the irreducible fractions sharing a common denominator $\mathit{m}$ is ${\mathit{\sigma}}_{\mathit{m}}=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{{\mathit{\nu}}_{\mathit{m}}}{/}_{\mathbf{2}}$**because there are ${\phantom{\rule{0.166667em}{0ex}}}^{{\nu}_{m}}{/}_{2}$ accepted pairs; looking, moreover, at Table 3, we see that this last result also holds for $m=1$ (${\nu}_{1}=2,\phantom{\rule{0.166667em}{0ex}}{\sigma}_{1}=1$) and $m=2$ (${\nu}_{2}=1,\phantom{\rule{0.166667em}{0ex}}{\sigma}_{2}=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{1}{/}_{2}$).

## 8. Conclusions (Written by Giovanni M. Cicuta)

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## Reference

- Gradshteyn, I.S.; Ryzhik, I.M. Table of Integrals, Series and Products; Academic Press: Burlington, VT, USA, 2007. [Google Scholar]

**Figure 1.**Probabilities (17) attributed to rational numbers as a function of the irreducible, geometrically distributed denominators m, and for decreasing ($0.9,0.5,0.1,0.01,0.001$) values of w: by choosing different m intervals, the pictures show how these probabilities level down to infinitesimal equiprobability for $w\to 0$.

**Figure 2.**Numerosity ${\nu}_{m}$ of the different rational numbers $q\doteq \phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{n}{/}_{m}$ sharing a common, irreducible denominator m.

**Figure 3.**Typical histogram of the relative frequencies of a sample of ${10}^{5}$ random rationals generated following the procedure described in Section 6.2: here, the maximum value of the equiprobable denominators is chosen to be $k={10}^{5}$.

**Table 1.**Table of rational numbers $q=\phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{n}{/}_{m}$ with repetitions: many fractions are reducible to canonical forms already present in earlier positions.

n | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

$\mathit{m}$ | $\mathbf{0}$ | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ | $\mathbf{6}$ | $\mathbf{7}$ | $\mathbf{8}$ | … |

1 | 0 | 1 | ||||||||

2 | 0 | ${}^{1}{/}_{2}$ | 1 | |||||||

3 | 0 | ${}^{1}{/}_{3}$ | ${}^{2}{/}_{3}$ | 1 | ||||||

4 | 0 | ${}^{1}{/}_{4}$ | ${}^{2}{/}_{4}$ | ${}^{3}{/}_{4}$ | 1 | |||||

5 | 0 | ${}^{1}{/}_{5}$ | ${}^{2}{/}_{5}$ | ${}^{3}{/}_{5}$ | ${}^{4}{/}_{5}$ | 1 | ||||

6 | 0 | ${}^{1}{/}_{6}$ | ${}^{2}{/}_{6}$ | ${}^{3}{/}_{6}$ | ${}^{4}{/}_{6}$ | ${}^{5}{/}_{6}$ | 1 | |||

7 | 0 | ${}^{1}{/}_{7}$ | ${}^{2}{/}_{7}$ | ${}^{3}{/}_{7}$ | ${}^{4}{/}_{7}$ | ${}^{5}{/}_{7}$ | ${}^{6}{/}_{7}$ | 1 | ||

8 | 0 | ${}^{1}{/}_{8}$ | ${}^{2}{/}_{8}$ | ${}^{3}{/}_{8}$ | ${}^{4}{/}_{8}$ | ${}^{5}{/}_{8}$ | ${}^{6}{/}_{8}$ | ${}^{7}{/}_{8}$ | 1 | |

⋮ | ⋮ | ⋱ |

**Table 2.**Table of rational numbers $q\doteq \phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{n}{/}_{m}$ without repetitions: only irreducible fractions are represented, along with the number ${\nu}_{m}$ of the different rationals sharing a common irreducible denominator m.

n | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

${\mathit{\nu}}_{\mathit{m}}$ | $\mathit{m}$ | $\mathbf{0}$ | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ | $\mathbf{6}$ | $\mathbf{7}$ | … |

2 | 1 | 0 | 1 | |||||||

1 | 2 | ${}^{1}{/}_{2}$ | ||||||||

2 | 3 | ${}^{1}{/}_{3}$ | ${}^{2}{/}_{3}$ | |||||||

2 | 4 | ${}^{1}{/}_{4}$ | ${}^{3}{/}_{4}$ | |||||||

4 | 5 | ${}^{1}{/}_{5}$ | ${}^{2}{/}_{5}$ | ${}^{3}{/}_{5}$ | ${}^{4}{/}_{5}$ | |||||

2 | 6 | ${}^{1}{/}_{6}$ | ${}^{5}{/}_{6}$ | |||||||

6 | 7 | ${}^{1}{/}_{7}$ | ${}^{2}{/}_{7}$ | ${}^{3}{/}_{7}$ | ${}^{4}{/}_{7}$ | ${}^{5}{/}_{7}$ | ${}^{6}{/}_{7}$ | |||

4 | 8 | ${}^{1}{/}_{8}$ | ${}^{3}{/}_{8}$ | ${}^{5}{/}_{8}$ | ${}^{7}{/}_{8}$ | |||||

⋮ | ⋮ | ⋮ | ⋱ |

**Table 3.**Table of rational numbers $q\doteq \phantom{\rule{0.166667em}{0ex}}{\phantom{\rule{-0.166667em}{0ex}}}^{n}{/}_{m}$ without repetitions, along with the progressive number ${\nu}_{m}$ of the different rationals sharing a common irreducible denominator m, and their sums ${\sigma}_{m}$.

n | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

${\mathit{\sigma}}_{\mathit{m}}$ | ${\mathit{\nu}}_{\mathit{m}}$ | $\mathit{m}$ | $\mathbf{0}$ | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ | $\mathbf{5}$ | $\mathbf{6}$ | $\mathbf{7}$ | $\mathbf{8}$ | $\mathbf{9}$ | $\mathbf{10}$ |

1 | 2 | 1 | 0 | 1 | |||||||||

${}^{1}{/}_{2}$ | 1 | 2 | ${}^{1}{/}_{2}$ | ||||||||||

1 | 2 | 3 | ${}^{1}{/}_{3}$ | ${}^{2}{/}_{3}$ | |||||||||

1 | 2 | 4 | ${}^{1}{/}_{4}$ | ${}^{3}{/}_{4}$ | |||||||||

2 | 4 | 5 | ${}^{1}{/}_{5}$ | ${}^{2}{/}_{5}$ | ${}^{3}{/}_{5}$ | ${}^{4}{/}_{5}$ | |||||||

1 | 2 | 6 | ${}^{1}{/}_{6}$ | ${}^{5}{/}_{6}$ | |||||||||

3 | 6 | 7 | ${}^{1}{/}_{7}$ | ${}^{2}{/}_{7}$ | ${}^{3}{/}_{7}$ | ${}^{4}{/}_{7}$ | ${}^{5}{/}_{7}$ | ${}^{6}{/}_{7}$ | |||||

2 | 4 | 8 | ${}^{1}{/}_{8}$ | ${}^{3}{/}_{8}$ | ${}^{5}{/}_{8}$ | ${}^{7}{/}_{8}$ | |||||||

3 | 6 | 9 | ${}^{1}{/}_{9}$ | ${}^{2}{/}_{9}$ | ${}^{4}{/}_{9}$ | ${}^{5}{/}_{9}$ | ${}^{7}{/}_{9}$ | ${}^{8}{/}_{9}$ | |||||

2 | 4 | 10 | ${}^{1}{/}_{10}$ | ${}^{3}{/}_{10}$ | ${}^{7}{/}_{10}$ | ${}^{9}{/}_{10}$ | |||||||

5 | 10 | 11 | ${}^{1}{/}_{11}$ | ${}^{2}{/}_{11}$ | ${}^{3}{/}_{11}$ | ${}^{4}{/}_{11}$ | ${}^{5}{/}_{11}$ | ${}^{6}{/}_{11}$ | ${}^{7}{/}_{11}$ | ${}^{8}{/}_{11}$ | ${}^{9}{/}_{11}$ | ${}^{10}{/}_{11}$ | |

⋮ | ⋮ | ⋮ | ⋮ | ⋮ |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cufaro Petroni, N.
Taking Rational Numbers at Random. *AppliedMath* **2023**, *3*, 648-663.
https://doi.org/10.3390/appliedmath3030034

**AMA Style**

Cufaro Petroni N.
Taking Rational Numbers at Random. *AppliedMath*. 2023; 3(3):648-663.
https://doi.org/10.3390/appliedmath3030034

**Chicago/Turabian Style**

Cufaro Petroni, Nicola.
2023. "Taking Rational Numbers at Random" *AppliedMath* 3, no. 3: 648-663.
https://doi.org/10.3390/appliedmath3030034