<s>[INST] Function that maps the "pureness" of a rational number? By pureness I mean a number that shows how much the numerator and denominator are small.
E.g. $\frac{1}{1}$ is purest, $\frac{1}{2}$ is less pure (but the same as $\frac{2}{1}$), $\frac{2}{3}$ is less pure than the previous examples, $\frac{53}{41}$ is worse, .... $\pi$ isn't pure at all (as well as e...).
 [/INST] You can take,
$$\frac{a}{b}\mapsto \frac{a+b}{\gcd(a,b)},$$
Note that this is independent of the choice of representative since $\gcd(na,nb)=n\gcd(a,b)$ for non-negative integers $n$.
For your examples,
$$\frac{1}{1}\mapsto 2,\quad \frac{1}{2}\mapsto 3,\quad\frac{2}{3}\mapsto 5,\quad\frac{53}{41}\mapsto 94.$$
Another possibility is
$$\frac{a}{b}\mapsto \frac{ab}{(\gcd(a,b))^2},$$
which yields
$$\frac{1}{1}\mapsto 1,\quad\frac{1}{2}\mapsto 2,\quad\frac{2}{3}\mapsto 6,\quad\frac{53}{41}\mapsto 2173.$$
Both these "pureness" functions have the property that $a/b$ is as pure as $b/a$, as we would expect.
The following table shows how the first choice partitions the positive rationals into "pureness classes". Each row corresponds to rationals of the same pureness.
$$
\begin{align}
& \frac{1}{1} \\
& \frac{1}{2}\quad\frac{2}{1} \\
& \frac{1}{3}\quad\frac{3}{1} \\
& \frac{1}{4}\quad\frac{2}{3}\quad\frac{3}{2}\quad\frac{4}{1} \\
& \frac{1}{5}\quad\frac{5}{1} \\
& \frac{1}{6}\quad\frac{2}{5}\quad\frac{3}{4}\quad\frac{4}{3}\quad\frac{2}{5}\quad\frac{6}{1} \\
& \frac{1}{7}\quad\frac{3}{5}\quad\frac{5}{3}\quad\frac{7}{1} \\
& \frac{1}{8}\quad\frac{2}{7}\quad\frac{4}{5}\quad\frac{5}{4}\quad\frac{7}{2}\quad\frac{8}{1} \\
& \frac{1}{9}\quad\frac{3}{7}\quad\frac{7}{3}\quad\frac{9}{1} \\
& \frac{1}{10}\quad\frac{2}{9}\quad\frac{3}{8}\quad\frac{4}{7}\quad\frac{5}{6}\quad\frac{6}{5}\quad\frac{7}{4}\quad\frac{8}{3}\quad\frac{9}{2}\quad\frac{10}{1}
\end{align}
$$
</s>