Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
Of course, since $\log i$ can become arbitrary large, so can $2^{\lceil\log i\rceil}$. However, I guess you meant something different. Maybe you want the maximal value of $2^{\lceil\log i\rceil}/i$? – celtschk Sep 12 '12 at 16:28
@celtschk I corrected yet . thanks for pointing out. – Geek Sep 12 '12 at 16:32
@Geek Originally you wanted a lower bound on $2i-2^{\lceil{\log{i}}\rceil}$. Are you sure you don't want the minimum possible value now? – Erick Wong Sep 12 '12 at 17:33
up vote 2 down vote accepted

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$)

share|cite|improve this answer

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.

share|cite|improve this answer
Can you explain why If $i$ is $2^k+1$, $\lceil \log i \rceil = k+1$ – Geek Sep 12 '12 at 16:33
The definition of $\log$ gives you that $k = \log 2^k$ whether k is integral or real. If you take $\log (2^k+1)$ for $k$ integral, it will be a little higher than $k$, so will round up to $k+1$ – Ross Millikan Sep 12 '12 at 16:37
@RossMillikan You have an extra factor of $2$ in $2(2i-2)$. The expression should always be positive since $\lceil \log i \rceil < \log i + 1$. – Erick Wong Sep 12 '12 at 17:29
@ErickWong: right. fixed. Thanks – Ross Millikan Sep 12 '12 at 18:03
@Geek: Please see the correctiion – Ross Millikan Sep 12 '12 at 18:03

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.