# Closed-form asymptotics of $\sum\limits_{i=1}^n \frac{i}{n^2+n+i}$

I don't know the Closed-form asymptotics of $$S(n) := \sum\limits_{i=1}^n \frac{i}{n^2+n+i}$$.

What I have tried:

$$S(n) = n - (n^2+n)\sum\limits_{i=1}^n \frac{1}{n^2+n+i}$$.

By the asymptotics of the harmonic series ($$H_n = \log n + \gamma + \frac{1}{2n} + O(\frac{1}{n^2})$$), we have:

$$S(n) = n - (n^2+n)(H(n^2+2n) - H(n^2+n)) = \frac{1}{2} - \frac{1}{3n} + \frac{5}{12n^2} + O(\frac{1}{n^3})$$.

However, the higher order asymptotics (the $$O(\frac{1}{n^2})$$ terms) of $$H_n$$ is not clear, so I don't know the higher order asymptotics of $$S_n$$ either. I also considered using integral but failed. I appreciate your help.

• Hello lady/bro, I think these two are the same. $n - (n^2+n)\sum\limits_{i=1}^n \frac{1}{n^2+n+i} = n - \sum\limits_{i=1}^n \frac{n^2+n}{n^2+n+i} = \sum\limits_{i=1}^n \frac{i}{n^2+n+i}$. The second equation is distributing $n$ into $n$ $1$s. Commented Aug 25, 2023 at 19:00
• You should edit your question to clarify that. The comments section is not the place to that. Commented Aug 25, 2023 at 19:17
• $\sum\limits_{i=1}^n \frac{1}{n^2+n+i}$ is between $\sum\limits_{i=1}^n \frac{1}{n^2+n}=\frac{1}{n+1}$ and $\sum\limits_{i=1}^n \frac{1}{n^2+n+n}=\frac{1}{n+2}$ and I would guess close to halfway between them Commented Aug 25, 2023 at 19:46

A full asymptotics in the easy to handle form can be obtained. $$S_n = \sum\limits_{i=1}^n \frac i{n^2+n+i}=n-n(n+1)\sum\limits_{i=1}^n\frac1{n^2+n+i}$$ $$=n-n(n+1)\sum\limits_{i=1}^n\int_0^\infty e^{-t(n^2+n+i)}dt$$ Changing the order of summation and integration, $$=n-n(n+1)\int_0^\infty e^{-t(n^2+n)}\frac{e^{-t}-e^{-(n+1)t}}{1-e^{-t}}dt$$ $$=n-n(n+1)\int_0^\infty \frac t{e^t-1}\frac{e^{-t(n^2+n)}-e^{-t(n^2+2n)t}}tdt$$ Using the generating function for Bernoulli numbers $$\,\displaystyle \frac t{e^t-1}=\sum_{k=0}^\infty\frac{B_k}{k!}t^k\, \big(B_0=1, B_1=-\frac12\,B_2=\frac16,\,B_3=0,\,B_4=-\frac1{30},...\big)$$, Frullani integral $$\,\displaystyle \int_0^\infty\frac{e^{-at}-e^{-bt}}tdt=\ln\frac ba$$, and integrating term by term $$\sim n-n(n+1)\left(\ln\frac{n^2+2n}{n^2+n}+\sum_{k=1}^\infty\frac{B_k}k\left(\frac1{(n^2+n)^k}-\frac1{(n^2+2n)^k}\right)\right)$$ $$\boxed{\,\,S_n\sim n-n(n+1)\left(\ln\big(1+\frac2n\big)-\ln\big(1+\frac1n\big)+\sum_{k=1}^\infty\frac{B_k}{n^{2k}k}\left(\big(1+\frac1n\big)^{-k}-\big(1+\frac2n\big)^{-k}\right)\right)\,\,}$$ Getting a finit number of asymptotic terms is straightforward.

• Thanks Dr. Svyatoslav for your nice idea exploiting (Frullani) integral. Commented Aug 26, 2023 at 4:57

$$S_n=\sum\limits_{i=1}^n \frac{i}{a+i}=n+a \left(H_a-H_{a+n}\right)$$

Let $$a=n^2+n$$ and use twice the asymptotics of the harmonic numbers

$$H_p=\log (p)+\gamma +\frac{1}{2 p}-\frac{1}{12 p^2}+\frac{1}{120 p^4}-\frac{1}{252 p^6}+\frac{1}{240 p^8}-\frac{1}{132 p^{10}}+O\left(\frac{1}{p^{12}}\right)$$ and continue with Taylor series to obtain

$$S_n=\frac 12 \Bigg(1-\frac{2}{3 n}+\frac{5}{6 n^2}-\frac{37}{30 n^3}+\frac{53}{30 n^4}-\frac{103}{42 n^5}+\frac{277}{84 n^6}-\frac{763}{180 n^7}+O\left(\frac{1}{n^8}\right) \Bigg)$$

• Dear Prof, may I ask you a question? How can I get $S_n$ from $H_p$ easily without brute-force computation? I know brute force certainly works, but would you please elaborate some easier methods? Or maybe I should use a computer? Commented Aug 26, 2023 at 4:56
• @Muses_China, You can proceed as follows: $$\sum_{i=1}^{n} \frac{i}{a+i} = \sum_{i=1}^{n} \left( 1 - \frac{a}{a+i}\right) = n - a \sum_{i=1}^{n} \frac{1}{a+i} = n - a \sum_{j=a+1}^{a+n} \frac{1}{j},$$ where $j=a+i$. Commented Aug 26, 2023 at 8:16