Quantcast
Channel: Active questions tagged real-analysis - Mathematics Stack Exchange
Viewing all articles
Browse latest Browse all 9169

Proof of logarithmic equality with floor and ceiling

$
0
0

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:

enter image description here

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$.


Viewing all articles
Browse latest Browse all 9169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>