I have to prove the following identity:
$$\left\lfloor \log _2(n)\right\rfloor\equiv\left\lceil \log _2(n+1)-1\right\rceil$$
Each side is defined for all $n>0\colon n\in\mathbb{Z}$. So, when plotting both sides, they seem to be equal:
For example, the $\left\lceil \log _2(n+1)-1\right\rceil$ side returns a very similar value for the logarithm, but as it decreases in one unit and performs ceiling, it rounds to the same integer as the floor of the logarithm. However, I can't find a way to prove it right for every valid $n$.