Suppose we are given a continued fraction $$\frac{p}{q}=a_{1}+\frac{1}{a_{2}+\frac{1}{a_{3}+\frac{1}{a_{4}+\cdots}}}$$
I am trying to find an expression, possibly asymptotic, for the sum of the $a_i$'s for a given $\frac{p}{q}$.
I understand that this is related to the Stern-Brocot tree. In particular, our problem is equivalent to finding on which row does the fraction $\frac{p}{q}$ first appear in the Stern-Brocot tree.
Are there any results to this problem?
https://www.cut-the-knot.org/blue/ContinuedFractions.shtml
Has a nice explanation of the coefficients of a CF, $a_i$.
They can be thought of as the number of left/right branches in the Stern-Brocot tree required to traverse to the position you want. As you point out yourself, the sum of these $a_i's$ (minus 1) is the Row number in the SB tree. So, in a way, you already answered your own question?