How I can solve this equation with respect to the variable $t$?

292 Views Asked by At

How I can solve this equation with respect to the variable $t$?

$$\left\lfloor{\frac{\ln(t+1)}{\ln 2}}\right\rfloor=\left\lfloor{\frac{\ln t}{\ln2}}\right\rfloor+1$$

where $\left\lfloor {y} \right\rfloor$ is the integer part of $y$.

I have no idea to start.

1

There are 1 best solutions below

5
On BEST ANSWER

$\frac{\ln(x)}{ \ln(a)} = \log_a(x)$. So your equation is $$ \lfloor \log_2(t+1)\rfloor = \lfloor \log_2(t) \rfloor + 1 $$ That means that $t+1$ must be a little bigger than a power of 2, and $t$ must be a little less. For instance, $t = 31.5$ works fine. I guess the general solution is any value $t$ satisfying

$2^i - 1 \le t < 2^i$ for $i = 0, 1, 2, \ldots$, except for $t = 0$, where the $\log$ doesn't make sense.