Considering this equation $N=2^r-r-1, N \in \mathbb{N},r \in \mathbb{N}$. I've tried (unsuccesfully) working out $r$ given $N$.
However I recently stumbled across a website which was using $\left \lfloor{\log_2{N}+1}\right \rfloor $ to find the $r$ which indeed works. Can anyone elaborate as to why this is? How did they arrive to that?
Assuming that there is an integer $r$ that works, then $N$ is slightly smaller than $2^r$, which means that $\log_2 N$ is slightly smaller than $r$. $\lfloor \log_2 N +1\rfloor$ is the next integer up. They're presumably not using $\lceil \log_2 N\rceil$ since that gives the wrong answer in the lowest cases.