Question: How can I prove that, for $a,b \in \mathbb{Z}$ we have $$ 0 \leq \left \lfloor{\frac{2a}{b}}\right \rfloor - 2 \left \lfloor{\frac{a}{b}}\right \rfloor \leq 1 \, ? $$ Here, $\left \lfloor\,\right \rfloor$ is the [floor](http://mathworld.wolfram.com/FloorFunction.html) function. I tried the following: say that $\frac{2a}{b} = x$, and $ \left \lfloor{\frac{2a}{b}}\right \rfloor = m$, with $0 \leq x - m \leq 1$. I tried the same for $ 2 \left \lfloor{\frac{2a}{b}}\right \rfloor $, and then combining the two inequalities. It did not seem to help, though.

Answer: 
In general
$$
0\le \lfloor 2x\rfloor -2\lfloor x\rfloor\le 1.
$$
Proof. Either $x\in [k,k+1/2)$ or $x\in [k+1/2,k+1)$, for some $k\in\mathbb Z$.

If $x\in [k,k+1/2)$, then
$$
 \lfloor 2x\rfloor=2k\quad\text{and}\quad 2\lfloor x\rfloor=2k,
$$
while $x\in [k+1/2,k+1)$, for some $k\in\mathbb Z$, then
$$
\lfloor 2x\rfloor=2k+1\quad\text{and}\quad 2\lfloor x\rfloor=2k.
$$
So the inequalities hold in both cases.
$0 \leq \left \lfloor{\frac{2a}{b}}\right \rfloor \leq \frac{2\*a}{b} < 2\*(\left \lfloor{\frac{a}{b}}\right \rfloor + 1)$ = $2\*\left \lfloor{\frac{a}{b}}\right \rfloor$ + 2

$\left \lfloor{\frac{2a}{b}}\right \rfloor$ is an integer, so being < than an other integer means being $\leq$ than this integer -1 

=> $\left \lfloor{\frac{2a}{b}}\right \rfloor$ $\leq $ $2\*\left \lfloor{\frac{a}{b}}\right \rfloor$ + 1

**Edit:**

As for the other part of the inequality:

$$\frac{2a}{b}= 2\left \lfloor{\frac{a}{b}}\right \rfloor + 2(\frac{a}{b}) $$ with $(x)$ being the fractional part of $x$.

All that's left to consider is whether $2(\frac{a}{b})$ is smaller or greater than $1$ to conclude.