Representing all rational numbers between $\dfrac{1}{2}$ and $1$ How do I show that
$$\dfrac{2^{\left\lfloor\frac12 a_1\right\rfloor} + 2^{\left\lfloor\frac12 a_2\right\rfloor}  + \ldots + 2^{\left\lfloor\frac12 a_n \right\rfloor}}{2^{\left\lceil\frac12 a_1\right\rceil} + 2^{\left\lceil\frac12 a_2\right\rceil} + \ldots + 2^{\left\lceil\frac12 a_n \right\rceil}}$$
represents all rationals between $\dfrac{1}{2}$ and $1$, where $a_1, a_2, \ldots, a_n \in \mathbb{N}$?
I have tried representing few rationals such as $\dfrac{7}{8}$ and $\dfrac{5}{8}$ and it seems like we can represent all of them. However I'm not completely sure why and don't have a rigorous proof.
For example
$$\dfrac{5}{8} = \dfrac{2^{\left\lfloor\frac12 3\right\rfloor} + 2^{\left\lfloor\frac12 4\right\rfloor}  + 2^{\left\lfloor\frac12 5 \right\rfloor}}{2^{\left\lceil\frac12 3\right\rceil} + 2^{\left\lceil\frac12 4\right\rceil} + 2^{\left\lceil\frac12 5 \right\rceil}}$$
$$\dfrac{7}{8} = \dfrac{2^{\left\lfloor\frac12 1\right\rfloor} + 2^{\left\lfloor\frac12 2\right\rfloor}  + 2^{\left\lfloor\frac12 4 \right\rfloor}}{2^{\left\lceil\frac12 1\right\rceil} + 2^{\left\lceil\frac12 2\right\rceil} + 2^{\left\lceil\frac12 4 \right\rceil}}$$
Any help would be highly appreciated. Thanks

There is an argument using the Farey tree. Briefly, the Farey algorithm fills in rational numbers between $x = \frac{p}{q}$ and $y = \frac{r}{s}$ by
$\frac{p+r}{q+s}$ (and so on recursively) [What some have called the Bart Simpson addition of fractions). The basic fact is that if you start with $\frac12$ and $1,$ the next number you generate is $\frac{1+1}{1+2} = \frac23,$ the next two are $\frac12 + \frac23$ and $\frac23 +1$ (where + is the Bart Simpson sum), this procedure will generate all the rational numbers in the interval $[\frac12, 1].$
It is not hard to see that numbers as in the OP behave nicely with respect to the Bart Simpson addition: if $x$ and $y$ both have an $a_i,$ then their Bart Simpson sum has $a_i+2.$ It also needs to be checked that $\frac12$ and $1$ can be represented, but that is easy. So, to summarize, the bart simpson sum of two numbers having the required representation also has the required representation, which gives both a proof and an algorithm to construct the representation.
