The problem is IV-3 of this pdf: potential function.
Defining a potential function as $\Phi(i) = 2i - 2^{\lfloor{\log_2i}\rfloor+1} + 1$
The solution states that if $i$ is not an exact power of $2$, we have:
$$\Phi(i) = 2i - i + 1 .$$
This means that $2^{\lfloor{\log_2i}\rfloor+1} = i$. I'm having some trouble understanding this equality.
Can somebody shed some light?