1
$\begingroup$

What is the value of the following sum: $$\sum\limits_{i=0}^{\ (\log_2(n))-1)}\frac{n}{2^i}$$ Can you show how to go about arriving at the answer?

  • 0
    Do you mean to find $$\sum_{0}^{\log_{2}(n-1)}\left( \frac{n}{2^i}\right) $$ ?2012-05-10
  • 0
    Is that actually what you mean? Is $n$ from a certain set (say, the powers of 2?), in which case is your summation limit correct?2012-05-10
  • 1
    What happens if $\log_2(n-1)$ is not an integer? Do you mean $\lfloor \log_2(n-1) \rfloor$?2012-05-10
  • 2
    Formally, $$n\sum_{k=0}^m 2^{-k}=n\left(2-2^{-m}\right)$$ Replace $m$ with that expression you need...2012-05-10
  • 0
    Thanks for the comments, I edited the question to make it clearer I hope.2012-05-10
  • 0
    @J.M.: It is obviously the answer is given from your comment and the draks' one altogether. Is your statemnt supposed to be verified by induction?2012-05-10
  • 0
    @Babak: it's a truncated geometric series, no? There are standard methods for demonstrating that identity...2012-05-10
  • 0
    Maybe it helps, if @PaulCaheny would write out sum (without $\sum$) he's interested. If you restrict yourself to $n=2^m$ everthings fine.2012-05-10

1 Answers 1