1 Introduction

Throughout this paper, \({\mathbb {N}}\) represents the set of positive integers and \({\mathbb {N}}_0:={\mathbb {N}}\cup \{0\}\). The Euler–Mascheroni constant \(\gamma =0.577215664\ldots \) is defined as the limit of the sequence

$$\begin{aligned} D_{n}=\sum _{k=1}^{n}\frac{1}{k}-\ln n\,\qquad (n \in {\mathbb {N}}). \end{aligned}$$
(1.1)

The Euler–Mascheroni constant is a number that appears in analysis and number theory. It is not known yet whether the number is irrational or transcendental [20, 25]. The following two-sided inequality was presented in [24, 28]:

$$\begin{aligned} \frac{1}{2(n+1)}<D_{n}-\gamma <\frac{1}{2n}\quad \text {for} \quad n\in {\mathbb {N}}, \end{aligned}$$
(1.2)

which shows that the convergence of the sequence \(D_{n}\) to \(\gamma \) is very slow (like \(n^{-1}\)). By changing the logarithmic term in (1.1), faster approximation formulas to the Euler–Mascheroni constant were presented in [7, 10, 16, 17, 23]. For example, Chen and Mortici [7] established the following approximation formula:

$$\begin{aligned} \sum _{k=1}^{n}\frac{1}{k}-\ln \left( n+\frac{1}{2}+\frac{1}{24n}-\frac{1 }{48n^{2}}+\frac{23}{5760n^{3}}\right) =\gamma +O\left( n^{-5}\right) \quad \text {as}\quad n\rightarrow \infty \nonumber \\ \end{aligned}$$
(1.3)

and posed an open question as follows: For a given \(p\in {\mathbb {N}}_0\), find the constants \(a_{i}\) \((i=0, 1, 2,\ldots , p)\), such that

$$\begin{aligned} \sum _{k=1}^{n}\frac{1}{k}-\ln \left( n+\sum _{i=0}^{p}\frac{a_{i}}{n^{i}}\right) \end{aligned}$$

is the fastest sequence which would converge to \(\gamma \). This open problem has been considered by Yang [27], Gavrea and Ivan [18], and Lin [21]. Recently, Chen [5] determined the coefficients \(a_j\) and \(b_j\), such that

$$\begin{aligned} \sum _{k=1}^{n}\frac{1}{k}-\ln \frac{n^p+\sum _{j=1}^{p}a_jn^{p-j}}{n^q+\sum _{j=1}^{q}b_jn^{q-j}}=\gamma +O\left( \frac{1}{n^{p+q+1}} \right) \qquad (n\rightarrow \infty ), \end{aligned}$$

where \(p\in {\mathbb {N}}\), \(q\in {\mathbb {N}}_0\) and \(p=q+1\). This solves an open problem of Mortici [22]. There are a lot of formulas expressing \(\gamma \) as series, integrals, or products [4, 8, 9, 13, 14, 20]. For more information on the Euler–Mascheroni constant \(\gamma \), please refer to survey papers [15, 26] and expository book [19].

In this paper, we consider the sequence \((A_{n})_{n\in {\mathbb {N}}}\) defined by

$$\begin{aligned} A_{n}=\sum _{i=1}^{n}\sum _{j=0}^{n}\frac{1}{(i+j)^2}-1+\ln 2-\ln n. \end{aligned}$$
(1.4)

Using the computer program MAPLE 13, we find, as \(n\rightarrow \infty \)

$$\begin{aligned} A_{n}-\gamma&\sim \frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}-\frac{31}{640n^4}-\frac{31}{960n^5}+\frac{635}{16128n^6}+\frac{127}{5376n^7}\nonumber \\&\quad -\frac{3577}{61440n^8}-\frac{511}{15360n^9}+\ldots . \end{aligned}$$
(1.5)

We here give a formula for determining these coefficients in the right-hand side of (1.5). Then, we establish a two-sided inequality and a continued-fraction approximation for the Euler–Mascheroni constant.

The numerical values given in this paper have been calculated via the computer program MAPLE 13.

2 Lemmas and Preliminaries

The gamma function may be defined by \( \Gamma (x)=\int _{0}^{\infty }t^{x-1}e^{-t}\textrm{d} t\,\, (x>0)\). The logarithmic derivative of the gamma function \(\psi (x)=\Gamma '(x)/\Gamma (x)\) is known as the psi (or digamma) function. The derivatives of the psi function \(\psi ^{(n)}(x)\,\, (n \in {\mathbb {N}})\) are called the polygamma functions. It is well known that the psi function has the duplication formula [1, p. 259, Eq. (6.3.8)]:

$$\begin{aligned} \psi (2x)=\frac{1}{2}\left[ \psi (x)+\psi \left( x+\frac{1}{2}\right) \right] +\ln 2. \end{aligned}$$
(2.1)

The following series expansion and asymptotic formula hold (see [1, p. 260]):

$$\begin{aligned} \psi '(x)=\sum _{k=0}^{\infty }\frac{1}{(x+k)^{2}} \end{aligned}$$
(2.2)

and

$$\begin{aligned} \psi '(x)\sim \frac{1}{x}+\frac{1}{2x^{2}}+\sum _{k=1}^{\infty }\frac{B_{2k}}{x^{2k+1}}=\frac{1}{x}+\frac{1}{2x^{2}}+\sum _{j=2}^{\infty }\frac{B_{j}}{x^{j+1}}\qquad (x \rightarrow \infty ), \end{aligned}$$
(2.3)

where \(B_n\) (\(n\in {\mathbb {N}}_0\)) are the Bernoulli numbers defined by

$$\begin{aligned} \frac{t}{e^{t}-1}=\sum \limits _{n=0}^{\infty }B_{n}\;\frac{t^{n}}{n!}. \end{aligned}$$

It follows from the known result (see [6, Eq. (3.26)]) that:

$$\begin{aligned} \psi '\left( x+\frac{1}{2}\right) \sim \frac{1}{x}-\sum _{k=2}^{\infty }\frac{(1-2^{1-k})B_{k}}{x^{k+1}} =\frac{1}{x}-\sum _{k=3}^{\infty }\frac{(1-2^{2-k})B_{k-1}}{x^{k}}\qquad (x \rightarrow \infty ).\nonumber \\ \end{aligned}$$
(2.4)

Lemma 1.1

(see [3, Theorem 9]) Let \(k \ge 1\) and \(n \ge 0\) be integers. Then, for all real numbers \(x>0\)

$$\begin{aligned} S_{k}(2n; x)<(-1)^{k+1}\psi ^{(k)}(x)<S_{k}(2n+1;x), \end{aligned}$$
(2.5)

where

$$\begin{aligned} S_{k}(p;x)=\frac{(k-1)!}{x^k}+\frac{k!}{2x^{k+1}} +\sum \limits _{i=1}^{p}\Biggl [B_{2i} \prod _{j=1}^{k-1}(2i+j)\Biggr ]\frac{1}{x^{2i+k}}, \end{aligned}$$

\(B_n\) are the Bernoulli numbers.

It follows from (2.5) that for \(x>0\):

$$\begin{aligned}&\frac{1}{x}+\frac{1}{2x^{2}} +\frac{1}{6x^{3}}-\frac{1}{30x^{5}}<\psi '(x)<\frac{1}{x}+\frac{1}{2x^{2}} +\frac{1}{6x^{3}}-\frac{1}{30x^{5}}+\frac{1}{42x^{7}}. \end{aligned}$$
(2.6)

Using the recurrence formula

$$\begin{aligned} \psi '(x+1)=\psi '(x)-\frac{1}{x^2}, \end{aligned}$$
(2.7)

we deduce from (2.6) that for \(x>0\)

$$\begin{aligned}&\frac{1}{x}-\frac{1}{2x^2}+\frac{1}{6x^3} -\frac{1}{30x^5}<\psi '(x+1)<\frac{1}{x}-\frac{1}{2x^2}+\frac{1}{6x^3} -\frac{1}{30x^5}+\frac{1}{42x^7}. \end{aligned}$$
(2.8)

Lemma 1.2

(see [2]) For \(x>\frac{1}{2}\) and \(N\in {\mathbb {N}}_0\)

$$\begin{aligned} \frac{(n-1)!}{(x-\frac{1}{2})^{n}}&+\sum _{k=1}^{2N+1}\frac{B_{2k}(1/2)}{(2k)!}\frac{(n+2k-1)!}{(x-\frac{1}{2})^{n+2k}}<(-1)^{n+1}\psi ^{(n)}(x)\nonumber \\&\qquad \qquad <\frac{(n-1)!}{(x-\frac{1}{2})^{n}}+\sum _{k=1}^{2N}\frac{B_{2k}(1/2)}{(2k)!}\frac{(n+2k-1)!}{(x-\frac{1}{2})^{n+2k}} \qquad (n=1,2,\ldots ), \end{aligned}$$
(2.9)

where \(B_n(t)\) are the Bernoulli polynomials defined by the following generating function:

$$\begin{aligned} \frac{xe^{tx}}{e^{x}-1}=\sum _{n=0}^{\infty }B_{n}(t)\frac{x^n}{n!}. \end{aligned}$$

Noting that

$$\begin{aligned} B_{k}(1/2)=-\left( 1-\frac{1}{2^{k-1}}\right) B_{k} \qquad (k\in {\mathbb {N}}_0), \end{aligned}$$

we obtain from (2.9) that for \(x>0\)

$$\begin{aligned} \frac{1}{x}-\frac{1}{12x^3}+\frac{7}{240x^5}-\frac{31}{1344x^7}<\psi '\left( x+\frac{1}{2}\right)&<\frac{1}{x}-\frac{1}{12x^3}+\frac{7}{240x^5}. \end{aligned}$$
(2.10)

Lemma 1.3

(see [11, 12]) Let \(a_1\not =0\) and \( A(x)\sim \sum _{j=1}^\infty \frac{a_j}{x^{j}}\, (x\rightarrow \infty )\) be a given asymptotic expansion. Then, the function \(B(x):=a_1/A(x)\) has asymptotic expansion of the following form:

$$\begin{aligned} B(x)\sim x+\sum _{j=0}^\infty \frac{b_j}{x^{j}}\qquad (x\rightarrow \infty ), \end{aligned}$$

where

$$\begin{aligned} b_0=-\frac{a_2}{a_1}, \quad b_{j}=-\frac{1}{a_1}\left( a_{j+2}+\sum _{k=1}^{j}a_{k+1}b_{j-k}\right) \qquad (j\ge 1). \end{aligned}$$

Remark 2.4

Lemma 2.3 provides a method to construct a continued-fraction approximation based on a given asymptotic expansion. The details of this method are given below.

Let \(a_1\not =0\) and

$$\begin{aligned} A(x)\sim \sum \limits _{j=1}^\infty \frac{a_j}{x^{j}} \qquad (x\rightarrow \infty ) \end{aligned}$$
(2.11)

be a given asymptotic expansion. Then, the asymptotic expansion (2.11) can be transformed into the continued-fraction approximation of the form

$$\begin{aligned} A(x)\approx \frac{a_1}{x+b_0+ \dfrac{b_1}{x+c_0+\dfrac{c_1}{x+d_0+\ddots }}}\qquad (x\rightarrow \infty ), \end{aligned}$$
(2.12)

wherein the constants are given by the following recurrence relations:

$$\begin{aligned} {\left\{ \begin{array}{ll} &{}b_0=-\dfrac{a_2}{a_1} \qquad \text {and} \qquad b_{j} =-\frac{1}{a_1}\left( a_{j+2}+\sum \limits _{k=1}^{j}a_{k+1}b_{j-k}\right) \\ &{}c_0=-\frac{b_2}{b_1} \qquad \text {and} \qquad c_{j} =-\frac{1}{b_1}\left( b_{j+2}+\sum \limits _{k=1}^{j}b_{k+1}c_{j-k}\right) \\ &{}d_0=-\frac{c_2}{c_1} \qquad \text {and} \qquad d_{j} =-\frac{1}{c_1}\left( c_{j+2}+\sum \limits _{k=1}^{j}c_{k+1}d_{j-k}\right) \\ &{}\qquad \cdots \quad \cdots \end{array}\right. } \end{aligned}$$
(2.13)

Clearly, since \(a_j \Longrightarrow b_j \Longrightarrow c_j \Longrightarrow d_j \Longrightarrow \cdots \), the asymptotic expansion (2.11) is transformed into the continued-fraction approximation (2.12), and the constants in the right-hand side of (2.12) are determined by the system (2.13).

3 Asymptotic Expansion

We provide a recurrence relation for successively determining the coefficients of \(\frac{1}{n^k}\) \((k\in {\mathbb {N}})\) in expansion (1.5) given by Theorem 3.1.

Theorem 1.1

The sequence \((A_{n})_{n\in {\mathbb {N}}}\), defined by (1.4), has the asymptotic expansion

$$\begin{aligned} A_{n}-\gamma&\sim \sum _{k=1}^{\infty }\frac{a_k}{n^k},\qquad n\rightarrow \infty , \end{aligned}$$
(3.1)

with the coefficients \(a_k\) given by the recurrence relation

$$\begin{aligned} a_1=\frac{1}{2},\quad a_{k}&=\frac{1}{k}\Bigg \{-\sum _{j=1}^{k-1}a_j(-1)^{k-j}\left( {\begin{array}{c}k\\ k-j+1\end{array}}\right) \nonumber \\&\quad -\frac{(4-2^{1-k})B_{k}}{2} +(-1)^k\left( \frac{k}{2^{k}}-\frac{3k}{4}+\frac{1}{k+1}\right) \Bigg \}\quad (k\ge 2),\nonumber \\ \end{aligned}$$
(3.2)

where \(B_n\) are the Bernoulli numbers.

Proof

Denote

$$\begin{aligned} I_n=A_{n}-\gamma \quad \text {and}\quad J_n=\sum _{k=1}^{\infty }\frac{a_k}{n^k}. \end{aligned}$$

In view of (1.5), we can let \(I_n\sim J_n\) and

$$\begin{aligned} \Delta I_n:=I_{n+1}-I_n\sim J_{n+1}-J_n=:\Delta J_n \end{aligned}$$

as \(n\rightarrow \infty \), where \(a_k\) are real numbers to be determined.

We obtain by (2.2) that

$$\begin{aligned} \sum _{j=0}^{n}\frac{1}{(i+j)^2}=\psi '(i)-\psi '(i+n+1). \end{aligned}$$
(3.3)

Using (3.3) and (2.7), we have

$$\begin{aligned} \Delta I_n&=\sum _{i=1}^{n+1}\sum _{j=0}^{n+1}\frac{1}{(i+j)^2}-\sum _{i=1}^{n}\sum _{j=0}^{n}\frac{1}{(i+j)^2}-\ln \left( 1+\frac{1}{n}\right) \nonumber \\&=\sum _{i=0}^{n}\frac{1}{(i+n+2)^2}+\sum _{j=0}^{n}\frac{1}{(j+n+1)^2}-\ln \left( 1+\frac{1}{n}\right) \nonumber \\&=\psi '(n+2)-\psi '(2n+3)+\psi '(n+1)-\psi '(2n+2)-\ln \left( 1+\frac{1}{n}\right) \nonumber \\&=2\psi '(n)-\frac{2}{n^2}-2\psi '\big (2(n+1)\big )-\frac{3}{4(n+1)^2}-\ln \left( 1+\frac{1}{n}\right) . \end{aligned}$$
(3.4)

We obtain from (2.1) that

$$\begin{aligned} 2\psi '(2x)=\frac{1}{2}\psi '(x)+\frac{1}{2}\psi '\left( x+\frac{1}{2}\right) . \end{aligned}$$
(3.5)

We obtain by (3.5) and (2.7) that

$$\begin{aligned} 2\psi '\big (2(n+1)\big )=\frac{1}{2}\psi '(n)-\frac{1}{2n^2}+\frac{1}{2}\psi '\left( n+\frac{1}{2}\right) -\frac{1}{2(n+\frac{1}{2})^2}. \end{aligned}$$
(3.6)

Substituting (3.6) into (3.4), we obtain

$$\begin{aligned} \Delta I_n&=\frac{3}{2}\psi '(n)-\frac{3}{2n^2}-\frac{1}{2}\psi '\left( n+\frac{1}{2}\right) +\frac{1}{2(n+\frac{1}{2})^2}-\frac{3}{4(n+1)^2}-\ln \left( 1+\frac{1}{n}\right) . \end{aligned}$$
(3.7)

Using (2.3) and (2.4), we find as \(n\rightarrow \infty \)

$$\begin{aligned} \Delta I_n&\sim \frac{3}{2}\left( \frac{1}{n}+\frac{1}{2n^{2}}+\sum _{j=2}^{\infty }\frac{B_{j}}{n^{j+1}}\right) -\frac{3}{2n^2}-\frac{1}{2}\left( \frac{1}{n}-\sum _{k=3}^{\infty }\frac{(1-2^{2-k})B_{k-1}}{n^{k}}\right) \nonumber \\&\quad +\sum _{k=2}^{\infty }\frac{(-1)^k(k-1)}{2^{k-1}n^k}-\sum _{k=2}^{\infty }\frac{(-1)^k 3(k-1)}{4n^k}-\sum _{k=1}^{\infty }\frac{(-1)^{k-1}}{k n^k}, \end{aligned}$$

which can be written as

$$\begin{aligned} \Delta I_n&\sim \sum _{k=2}^{\infty }\Bigg \{\frac{(4-2^{2-k})B_{k-1}}{2}+(-1)^k\left( \frac{k-1}{2^{k-1}}-\frac{3(k-1)}{4}+\frac{1}{k}\right) \Bigg \}\frac{1}{n^k}\qquad (n \rightarrow \infty ). \end{aligned}$$
(3.8)

Direct computation yields

$$\begin{aligned} \sum _{k=1}^{\infty }\frac{a_{k}}{(n+1)^{k}}&=\sum _{k=1}^{\infty }\frac{a_{k}}{n^{k}}\left( 1+\frac{1}{n}\right) ^{-k}=\sum _{k=1}^{\infty }\frac{a_{k}}{n^{k}}\sum _{j=0}^{\infty }\left( {\begin{array}{c}-k\\ j\end{array}}\right) \frac{1}{n^j}\\&=\sum _{k=1}^{\infty }\frac{a_{k}}{n^{k}}\sum _{j=0}^{\infty }(-1)^{j}\left( {\begin{array}{c}k+j-1\\ j\end{array}}\right) \frac{1}{n^j}=\sum _{k=1}^{\infty }\sum _{j=1}^{k}a_{j}(-1)^{k-j}\left( {\begin{array}{c}k-1\\ k-j\end{array}}\right) \frac{1}{n^{k}}.\nonumber \end{aligned}$$

We then obtain

$$\begin{aligned} \Delta J_n=\sum _{k=2}^{\infty }\left\{ \sum _{j=1}^{k}a_j(-1)^{k-j}\left( {\begin{array}{c}k-1\\ k-j\end{array}}\right) -a_{k}\right\} \frac{1}{n^k}. \end{aligned}$$
(3.9)

Equating coefficients of the term \(n^{-k}\) on the right-hand sides of (3.8) and (3.9) yields

$$\begin{aligned} \frac{(4-2^{2-k})B_{k-1}}{2}+(-1)^k\left( \frac{k-1}{2^{k-1}}-\frac{3(k-1)}{4}+\frac{1}{k}\right) =\sum _{j=1}^{k}a_j(-1)^{k-j}\left( {\begin{array}{c}k-1\\ k-j\end{array}}\right) -a_{k} \end{aligned}$$

for \(k\ge 2\). For \(k=2\) we obtain \(a_1=\frac{1}{2}\), and for \(k\ge 3\), we have

$$\begin{aligned}{} & {} \frac{(4-2^{2-k})B_{k-1}}{2}+(-1)^k\left( \frac{k-1}{2^{k-1}}-\frac{3(k-1)}{4}+\frac{1}{k}\right) \\{} & {} \qquad =\sum _{j=1}^{k-2}a_j(-1)^{k-j}\left( {\begin{array}{c}k-1\\ k-j\end{array}}\right) -(k-1)a_{k-1}, \end{aligned}$$

which gives the desired result (3.2). The proof of Theorem 3.1 is complete. \(\square \)

4 A Two-Sided Inequality

Motivated by (1.5), we establish a two-sided inequality for the Euler–Mascheroni constant given by Theorem 4.1.

Theorem 1.2

Let the sequence \((A_{n})_{n\in {\mathbb {N}}}\) be defined by (1.4). Then, for \(n\ge 1\)

$$\begin{aligned} \frac{1}{2n}-\frac{11}{48n^2}<A_{n}-\gamma < \frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}. \end{aligned}$$
(4.1)

Proof

We consider the sequences \(\left( x_{n}\right) _{n\in {\mathbb {N}}}\) and \(\left( y_{n}\right) _{n\in {\mathbb {N}}}\) defined by

$$\begin{aligned} x_{n}:=A_{n}-\gamma -\frac{1}{2n}+\frac{11}{48n^2}\quad \text {and}\quad y_{n}:=A_{n}-\gamma -\frac{1}{2n}+\frac{11}{48n^2}-\frac{7}{48n^3}. \end{aligned}$$

Clearly

$$\begin{aligned} \lim _{n\rightarrow \infty }x_{n}=0 \quad \text {and}\quad \lim _{n\rightarrow \infty }y_{n}=0. \end{aligned}$$

Noting that (3.7), we obtain by (2.8) and (2.10) that

$$\begin{aligned} x_{n+1}-x_{n}&= \Delta I_n-\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}+\frac{1}{2n}-\frac{11}{48n^2}\\&= \frac{3}{2}\psi '(n+1)-\frac{1}{2}\psi '\left( n+\frac{1}{2}\right) +\frac{1}{2(n+\frac{1}{2})^2}-\frac{3}{4(n+1)^2}-\ln \left( 1+\frac{1}{n}\right) \\&\quad -\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}+\frac{1}{2n}-\frac{11}{48n^2}\\&<\frac{3}{2}\left( \frac{1}{n}-\frac{1}{2n^2}+\frac{1}{6n^3}-\frac{1}{30n^5}+\frac{1}{42n^7}\right) \\&\quad -\frac{1}{2}\left( \frac{1}{n}-\frac{1}{12n^3}+\frac{7}{240n^5}-\frac{31}{1344n^7}\right) \\&\quad +\frac{1}{2(n+\frac{1}{2})^2}-\frac{3}{4(n+1)^2}-\left( \frac{1}{n}-\frac{1}{2n^2}+\frac{1}{3n^3}-\frac{1}{4n^4}\right) \\&\quad -\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}+\frac{1}{2n}-\frac{11}{48n^2}\\&=-\frac{P_7(n-2)}{13440n^7(2n+1)^2(n+1)^2} \end{aligned}$$

and

$$\begin{aligned} y_{n+1}-y_{n}&= \Delta I_n-\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}-\frac{7}{48(n+1)^3}+\frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}\\&= \frac{3}{2}\psi '(n+1)-\frac{1}{2}\psi '\left( n+\frac{1}{2}\right) +\frac{1}{2(n+\frac{1}{2})^2}-\frac{3}{4(n+1)^2}-\ln \left( 1+\frac{1}{n}\right) \\&\quad -\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}-\frac{7}{48(n+1)^3}+\frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}\\&> \frac{3}{2}\left( \frac{1}{n}-\frac{1}{2n^2}+\frac{1}{6n^3}-\frac{1}{30n^5}\right) -\frac{1}{2}\left( \frac{1}{n}-\frac{1}{12n^3}+\frac{7}{240n^5}\right) \\&\quad +\frac{1}{2(n+\frac{1}{2})^2}-\frac{3}{4(n+1)^2}-\left( \frac{1}{n}-\frac{1}{2n^2}+\frac{1}{3n^3}-\frac{1}{4n^4}+\frac{1}{5n^5}\right) \\&\quad -\frac{1}{2(n+1)}+\frac{11}{48(n+1)^2}-\frac{7}{48(n+1)^3}+\frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}\\&=\frac{P_5(n-2)}{480n^5(2n+1)^2(n+1)^3}, \end{aligned}$$

where

$$\begin{aligned} P_7(n)&=2152565+8661410n+14190237n^2+12516340n^3\\&\quad +6481224n^4+1980440n^5+331632n^6+23520n^7 \end{aligned}$$

and

$$\begin{aligned} P_5(n)&=6715+31135n+36739n^2+18489n^3+4268n^4+372n^5. \end{aligned}$$

We then obtain \(x_{n+1}<x_{n}\) and \(y_{n+1}>y_{n}\) for \(n\ge 2\). Direct computations give

$$\begin{aligned}&x_1=-\frac{1}{48}+\ln 2-\gamma =0.095098\ldots , \quad x_2=\frac{341}{576}-\gamma =0.014798\ldots ,\\&y_1=-\frac{1}{6}+\ln 2-\gamma =-0.050735\ldots , \quad y_2=\frac{661}{1152}-\gamma =-0.003430\ldots . \end{aligned}$$

We see that the sequence \((x_{n})\) is strictly decreasing and \((y_{n})\) is strictly increasing for \(n \ge 1\), and we have

$$\begin{aligned} x_{n}&=A_{n}-\gamma -\frac{1}{2n}+\frac{11}{48n^2} >\lim _{m\rightarrow \infty }x_{m}=0 \qquad (n\in {\mathbb {N}}) \end{aligned}$$

and

$$\begin{aligned} y_{n}&=A_{n}-\gamma -\frac{1}{2n}+\frac{11}{48n^2}-\frac{7}{48n^3} <\lim _{m\rightarrow \infty }y_{m}=0 \qquad (n\in {\mathbb {N}}). \end{aligned}$$

The proof of Theorem 4.1 is complete. \(\square \)

5 Continued-Fraction Approximation

We convert the asymptotic expansion (3.1) into a continued-fraction approximation given by Theorem 5.1.

Theorem 1.3

It is asserted that

$$\begin{aligned} A_{n}-\gamma \approx \frac{\frac{1}{2}}{n+\frac{11}{24}+\dfrac{-\frac{47}{576}}{n-\frac{5129}{5640}+\dfrac{\frac{112521}{55225}}{n+\frac{2058785551}{1480776360}+\ddots }}} \qquad (n\rightarrow \infty ). \end{aligned}$$
(5.1)

Proof

By Remark 2.4, we can convert (3.1) into a continued-fraction approximation of the form

$$\begin{aligned} A_{n}-\gamma \approx \frac{a_1}{n+b_0+\dfrac{b_1}{n+c_0+\dfrac{c_1}{n+d_0+\ddots }}}\qquad (n\rightarrow \infty ), \end{aligned}$$

where the constants in the right-hand side can be determined by using the system (2.13). We see from (1.5) that

$$\begin{aligned}&a_1=\frac{1}{2},\quad a_2=-\frac{11}{48},\quad a_3=\frac{7}{48}, \quad a_4=-\frac{31}{640}, \quad a_5=-\frac{31}{960}, \quad a_6=\frac{635}{16128}, \ldots . \end{aligned}$$

We obtain from the first recurrence relation in (2.13) that

$$\begin{aligned}&b_0=-\frac{a_2}{a_1}=\frac{11}{24},\\&b_1=-\frac{a_3+a_2b_0}{a_1}=-\frac{47}{576},\\&b_2=-\frac{a_4+a_2b_1+a_3b_0}{a_1}=-\frac{5129}{69120},\\&b_3=-\frac{a_5+a_2b_2+a_3b_1+a_4b_0}{a_1}=\frac{163853}{1658880}, \\&b_4=-\frac{a_6+a_2b_3+a_3b_2+a_4b_1+a_5b_0}{a_1}=\frac{2749273}{278691840}, \ldots . \end{aligned}$$

We obtain from the second recurrence relation in (2.13) that

$$\begin{aligned}&c_0=-\frac{b_2}{b_1}=-\frac{5129}{5640}, \\&c_1=-\frac{b_3+b_2c_0}{b_1}=\frac{112521}{55225},\\&c_2=-\frac{b_4+b_2c_1+b_3c_0}{b_1}=-\frac{2058785551}{726761000}, \ldots . \end{aligned}$$

Continuing the above process, we get

$$\begin{aligned}&d_0=-\frac{c_2}{c_1}=\frac{2058785551}{1480776360}, \ldots . \end{aligned}$$

The proof of Theorem 5.1 is thus completed. \(\square \)

Remark 5.2

Based on (5.1), we find the following two-sided inequality:

$$\begin{aligned} \frac{\frac{1}{2}}{n+\frac{11}{24}+\dfrac{-\frac{47}{576}}{n-\frac{5129}{5640}+\dfrac{\frac{112521}{55225}}{n+\frac{2058785551}{1480776360}}}}<A_{n}-\gamma < \frac{\frac{1}{2}}{n+\frac{11}{24}+\dfrac{-\frac{47}{576}}{n-\frac{5129}{5640}}} \qquad (n\in {\mathbb {N}}). \end{aligned}$$
(5.2)

Following the same method as was used in the proof of Theorem 4.1, we can prove (5.2). We here omit the proof. Elementary calculations show that

$$\begin{aligned}&\frac{\frac{1}{2}}{n+\frac{11}{24}+\dfrac{-\frac{47}{576}}{n-\frac{5129}{5640}+\dfrac{\frac{112521}{55225}}{n+\frac{2058785551}{1480776360}}}}-\left( \frac{1}{2n}-\frac{11}{48n^2}\right) \\&\quad =\frac{1764329280n^2+1071186592n+667905887}{48n^2(252047040n^3+236742280n^2+229857800n+60718717)}>0 (n\ge 1) \end{aligned}$$

and

$$\begin{aligned}&\frac{\frac{1}{2}}{n+\frac{11}{24}+\dfrac{-\frac{47}{576}}{n-\frac{5129}{5640}}}-\left( \frac{1}{2n}-\frac{11}{48n^2}+\frac{7}{48n^3}\right) \\&\quad =-\frac{4371n-6559}{48n^3(1880n^2-848n-937)}<0\quad (n\ge 2). \end{aligned}$$

Hence, for \(n\ge 2\), the two-sided inequality (5.2) is more accurate than the two-sided inequality (4.1).