How to simplify this summation involving floor functions?

65 Views Asked by At

I have obtained the following summation: $$S_{n} = \sum_{\substack{i \ge 0 \\ 2^{i+2} + i \le n}} \left\lfloor \frac{n - i}{2^{i + 1}} \right\rfloor$$

Can this be further simplified?


Background: This summation arises in a solution to the following problem on algorithm analysis (from Exercise 18.2-4 of Chapter 18 on B-Trees; Book: Introduction to Algorithms (known as CLRS) 3rd):

Suppose that the keys $\{1, 2, \ldots, n\}$ (in increasing order) are inserted into an empty B-tree with minimum degree 2. How many nodes does the final B-tree have?