Question: Closed formula for the sum of the sequence?

How to find the closed formula for the sum of this sequence:

sum = n + n/2 + n/4 + n/8 + ... + 1

If n is 2 in some power, then the sum should be 2*n - 1. How to get this answer using Maple?

Please Wait...