1
$\begingroup$

What will be the closest approximate value for:

$$\sum_{i=1}^n 2^{\lceil \log_2i\rceil}$$

One method is replacing $\lceil{\log_2i\rceil}$ with $\log_2i+1$. But is there any method to get the closest approximate value?

$\endgroup$
3
  • $\begingroup$ I think it should be $\log_2(i)$ instead of $\log_2(n)$ in the summation. $\endgroup$ – Math Lover Jan 15 '19 at 18:50
  • 1
    $\begingroup$ This doesn't look too hard to compute exactly, since you have a bunch of consecutive terms that are the same. $\endgroup$ – Michael Lugo Jan 15 '19 at 19:06
  • $\begingroup$ Can we deduce any expression that gives the closest approximate value for any given n $\endgroup$ – Sail Akhil Jan 15 '19 at 19:11
2
$\begingroup$

Let $m = \lfloor \log_2 n \rfloor$. \begin{align*} \sum_{i=1}^{n} 2^{\lceil \log_2 i\rceil} &= \overbrace{1 + 2 + 4 + 4 + \underbrace{8 + \cdots + 8}_{4} + \underbrace{16 + \cdots + 16}_8 + \cdots}^{n} \\ &= 1 + (n - 2^m)2^{m+1}+\sum_{k=1}^{m}2^{k-1}2^{k}\\ &= 1 + (n - 2^m)2^{m+1} + \frac{2}{3}(4^m-1) \end{align*}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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