- I have an equation where I am solving for n:$$\lfloor x/2^n \rfloor \bmod 2 = 0$$
- The best I can work it is:$$\lfloor x/2^n \rfloor /2 = \lfloor x/(2^n*2) \rfloor$$
- Witch is the same as:$$\lfloor x/2^n \rfloor/2\le x/(2^n*2)\lt\lfloor x/2^n \rfloor/2+1$$
- And I think can be:$$\lfloor x/2^n \rfloor\le x/2^n\lt\lfloor x/2^n \rfloor+2$$
- Another equation that would be easy for me to use is:$$\lfloor a/bc \rfloor \bmod2=0$$
- solving for b or c
2026-04-03 05:33:19.1775194399
Solve equation containing Mod and Floor functions
375 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
From $\lfloor x/2^n \rfloor mod 2 = 0$, put $\lfloor x/2^n \rfloor = 2k$.
Then "open" the floor as
$$ 2k \le {x \over {2^{\,n} }} < 2k + 1\quad \left| {\;k \in Z} \right. $$ where $k$ can be any integer.
However, since $2^n$ is always positive, then, depending on the sign of $x$, we shall have $$ 0 < 2^{\,n} \quad \Rightarrow \quad \left\{ {\matrix{ {k < 0} & {x < 0} \cr {k = 0} & {x = 0} \cr {0 < k} & {0 < x} \cr } } \right. $$ so that we shall write $$ 2k \le {{\left| x \right|} \over {2^{\,n} }} < 2k + 1\quad \left| {\;0 \le k \in Z} \right. $$
Therefore, excluding the case $x=0$ for which the solution is indeterminated, we have: $$ \eqalign{ & \left( {2k} \right)2^{\,n} \le \left| x \right| < \left( {2k + 1} \right)2^{\,n} \cr & {{\left| x \right|} \over {\left( {2k + 1} \right)}} < 2^{\,n} \le {{\left| x \right|} \over {\left( {2k} \right)}} \cr & \ln _2 \left( {\left| x \right|} \right) - \ln _2 \left( {2k + 1} \right) < n \le \ln _2 \left( {\left| x \right|} \right) - \ln _2 \left( {2k} \right)\quad \left| \matrix{ \;0 \le k \in Z \hfill \cr \;0 \ne x \hfill \cr} \right. \cr} $$ Example
$$ \eqalign{ & x = 1/2\quad \ln _2 \left( {\left| x \right|} \right) = - 1 \cr & n \in \left\{ {\left( { - 2.58..,\; - 2} \right],\;\left( { - 3.32..,\; - 3} \right],\;\left( { - 3.807..,\; - 3.58..} \right],\;\left( { - 4.1699..,\; - 4} \right],\; \cdots } \right\} \cr} $$ because for instance $$ \left\lfloor {{{1/2} \over {2^{\, - 2} }}} \right\rfloor = 2\quad \left\lfloor {{{1/2} \over {2^{\, - 3.7} }}} \right\rfloor = 6 $$
But if you are looking for integral values of $n$, and the value of $x$ is different from integer powers of $2$, then the result gets much more complicated.