On the Glide of the 3x+1 Problem

For any positive integer $n$, define an iterated function $$ f(n)=\left\{\begin{array}{ll} n/2, & \mbox{$n$ even,} \\ 3n+1, & \mbox{$n$ odd.} \end{array} \right. $$ Suppose $k$ (if it exists) is the lowest number such that $f^{k}(n)<n$, and there are $O(n)$ "multiply by three and add one" and $E(n)$ "divide by two" from $n$ to $f^{k}(n)$, then there must be $$ 2^{E(n)-1}<3^{O(n)}<2^{E(n)}. $$ Our results confirm the conjecture proposed by Terras in 1976.