Does the following have a closed formula?
$$\sum_{i=1}^{k-1}\left\lceil \log_2\frac{N}{i}\right\rceil$$
Does the following have a closed formula?
$$\sum_{i=1}^{k-1}\left\lceil \log_2\frac{N}{i}\right\rceil$$
Let \begin{align*} S(k,N) &= \sum_{i=1}^{k-1}\left\lceil \log_2\frac{N}{i}\right\rceil \end{align*}
We can have a closed form for $S(N,N)$ which is: \begin{align*} S(N,N) &= 2^{\lceil\log_2N \rceil+1}-\lceil\log_2N \rceil-2 \end{align*}
and the sequence $S(N,N)-S(k,N)\; \; , k = N,N-1,N-2,\ldots, 3,2,1$ is A005187, which gives us interesting information.