Find limit of sum using Riemann integral

I need to find $$\lim_{n\to \infty}\sum_{k=0}^n \frac{1}{1+n*2^{\frac{k}{n}}}$$ using Riemann integral.

I think I might substitute $x$ for $2^{\frac{k}{n}}$and integrate from $1$ to $2$ but I'm not sure where to go from that, namely how to factor out $(x_{i+1}-x_i)$. Any hints would be greatly appreciated.

I tried doing this: $$\lim_{n\to \infty}\sum_{k=0}^n \frac{1}{1+n*2^{\frac{k}{n}}} = \lim_{n\to \infty}\sum_{k=0}^n \frac{1}{n}\frac{1}{\frac{1}{n}+2^{\frac{k}{n}}} = \int_0^1{\frac{1}{2^x}dx} = \frac{1}{2\ln{2}}$$

It looks like a correct answer according to WolframAlpha but I'm not sure how to safely remove that $\frac{1}{n}$ from denominator. I was told that series expansions can help with that but I have troubles applying them here.

• Just for your curioisity, $\sum_{k=0}^n \frac{1}{1+n \,a^{\frac{k}{n}}}$ has a closed form in terms of the digamma function. – Claude Leibovici Mar 15 '17 at 9:26

Let us try to show that the error we have if we simply remove the $1/n$ in the denominator is small. We have $$\Bigl|\frac{1}{1+n2^{k/n}}-\frac{1}{n2^{k/n}}\Bigr|=\frac{1}{(1+n2^{k/n})n2^{k/n}}\leq\frac{1}{n^2 (2^{2/n})^k}\leq\frac{1}{n^2}.$$ Now, by the triangle inequality, we find that \begin{aligned} \biggl|\sum_{k=0}^{n}\frac{1}{1+n2^{k/n}}-\sum_{k=0}^{n}\frac{1}{n2^{k/n}}\Bigr| &\leq \sum_{k=0}^n\Bigl|\frac{1}{1+n2^{k/n}}-\frac{1}{n2^{k/n}}\Bigr|\\ &\leq\frac{1}{n^2}\sum_{k=0}^n1=\frac{n+1}{n^2} \end{aligned} This error tends to $0$ as $n\to+\infty$. Thus $$\lim_{n\to+\infty}\sum_{k=0}^{n}\frac{1}{1+n2^{k/n}} = \lim_{n\to+\infty}\sum_{k=0}^{n}\frac{1}{n2^{k/n}} = \int_0^1\frac{1}{2^x}\,dx=\frac{1}{2\ln 2}.$$