Convergent denominator (source code)

= Convergent denominator
{title2=$q_k$}

For the <continued fraction convergent> $p_k/q_k=[a_0;a_1,\ldots,a_k]$ in lowest terms, $q_k>0$ is its <convergent denominator>. With $q_{-2}=1$ and $q_{-1}=0$, it satisfies $q_k=a_kq_{k-1}+q_{k-2}$.

For $[1;2,2,\ldots]=\sqrt2$, the first denominators are $1,2,5,12,29$. Their growth measures the increasing cost of representing a better <best rational approximation>. The <determinant> identity $p_kq_{k-1}-p_{k-1}q_k=(-1)^{k-1}$ proves that neighboring <continued fraction convergents> are reduced and tightly linked; in particular, their difference has absolute value $1/(q_kq_{k-1})$.