I have an expression of the form $2i-2^{\lceil{\log{i}}\rceil}$ . I want to know the maximum value of $2i-2^{\lceil{\log{i}}\rceil}$ .
Please consider the base of the logarithm as 2.
I have an expression of the form $2i-2^{\lceil{\log{i}}\rceil}$ . I want to know the maximum value of $2i-2^{\lceil{\log{i}}\rceil}$ .
Please consider the base of the logarithm as 2.
Let $u(x)=2x-2^{\lceil\log_2 x\rceil}$, then $x=2^n\sqrt2$ with $n$ integer yields $\lceil\log_2 x\rceil=n+1$ hence $u(x)=2^{n+1}(\sqrt2-1)\to+\infty$ when $n\to+\infty$.
To deal with $u(i)$ for $i$ integer, define $i_n$ as the unique integer such that $i_n\leqslant2^n\sqrt2\lt i_n+1$. Then $2i_n\gt2^{n+1}\sqrt2-2$ and $\lceil\log_2 i_n\rceil\leqslant n+1$ hence $u(i_n)\geqslant2^{n+1}(\sqrt2-1)-2$.
In particular, $u(i_n)\to+\infty$ when $n\to+\infty$, hence the family $\{u(i)\mid i\in\mathbb N\}$ is unbounded.
Likewise, for every real number $a\gt1$, the family $\{ai-a^{\lceil\log_ai\rceil}\mid i\in\mathbb N\}$ is unbounded.
If $i$ is $2^k+1$, $\lceil \log i \rceil = k+1$, so $2^{\lceil \log i \rceil} =2^{ k+1}$ and $2i-2^{\lceil \log i \rceil}=2i-2(i+1)=2$. If $i$ is further from a power of $2$, the expression will decline.
Let $\log i=I+f\implies i=2^I.2^f$.
If $f\neq0$, then, $\lceil\log i\rceil=I+1\implies 2i-2^{\lceil\log i\rceil}=2^{I+1}2^f-2^{I+1}=2^{I+1}(2^f-1)$
Since $f\gt 0$ and $I$ can go arbitrarily large(depending on $i$), so this difference is unbounded.
If $f=0$, then, $\lceil\log i\rceil=I\implies 2i-2^{\lceil\log i\rceil}=2^{I+1}-2^{I}=2^{I}$ which is unbounded too (depending on $i$)