Prove that $\lim_{n\to\infty} \left( \frac{ g_n^{\gamma}}{\gamma^{g_n}} \right)^{2n} = \frac{e}{\gamma}$

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}


We have $$\begin{eqnarray*} g_n = H_n-\log(n) &=& \sum_{k=1}^{n}\left(\frac{1}{n}-\log\left(1+\frac{1}{n}\right)\right)-\log\left(1+\frac{1}{n}\right)\\ &=& \gamma-\sum_{k>n}\left(\frac{1}{n}-\log\left(1+\frac{1}{n}\right)\right)\\&=&\gamma+\frac{1}{2n}+O\left(\frac{1}{n^2}\right)\\&=&\gamma\left(1+\frac{1}{2\gamma n}+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\gamma 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-\frac{\log\gamma}{\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^{1/\gamma}}}.\tag{4}$$


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)$$