Let $\alpha$ be a positive real number. Does it make sense to define the closest rational to $\alpha$ as the number $R(\alpha)=\frac{p_1}{p_2}$ such that $p_1,p_2$ are positive co-prime integers minimizing $p_2 \cdot |p_2\alpha - p_1|$? Clearly, there are going to be some irrational numbers for which this makes no sense, for instance $\alpha=\frac{1+\sqrt{5}}{2}$. My guess is that such numbers are rare: there are countably infinitely many of them, or their set has Lebesgue measure 0. Do we have $R(\pi) = \frac{355}{113}$? I looked at the fist 12 convergents of $\pi$, and $\frac{355}{113}$ achieves the minimum.

This is related to approximations of irrational numbers, continued fractions, and the irrationality measure of a number. More generally, we could define the closest algebraic number of degree $d$, as the number $R_d(\alpha)$ defined as follows.

$$P^*= \arg\min_P\Big(H(P)\Big)^{\mu(d)}\cdot |P(\alpha)|,\\ R_d(\alpha) = \Big(H(P^*)\Big)^{\mu(d)}\cdot |P^*(\alpha)| $$

where $P$ is any polynomial of degree $d$ with integer coefficients, with highest and lowest coefficients not equal to $0$, and $H(P)$ is the height of $P$, that is, its highest coefficient in absolute value. To make this work for most $\alpha$, how should we choose $\mu(d)$? Does $\mu(d)=d$ work? It seems to work if $d=1$.

As of now, as far as I know, all results involving $d>1$ are conjectures. Related material includes the Wirsing conjecture. See also the "Generalizations" section in the Wikipedia article on Roth's theorem, here.

Update on Feb 8, 2021: It is possible that the best approximation, if $d$ is an even integer, may be a complex number. Also, see my new question here, about approximations by dyadic fractions. The plan is to look at approximations using the first $n$ digits of $\alpha\in [0, 1]$ in base $b$, where (say) $b=\sqrt{2}$, focusing on values of $n$ where a long run of zeros start, leading to approximations of transcendental numbers by quadratic irrationals. This is briefly discussed in the comments in my new question.

  • $\begingroup$ It would be interesting to see which real numbers $\alpha$ have $R(\alpha)=R(\pi)$, assuming $R(\pi)$ exists. $\endgroup$ Commented Feb 4, 2021 at 20:11
  • $\begingroup$ Since every countable set has measure 0, saying "either X is countable, or X has measure 0" is kind of redundant (and either-or reads to me, as a non-native speaker anyway, as a dichotomy, so exactly one of the options is true). $\endgroup$
    – Asaf Karagila
    Commented Feb 5, 2021 at 11:13
  • $\begingroup$ @Asaf: unless I am mistaken, a set can have measure 0 yet be non countable. For instance, consider the set of all real numbers and their representation in base 2. For each real, add a 0 in the binary digits in positions 1, 3, 5, and so on. The transformed numbers are in bijection with real numbers, but none of them is a normal number. So it is an (uncountable) subset of non-normal numbers. And non-normal numbers have measure 0, so that set also has measure 0. $\endgroup$ Commented Feb 5, 2021 at 16:43
  • $\begingroup$ Yes, but you're not reading my [previous] comment. $\endgroup$
    – Asaf Karagila
    Commented Feb 5, 2021 at 16:43
  • $\begingroup$ I'll try to fix my wording, but true, I am not a native speaker. $\endgroup$ Commented Feb 5, 2021 at 16:45

1 Answer 1


Let $\alpha$ be an irrational. We shall consider its continued fraction $[a_0;a_1,a_2,\dots]$. Recall some basic results about convergents of continued fractions (see e.g. here): letting $p_n,q_n$ be the sequence of numerators and denominators of convergents, for any $n>1$ we have $q_{n+1}=a_{n+1}q_n+q_{n-1}>a_{n+1}q_n$ and $$\left|\alpha-\frac{p_n}{q_n}\right|<\frac{1}{q_nq_{n+1}}<\frac{1}{a_{n+1}q_n^2},$$ hence $q_n|q_n\alpha-p_n|<\frac{1}{a_{n+1}}$. Therefore if $a_{n+1}$ are unbounded, then $q_n|q_n\alpha-p_n|$ does not attain a minimum. Therefore $R(\alpha)$ does not exist for those $\alpha$.

Therefore $R(\alpha)$ can only exist for badly approximable numbers. It is known that those numbers form a set of measure zero, and most natural constants besides quadratic irrationalities, including $\pi$ and all higher degree algebraic irrationals, are conjectured to not lie in it. Therefore $R(\pi)$ probably doesn't exist.

On the other hand, if $\alpha$ is badly approximable, then this still doesn't necessarily mean $R(\alpha)$ necessarily exists, as you note with $\alpha=\frac{1+\sqrt{5}}{2}$. In fact I believe it won't exist for any quadratic irrational. However, using the bound $$\left|\alpha-\frac{p_n}{q_n}\right|>\frac{1}{q_n(q_{n+1}+q_n)}>\frac{1}{(a_{n+1}+2)q_n^2},$$ we at the very least get that for those numbers the quantity $q_n|q_n\alpha-p_n|$ is bounded away from zero (note that $q|q\alpha-p|$ can only be smaller than $1/2$ if $p/q$ is a convergent, so we don't lose much from looking at just looking at convergents).

Last remark I have is that there are uncountably many $\alpha$ for which $R(\alpha)$ exists. Indeed, from the above considerations it follows easily that this is the case if for some $N$ we have that the continued fraction of $\alpha$ contains a partial denominator $N$, but from some point on all denominators are at most $N-2$.

  • 4
    $\begingroup$ The famously accurate approximation $\pi\approx\frac{355}{113}$ comes from the 5th partial denominator of $\pi$, equal to 292, being exceptionally large. According to OEIS the next largest one occurs at position 308 and is equal to 436. So you would need to do a lot of computation to actually realize $R(\pi)\neq \frac{355}{113}$. $\endgroup$
    – Wojowu
    Commented Feb 4, 2021 at 20:57
  • $\begingroup$ Thank you for the great insights. I was wondering if there might be a function $f(q)$ such that minimizing $f(q) |q\alpha -p|$ works for most $\alpha$. If $f(q)=q$ does not work, I would think $f(q)=q^3$ would work, but then the best approximation might be the first convergent, which is useless. It has to be something like $f(q)=q^\nu$ with $\nu>1$ as small as possible. $\endgroup$ Commented Feb 4, 2021 at 23:52
  • 3
    $\begingroup$ Almost all numbers have irrationality measure $2$, and so as long as $f(q)$ grows at least as fast as $q^\nu$ for any $\nu>1$ (indeed, weaker conditions suffice), then $R(\alpha)$ will be defined for almost all $\alpha$. I believe that for any such $f$ and any $n$, the set of $\alpha$ with $R(\alpha)$ equal to the $n$-th convergent will have positive measure. $\endgroup$
    – Wojowu
    Commented Feb 5, 2021 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.