Prove that if n is odd then $\lfloor(\log_2(n))\rfloor=\lfloor(\log_2(n-1))\rfloor$. I tried to substitute $n=2k+1$ but it didn't help me in any way.
2026-04-02 19:54:32.1775159672
Equality with floor function and logarithm
2.2k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
One nice way to prove this is to use $$ \tag{0} n = m \;\equiv\; \langle \forall k :: k \le n \equiv k \le m \rangle \\ $$ and $$ \tag{1} k \le \left\lfloor x \right\rfloor \;\equiv\; k \le x \\ $$ where $\;n,m,k\;$ are integers and $\;x\;$ is real.
First use $(1)$ to prove that $\;k \le \left\lfloor \log_2 n \right\rfloor \;\equiv\; 2^k \le n\;$, and $\;k \le \left\lfloor \log_2 (n-1) \right\rfloor \;\equiv\; 2^k < n\;$. Then connect those two using the fact that $\;n\;$ is odd and $\;>1\;$, and finally use $(0)$ to wrap it all up.