<s>[INST] Computing $\lim_n \frac{n}{2^n}\sum_{k=1}^n \frac{2^k}{k}$ 
What is $\lim_n \frac{n}{2^n}\sum_{k=1}^n \frac{2^k}{k}$ ?

Here are a few remarks:


*

*Since $x\mapsto \frac{2^x}{x}$ is increasing when $x\geq 2$, one might be tempted to use the integral test. This fails: when doing so, one gets $a_n\leq \sum_{k=1}^n \frac{2^k}{k}\leq b_n$ where $a_n\sim \frac{2^n}{\ln (2)n}$ and $b_n\sim \frac{2^{n+1}}{\ln (2)n}$. 
Unfortunately $b_n$ is too big and this estimate doesn't yield the limit.

*Here's my solution: since it's easy to sum $2^k$ and the difference $\frac{1}{k}-\frac{1}{k+1}$ is small, it's natural to try summation by parts: $$\begin{align} \sum_{k=1}^n \frac{2^k}{k}
&=\frac{S_n}{n+1}-1+\sum_{k=1}^n S_k \left(\frac{1}{k}-\frac{1}{k+1} \right)\quad \text{where} \; S_n=\sum_{k=0}^n 2^k\\
&= \frac{2^{n+1}}{n+1} + \sum_{k=1}^n \frac{2^{k+1}}{k(k+1)} - \underbrace{1 - \sum_{k=1}^n\left(\frac{1}{k(k+1)}\right) - \frac{1}{n+1}}_{\text{bounded}}\\
\end{align}$$
Intuition suggests $\displaystyle \sum_{k=1}^n \frac{2^{k+1}}{k(k+1)}=o\left(\frac{2^n}n \right)$ but it's not immediate to prove. I had to resort to another summation by parts! Indeed 
$$\begin{align}\small\sum_{k=1}^n \frac{2^{k+1}}{k(k+1)}&= \small 2\left[ \frac{2^{n+1}}{n(n+1)} + 2\sum_{k=1}^n \left(\frac{2^{k+1}}{k(k+1)(k+2)}\right)-\frac 12 -2\sum_{k=1}^n \left(\frac{1}{k(k+1)(k+2)}\right) - \frac{1}{n(n+1)}\right]\\
 &\small\leq \frac{2^{n+2}}{n(n+1)}+\frac{2^{n+2}}{n(n+1)(n+2)}\cdot n \\
&\small= o\left(\frac{2^n}n \right)
\end{align}$$
Hence $$\sum_{k=1}^n \frac{2^k}{k} = \frac{2^{n+1}}{n+1} + o\left(\frac{2^n}n \right)$$ and $$\lim_n \frac{n}{2^n}\sum_{k=1}^n \frac{2^k}{k} = 2$$


This solution is quite tedious and computational... That's why I'm looking for a shorter or smarter solution that avoids summation by parts (integration by parts is easy to perform on functions, it just gets quite heavy with series).

 [/INST] Let $S_n = \frac{n}{2^n} \sum_{k=1}^{n} \frac{2^k}{k}$. It has the following trivial lower bound.
$$ 2 - \frac{1}{2^n} = \sum_{k=1}^{n} \frac{1}{2^{n-k}} \leq S_n. $$
For an upper bound, fix $r \in (0, 1)$ and let $N = N(r,n) = \lfloor rn \rfloor$. Then for $n$ large, we have $1 < N < n$ and hence
\begin{align*}
S_n
&= \frac{n}{2^n} \sum_{k=1}^{N} \color{red}{\frac{2^k}{k}} + \frac{n}{2^n} \sum_{k=N+1}^{n} \color{blue}{\frac{2^k}{k}} \\
&\leq \frac{n}{2^n} \sum_{k=1}^{N} \color{red}{2^k}+ \frac{n}{2^n} \sum_{k=N+1}^{n} \color{blue}{\frac{2^k}{rn}} \\
&= \frac{n}{2^n} (2^{N+1} - 1) + \frac{1}{r 2^n}(2^{n+1} - 2^{N+1}) \\
&\leq n 2^{-(1-r)n+1} + \frac{2}{r}.
\end{align*}
For the red terms, we utilized the trivial bound $\frac{1}{k} \leq 1$. For the blue terms, we utilized the fact that $k \geq N+1$ implies $k \geq nr$. Thus it follows that
$$ 2 \leq \liminf_{n\to\infty} S_n \leq \limsup_{n\to\infty} S_n \leq \frac{2}{r}. $$
Taking $r \uparrow 1$ gives the wanted conclusion.
</s>