Prove that $\lim_{n\to\infty} \left( \frac{ g_n^{\gamma}}{\gamma^{g_n}} \right)^{2n} = \frac{e}{\gamma}$ Put $g_n = 1 + \frac{1}{2} + \dotsb + \frac{1}{n} - \log(n)$. Prove that $$\lim_{n\to\infty} \left( \frac{ g_n^{\gamma}}{\gamma^{g_n}} \right)^{2n} = \frac{e}{\gamma},$$
where $\gamma$ is the Euler-Mascheroni constant.
 A: Since $g_n=\gamma+\frac1{2n}+O(\frac1{n^2})$ (see this),
\begin{align}
\left(\frac{g_n^\gamma}{\gamma^{g_n}}\right)^{2n}&=\left(\frac{(\gamma+\frac1{2n}+O(\frac1{n^2}))^\gamma}{\gamma^\gamma\gamma^{\frac1{2n}+O(\frac1{n^2})}}\right)^{2n}
=\left(\frac{(1+\frac1{2\gamma n}+O(\frac1{n^2}))^\gamma}{\gamma^{\frac1{2n}+O(\frac1{n^2})}}\right)^{2n}\\
&=\frac{(1+\frac1{2\gamma n}+O(\frac1{n^2}))^{2\gamma n}}{\gamma^{1+O(\frac1{n})}}
=\frac e\gamma+O\left(\frac1n\right).
\end{align}
A: We have
$$\begin{eqnarray*} g_n = H_n-\log(n) &=& \sum_{k=1}^{n}\left(\frac{1}{k}-\log\left(1+\frac{1}{k}\right)\right)+\log\left(1+\frac{1}{n}\right)\\ &=&\gamma-\sum_{k > n}\left(\frac{1}{k}-\log\left(1+\frac{1}{k}\right)\right)+\frac{1}{n}+O\left(\frac{1}{n^2}\right)\\&=&
\gamma-\sum_{k > n}\left(\frac{1}{2k(k+1)}+O\left(\frac{1}{k^3}\right)\right)+\frac{1}{n}+O\left(\frac{1}{n^2}\right)\\&=&\gamma+\frac{1}{2n}+O\left(\frac{1}{n^2}\right)=\gamma\left(1+\frac{1}{2\gamma n}\right)\left(1+O\left(\frac{1}{n^2}\right)\right)\tag{1}\end{eqnarray*}$$
hence as $n\to +\infty$ we have:
$$ \gamma \log(g_n) - g_n \log\gamma = \frac{1}{2n}-\frac{\log\gamma}{2 n}+O\left(\frac{1}{n^2}\right)\tag{2}$$
hence:
$$ \lim_{n\to +\infty}2n(\gamma\log(g_n)-g_n\log\gamma) = 1-\log\gamma\tag{3} $$
and by $\exp$:

$$\lim_{n\to +\infty}\left(\frac{g_n^\gamma}{\gamma^{g_n}}\right)^{2n}=\color{red}{\frac{e}{\gamma}}.\tag{4}$$

A: We have
$$\left(\frac{{g_n}^{\gamma}}{{\gamma} ^{g_n}}\right)^{2n}=e^{2n\left(\gamma \log g_n-g_n \log \gamma\right)}\to e^{1-\log \gamma}=\frac e \gamma$$
indeed since $g_n=\gamma+\frac1{2n}+O\left(\frac1{n^2}\right)$ we have
$$\gamma \log g_n=\gamma \log\left(\gamma+\frac1{2n}+O\left(\frac1{n^2}\right)\right)=\gamma \left(\log \gamma+\log\left(1+\frac{1}{2n\gamma}+O\left(\frac1{n^2}\right)\right)\right)=$$
$$=\gamma \left(\log \gamma+\frac{1}{2n\gamma}+O\left(\frac1{n^2}\right)\right)=\gamma \log \gamma+\frac{1}{2n}+O\left(\frac1{n^2}\right)$$
and
$$g_n \log \gamma=\gamma\log \gamma +\frac{\log \gamma}{2n}+O\left(\frac1{n^2}\right)$$
therefore
$$2n\left(\gamma \log g_n-g_n \log \gamma\right)=2n\left(\gamma \log \gamma+\frac{1}{2n}-\gamma\log \gamma -\frac{\log \gamma}{2n}+O\left(\frac1{n^2}\right)\right)=1-\log \gamma +O\left(\frac1n\right)$$
A: $$a_n=\left(\frac{{g_n}^{\gamma}}{{\gamma} ^{g_n}}\right)^{2n}\implies \log(a_n)=2n \log\left(\frac{{g_n}^{\gamma}}{{\gamma} ^{g_n}}\right)=2n \gamma \log(g_n)-2n g_n\log(\gamma)$$
$$g_n=H_n-\log(n)=\gamma +\frac{1}{2 n}-\frac{1}{12 n^2}+O\left(\frac{1}{n^4}\right)$$
$$\log(g_n)=\log (\gamma )+\frac{1}{2 \gamma  n}-\frac{3+2 \gamma }{24 \gamma ^2
   n^2}+\frac{1+\gamma }{24 \gamma ^3 n^3}+O\left(\frac{1}{n^4}\right)$$
$$\log(a_n)=(1-\log (\gamma ))+\frac{-2-\frac{3}{\gamma }+2 \log (\gamma )}{12
   n}+\frac{1+\gamma }{12 \gamma ^2 n^2}+O\left(\frac{1}{n^3}\right)$$
$$a_n=e^{\log(a_n)}=\frac{e}{\gamma }\left(1+\frac{2 \gamma  \log \left(\frac{\gamma }{e}\right)-3}{12 \gamma\, n }\right)+O\left(\frac{1}{n^2}\right)$$ which shows the limit and how it is approached.
Trying for $n=1000$, the "exact" value is
$4.7060473$ while the truncated expansion gives $4.7060443$
