Is the sum of the continued fraction sequence / number of steps in Euclid algorithm a metric?

27 Views Asked by At

It seems to me that the sum of the continued fraction sequence minus one can serve as a metric on positive rational numbers.

Given a positive rational number $q=[a_0, a_1, ...]=a_0+\frac{1}{a_1+\dots}$, let us define the following "distance" from 1: $$d(q,1)=\sum_k a_k -1$$ Note that for $q=\frac{a}{b}$, this number $d(q,1)$ is essential the number of steps in Euclid algorithm for the integers $a, b$.

The distance between two numbers $q, q'\in \mathbb{Q}^+$ is as follows: $$d(q,q')=d(q/q',1)$$

Is $d$ a metric on $\mathbb{Q}^+$? Does the triangle inequality $d(q,q'')\leq d(q,q')+d(q',q'')$ hold?