quality:correction, information:highlighting, stylistic:style_transfer
Asymptotic expansions

γ equals the following asymptotic formulas (where H is the n th harmonic number):

The third formula is also called the Ramanujan expansion.

Alabdulmohsin derived closed-form expressions for the sums of errors of these approximations. He showed that (Theorem A.1):

∑ n = 1 ∞ log n + γ − H n + 1 2 n = log (2 π) − 1 − γ 2 ∑ n = 1 ∞ log n (n + 1) + γ − H n = log (2 π) − 1 2 − γ ∑ n = 1 ∞ (− 1) n (log n + γ − H n) = log π − γ 2 {\displaystyle {\begin{aligned}\sum _{n=1}^{\infty }\log n+\gamma -H_{n}+{\frac {1}{2n}}&={\frac {\log(2\pi)-1-\gamma }{2}}\\\sum _{n=1}^{\infty }\log {\sqrt {n(n+1)}}+\gamma -H_{n}&={\frac {\log(2\pi)-1}{2}}-\gamma \\\sum _{n=1}^{\infty }(-1)^{n}{\Big (}\log n+\gamma -H_{n}{\Big)}&={\frac {\log \pi -\gamma }{2}}\end{aligned}}}