title: Is complexity O(log(n) + log(n/2) + log(n/4) + log(n/8) + ... + log(2)) = O(log(n))?
body: <p>As homework, I was asked to write an algorithm in O(log(n)) and I could calculate the complexity of the one I wrote as O(log(n) + log(n/2) + log(n/4) + log(n/8) + ... + log(2)).</p>
  
  <p>I think it's rather O(n) since it's roughly log(n)*O(log(n)) = O(n). But I was not sure about it. I know homework questions are not welcome here, but  I really don't know another way to find out what complexity it is. Googling didn't help me.</p>
  
  <p>To specify: n in N and n = pow(2, c), c in N</p>