# Find $\lim_{n \to \infty}(n - \frac{1}{2^n} \sum_{k=1}^{2^n}\log_{2}(k+2^{n-1}))$ using Riemann sums

I need to examine whether the following limit exists or not.

$$\lim_{n \to +\infty}(n - \frac{1}{2^n} \sum_{k=1}^{2^n}\log_{2}(k+2^{n-1}))$$

If it does, I need to calculate it's value.

I think "Riemann sums" may be a good start. So, I'm trying to convert the expression $$=\lim_{n \to +\infty} (n-\frac{1}{2^n} \sum_{k=1}^{2^n} (\log_2(\frac{k}{2^n}+\frac{1}{2})+\log_22^n))\\ = \lim_{n \to +\infty} (n(1-\frac{1}{2^n})-\frac{1}{2^n} \sum_{k=1}^{2^n} \log_2(\frac{k}{2^n}+\frac{1}{2}))\\ = - \lim_{n \to +\infty} (\frac{1}{2^n} \sum_{k=1}^{2^n} (\log_2({\frac{k}{2^n}+\frac{1}{2}}) - n(1-\frac{1}{2^n})))$$ but I don't know what to do next and how to finish it. Can anybody help me?

You seem to drop a logarithm at one point which is fairly important. Specifically, $\log_22^n=n$, so $$\log_2(k+2^{n-1})=\log_2\left(\frac{k}{2^n}+\frac12\right)+n$$ and hence $$n-\frac1{2^n}\sum_{k=1}^{2^n}\log_2(k+2^{n-1})=-\sum_{k=1}^{2^n}\log_2\left(\frac{k}{2^n}+\frac12\right)\frac1{2^n}\to-\int_0^1\log_2(x+\tfrac12)\,\mathrm dx$$ as $n\to\infty$. Now you just need to calculate this integral!