3 votesby math.stackexchange.com/users/1052728written 2022-04-29last updated 2022-05-03
(The previous answer only gave one of the two bounds correctly, the other bound was the fraction itself. Here is a corrected version:)
Let
$$
\frac{p_n}{q_n} = [a_0; a_1, \ldots, a_{n-1}, a_n] \\
\frac{p_{n-1}}{q_{n-1}} = [a_0; a_1, \ldots, a_{n-1}]\:\qquad \\
$$
Then $\frac{p_n}{q_n}$ is a convergent of a real number $\alpha\in\mathbb R$ if and only if
$$
\alpha\text{ is strictly between }\frac{p_n+p_{n-1}}{q_n+q_{n-1}}\text{ and }\frac{2p_n-p_{n-1}}{2q_n-q_{n-1}}
\tag{1}\label{bounds}
$$
Proof: Note that
$$
\frac{p_n}{q_n} = [a_0; a_1, \ldots, a_n] = [a_0; a_1, \ldots, a_n-1, 1]
$$
so we can assume $a_n>1$ w.l.o.g.
For the first bound, note that any $\alpha = [a_0; a_1, \ldots, a_n, \beta]$ will have $a_0; a_1, \ldots, a_n$ as its first quotients (and thus $\frac{p_n}{q_n}$ as its $n^{\text{th}}$ convergent) as long as $\beta > 1$. As $\beta$ grows to $\infty$, we will approach $\frac{p_n}{q_n}$, so the furthest we can get away from $\frac{p_n}{q_n}$ is with $\beta=1$. Here,
$$
\lim_{\beta\searrow1}[a_0; a_1, \ldots, a_n, \beta] = [a_0; a_1, \ldots, a_n, 1] = \frac{p_n+p_{n-1}}{q_n+q_{n-1}}
\tag{2}\label{bound1}
$$
is the first number that will not have $\frac{p_n}{q_n}$ as convergent anymore, because $[a_0; a_1, \ldots, a_n, 1] = [a_0; a_1, \ldots, a_n+1]$ has a different list of first quotients (this is the bound that was correct in the previous answer).
For the other bound, we have to go in the other direction, which we do by starting from $\frac{p_n}{q_n}=[a_0; a_1, \ldots, a_n-1, 1]$. Here, any $\alpha = [a_0; a_1, \ldots, a_n-1, 1, \beta]$ will have $a_0; a_1, \ldots, a_n-1, 1$ as its first quotients (and thus $\frac{p_n}{q_n}$ as its $(n+1)^{\text{th}}$ convergent!) as long as $\beta>1$. As $\beta$ grows to $\infty$, we will approach $\frac{p_n}{q_n}$, so the furthest we can get away from $\frac{p_n}{q_n}$ is with $\beta=1$. Here,
$$
\lim_{\beta\searrow1}[a_0; a_1, \ldots, a_n-1, 1, \beta]=[a_0; a_1, \ldots, a_n-1, 1, 1] = [a_0; a_1, \ldots, a_n-1, 2] = \frac{2p_n-p_{n-1}}{2q_n-q_{n-1}}
\tag{3}\label{bound2}
$$
is the first number that will not have $\frac{p_n}{q_n}$ as convergent anymore (this is the bound that was wrong in the previous answer, because it only considered numbers $\alpha$ that have $\frac{p_n}{q_n}$ as their $n^{\text{th}}$ convergent and not those that have $\frac{p_n}{q_n}$ as their $(n+1)^{\text{th}}$ convergent towards the bound in the other direction).
Example:
We try to find all $\alpha\in\mathbb R$ that have
$$
\frac{4}{9} = 0+\frac1{2+\frac1 4} = [0;2,4] = [0;2,3,1]
\tag{4}\label{example}
$$
as convergent. Computing the above bounds and a few numbers in between:
Number
Continued fraction
List of convergents
Eq.
$\frac{7}{16}=0.4375$
$[0; 2, 3, 2]$
$0, \frac1 2, \frac3 7, \frac7 {16}$
\eqref{bound2}
$\frac{11}{25}=0.44$
$[0; 2, 3, 1, 2]$
$0, \frac1 2, \frac3 7, \frac4 9, \frac{11}{25}$
$\frac{15}{34}=0.44176...$
$[0; 2, 3, 1, 3]$
$0, \frac1 2, \frac3 7, \frac4 9, \frac{15}{34}$
$\frac{4}{9}=0.44444...$
$[0; 2, 4]$
$0, \frac1 2, \frac4 9$
\eqref{example}
$\frac{9}{20}=0.45$
$[0; 2, 4, 2]$
$0, \frac1 2, \frac4 9, \frac9 {20}$
$\frac{5}{11}=0.45454...$
$[0; 2, 5]$
$0, \frac1 2, \frac5 {11}$
\eqref{bound1}
The first line is the exclusive (lower) bound \eqref{bound2}, and the last line is the exclusive (upper) bound \eqref{bound1}. All $\alpha\in(\frac 7 {16},\frac 5 {11})$ will have $\frac 4 9$ as convergent. Note that it can either be the second or the third convergent.
Remarks:
If $n$ is even, the first bound in \eqref{bounds} will be an upper bound and the second will be a lower bound. If $n$ is odd, this is reversed.
This statement can also be found on Wikipedia, although in a slightly different representation (at the time this answer was written) where $a_n$ is defined as $a_k+1$.