1 Introduction

For \(x\in (0,1)\setminus {\mathbb {Q}}\), let \([a_1(x),a_2(x),a_3(x),\ldots ]\) be the continued fraction expansion of x, where \(a_1(x),a_2(x),a_3(x),\ldots \) are positive integers, and are called the partial quotients of x. See [9, 12] for more information on continued fractions.

One of the major problems in the study of continued fractions is to investigate the growth behavior of the partial quotients \(a_n(x)\) for almost all \(x\in (0,1)\setminus {\mathbb {Q}}\), see for example [5, 7, 8, 10, 11, 15, 17]. A central result in this topic is the Borel-Bernstein theorem (see [1, 2]), which states that for any \(\psi : {\mathbb {N}} \rightarrow {\mathbb {R}}^+\), the set \(\{x \in x\in (0,1)\setminus {\mathbb {Q}}:a_n(x) \ge \psi (n)\;\text {for infinitely many\;n's}\}\) has full or null Lebesgue measure according to whether the series \(\sum _{n \ge 1} 1/\psi (n)\) diverges or converges. Combining this with the fact that for any \(k \ge 1\),

$$\begin{aligned} \frac{1}{2k} \le {\mathcal {L}}\big \{x \in (0,1)\setminus {\mathbb {Q}}: a_n(x) \ge k\big \} \le \frac{2}{k}\ \forall n \ge 1, \end{aligned}$$

where \({\mathcal {L}}\) denotes the Lebesgue measure, we deduce that for Lebesgue almost all \(x \in (0,1)\setminus {\mathbb {Q}}\),

$$\begin{aligned} \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=0 \ \ \ \ \ \text {and}\ \ \ \ \ \limsup _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=1. \end{aligned}$$
(1.1)

Recently, Fang, Ma, and Song [5] showed that the set of points for which the liminf in (1.1) is equal to a given positive real number has Hausdorff dimension one-half; while the set of points such that the limsup in (1.1) is equal to a given positive real number is of full Hausdorff dimension. These aforementioned results say that the growth behavior of partial quotients is strange in the senses of Lebesgue measure and Hausdorff dimension. To understand this well, we are concerned with the subtle set of points for which the liminf and limsup in (1.1) have different values. More precisely, for \(\alpha , \beta \in [0,\infty ]\) with \(\alpha \le \beta \), let

$$\begin{aligned} E(\alpha ,\beta ):=\left\{ x\in (0,1)\setminus {\mathbb {Q}}: \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=\alpha ,\ \limsup _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=\beta \right\} . \end{aligned}$$

Our first result is the Baire classification of \(E(\alpha ,\beta )\), which gives the “size” of \(E(\alpha ,\beta )\) from a topological point of view.

Theorem 1.1

The set \(E(\alpha ,\beta )\) is residual if and only if \(\alpha =0\) and \(\beta =\infty \).

Recall that a set is said to be of first category if it can be represented as a countable union of nowhere dense sets. A set is residual if its complement is of first category. In a certain sense, the sets of first category are considered to be “small” while the residual sets are treated to be “large” (see for example [14]). Theorem 1.1 says that \(E(\alpha ,\beta )\) is residual for the extreme case \(\alpha =0\) and \(\beta =\infty \); otherwise it is of first category. In particular, E(0, 1) has full Lebesgue measure, but is of first category. On the contrary, \(E(0,\infty )\) has Lebesgue measure zero, but is residual.

Next we discuss the fractal “size” of \(E(\alpha ,\beta )\) by calculating its Hausdorff dimension. Denote by \(\dim _{\textrm{H}}\) the Hausdorff dimension (see [3] for the definition).

Theorem 1.2

For \(\alpha , \beta \in [0,\infty ]\) with \(\alpha \le \beta \),

$$\begin{aligned} \dim _{\textrm{H}} E(\alpha ,\beta ) = \left\{ \begin{array}{ll} 1, &{} {\alpha =0;} \\ \dfrac{1}{2}, &{} {\alpha >0.} \end{array} \right. \end{aligned}$$

From Theorem 1.1, we see that \(E(\alpha ,\beta )\) for \(\alpha >0\) or \(\beta <\infty \) is “small” in the sense of Baire category. However, Theorem 1.2 means that these sets are not that “small” since they have Hausdorff dimension at least one-half. We also point out that the Hausdorff dimension of \(E(\alpha ,\beta )\) is a function independent of \(\beta \).

Let \(\Lambda :=\{x\in (0,1)\setminus {\mathbb {Q}}: a_{n}(x)\le a_{n+1}(x)\,\,\forall n\ge 1\}\), namely the set of points with non-decreasing partial quotients. It was shown in [15] that \(\Lambda \) has Hausdorff dimension one-half (see also [11]). The authors of [6] proved that for \(\alpha \in [0,\infty ]\),

$$\begin{aligned} \dim _{\textrm{H}} \left\{ x\in \Lambda : \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=\alpha \right\} = \left\{ \begin{array}{ll} 0, &{} {0\le \alpha \le 1;}\\ \dfrac{\alpha -1}{2\alpha }, &{} {\alpha >1.} \end{array} \right. \end{aligned}$$
(1.2)

We will refine this result to the Hausdorff dimension of the intersection of \(\Lambda \) and \(E(\alpha ,\beta )\).

Theorem 1.3

For \(\alpha , \beta \in [0,\infty ]\) with \(\alpha \le \beta \),

$$\begin{aligned} \dim _{\textrm{H}} \big (\Lambda \cap E(\alpha ,\beta )\big ) = \left\{ \begin{array}{ll} 0, &{} {0\le \alpha \le 1;}\\ \dfrac{\alpha -1}{2\alpha }, &{} {\alpha >1.} \end{array} \right. \end{aligned}$$

The proofs of Theorems 1.11.3 will be given in the next section.

2 Proofs of the main results

In this section, we will give the proofs of our main results. To this end, we need the following notation. For \((a_1,\ldots ,a_n) \in {\mathbb {N}}^n\), let

$$\begin{aligned} I_{n}(a_1, \ldots , a_n): =\left\{ x\in (0,1):\ a_1(x)=a_1, \ldots , a_n(x)=a_n\right\} . \end{aligned}$$

It was shown in [9] that \(I_{n}(a_1,\ldots , a_n)\) is an interval with two rational endpoints.

2.1 Proof of Theorem 1.1

For simplicity, let \({\mathbb {I}}:=(0,1)\backslash {\mathbb {Q}}\). In the rest of this section, the underlying topological space is \({\mathbb {I}}\) with the induced topology. For \(\alpha \in [0,\infty ]\), put

$$\begin{aligned} {\underline{E}}(\alpha )= & {} \left\{ x\in {\mathbb {I}}: \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=\alpha \right\} , \\ \ \ {\overline{E}}(\alpha )= & {} \left\{ x\in {\mathbb {I}}: \limsup _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n}=\alpha \right\} ,\\ {\underline{E}}^*(\alpha )= & {} \left\{ x\in {\mathbb {I}}: \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n} \le \alpha \right\} , \\ \ \ {\overline{E}}^*(\alpha )= & {} \left\{ x\in {\mathbb {I}}: \limsup _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n} \ge \alpha \right\} \end{aligned}$$

and use \(E(\alpha )\) to represent \({\underline{E}}(\alpha )\cap {\overline{E}}(\alpha )\). Then \(E(\alpha ,\beta )= {\underline{E}}(\alpha )\cap {\overline{E}}(\beta )\).

Lemma 2.1

For any \(\alpha \in [0,\infty ]\), \(E(\alpha )\) is dense in \({\mathbb {I}}\).

Proof

We remark that for any \(\alpha \in [0,\infty ]\), there exists \(x_0 \in {\mathbb {I}}\) such that

$$\begin{aligned} \lim _{n \rightarrow \infty } \frac{\log a_n(x_0)}{\log n}=\alpha . \end{aligned}$$

When \(\alpha \in [0,\infty )\), take \(x_0=[\sigma _1,\sigma _2,\ldots ,\sigma _n,\ldots ]\) with \(\sigma _n:=\lfloor n^\alpha \rfloor \); when \(\alpha =\infty \), take \(x_0=[{\widehat{\sigma }}_1,{\widehat{\sigma }}_2,\ldots ,{\widehat{\sigma }}_n,\ldots ]\) with \({\widehat{\sigma }}_n:=\lfloor e^n\rfloor \). Write

$$\begin{aligned} D(x_0):=\bigcup _{K=1}^{\infty }\Big \{x\in {\mathbb {I}}: a_n(x)=a_n(x_0)\,\,\forall n\ge K\Big \}. \end{aligned}$$

Then \(D(x_0)\) is dense in \({\mathbb {I}}\). In fact, for \(y \in {\mathbb {I}}\), we can find a sequence of points in \(D(x_0)\)

$$\begin{aligned} y_n:=[a_1(y),\ldots ,a_n(y),a_{n+1}(x_0),a_{n+2}(x_0),\ldots ], \end{aligned}$$

and \(y_n \rightarrow y\) as \(n \rightarrow \infty \). Note that \(D(x_0)\) is a subset of \(E(\alpha )\), so \(E(\alpha )\) is dense. \(\square \)

Since \({\mathbb {I}}\) is a Baire space, to prove that a set is residual, it is equivalent to show that it contains a dense \(G_\delta \) subset, see for example [14, Theorem 9.2]. The method of the proof of the following result has been used by the authors in [16].

Lemma 2.2

For any \(\alpha \in (0,\infty )\), \({\underline{E}}^*(\alpha )\) and \({\overline{E}}^*(\alpha )\) are residual.

Proof

Let \(\alpha \in (0,\infty )\) be fixed. It follows from Lemma 2.1 that \({\underline{E}}^*(\alpha )\) and \({\overline{E}}^*(\alpha )\) are dense. To prove that \({\underline{E}}^*(\alpha )\) and \({\overline{E}}^*(\alpha )\) are residual, it suffices to show that they are all \(G_\delta \) sets.

For \({\underline{E}}^*(\alpha )\), we see that

$$\begin{aligned} {\underline{E}}^*(\alpha ) =\bigcap _{k=1}^\infty \bigcap _{N=1}^\infty \bigcup _{n=N}^\infty B_n(\alpha , k), \end{aligned}$$

where \(B_n(\alpha , k)\) is given by

$$\begin{aligned} B_n(\alpha , k):= \left\{ x\in {\mathbb {I}}: a_n(x) < n^{\alpha +1/k}\right\} . \end{aligned}$$

We remark that each non-empty set \(B_n(\alpha , k)\) can be written as a countable union of open sets in \({\mathbb {I}}\). To be more precise,

$$\begin{aligned} B_n(\alpha , k) = \bigcup ^{\lfloor n^{\alpha +1/k}\rfloor }_{j=1}\bigcup _{(\sigma _1,\ldots ,\sigma _{n-1})\in {\mathbb {N}}^{n-1}} I_{n}(\sigma _1,\ldots ,\sigma _{n-1}, j) \cap {\mathbb {I}}, \end{aligned}$$

where \(I_{n}(\sigma _1,\ldots ,\sigma _{n-1},j)\cap {\mathbb {I}}\) is open in \({\mathbb {I}}\). Then \({\underline{E}}^*(\alpha )\) is a \(G_\delta \) set.

For \({\overline{E}}^*(\alpha )\), we conclude that

$$\begin{aligned} {\overline{E}}^*(\alpha )=\bigcap _{k=\lfloor 1/\alpha \rfloor +1}^\infty \bigcap _{N=1}^\infty \bigcup _{n=N}^\infty {\widehat{B}}_n(\alpha , k), \end{aligned}$$

where \({\widehat{B}}_n(\alpha , k) = \left\{ x\in {\mathbb {I}}: a_n(x) > n^{\alpha -1/k}\right\} \). Since \({\widehat{B}}_n(\alpha , k)\) is a countable union of open sets in \({\mathbb {I}}\), \({\overline{E}}^*(\alpha )\) is a \(G_\delta \) set. \(\square \)

We are now in a position to give the proof of Theorem 1.1.

Proof of Theorem 1.1

For any \(K \in {\mathbb {N}}\), we deduce from Lemma 2.2 that \({\underline{E}}^*(1/K)\) and \({\overline{E}}^*(K)\) are residual. Note that

$$\begin{aligned} {\underline{E}}^*(0)=\cap ^\infty _{K=1}{\underline{E}}^*(1/K)\ \ \ \text {and} \ \ \ {\overline{E}}^*(\infty )=\cap ^\infty _{K=1}{\overline{E}}^*(K) \end{aligned}$$

since the countable intersection of residual sets is also residual, we obtain that \({\underline{E}}^*(0)\) and \({\overline{E}}^*(\infty )\) are residual. Consequently, \(E(0,\infty )\) is residual.

By the definition of the set of first category, every subset of a set of first category is also of first category. For \(\alpha >0\) or \(\beta <\infty \), each set \(E(\alpha ,\beta )\) is a subset of the complement of \(E(0,\infty )\), and so \(E(\alpha ,\beta )\) is of first category. \(\square \)

2.2 Proof of Theorem 1.2

We will use the following lemma to prove Theorem 1.2 by choosing a suitable sequence \(\{s_n\}\). See [13] for a general result.

Lemma 2.3

([4, Lemma 3.2]). Let \(\{s_n\}\) be a sequence of positive real numbers such that \(s_n \rightarrow \infty \) as \(n \rightarrow \infty \). Then

$$\begin{aligned} \dim _{\textrm{H}}\big \{x\in {\mathbb {I}}: s_n\le a_n(x)<2s_n\,\,\forall n\ge 1\big \}=\frac{1}{2+\eta }, \end{aligned}$$

where \(\eta \in [0,\infty ]\) is given by

$$\begin{aligned} \eta :=\limsup \limits _{n\rightarrow \infty }\frac{\log s_{n+1}}{\log s_1 + \cdots +\log s_n}. \end{aligned}$$

Now we are ready to prove Theorem 1.2.

Proof of Theorem 1.2

We first point out three known facts (case \(\alpha =\beta \)): \(\dim _{\textrm{H}}E(0,0) =1\) (Jarník [10]); \(\dim _{\textrm{H}}E(\alpha ,\alpha )=1/2\) if \(0<\alpha <\infty \) (Fang-Ma-Song [5]); \(\dim _{\textrm{H}}E(\infty ,\infty )=1/2\) which follows from \(\dim _{\textrm{H}}\{x:a_n(x) \rightarrow \infty \}=1/2\) (Good [8]).

For the case \(\alpha <\beta \), when \(\alpha = 0\), we remark that \(E(\alpha , \beta )\) has full Hausdorff dimension, whose proof is the same as that of [5, Theorem 1.1]. So it remains to deal with the cases: \(0<\alpha<\beta <\infty \) and \(0<\alpha <\beta =\infty \).

Case (i) \(0<\alpha<\beta <\infty \). For the upper bound of \(\dim _{\textrm{H}}E(\alpha ,\beta )\), it follows from [8] that

$$\begin{aligned} \dim _{\textrm{H}}E(\alpha ,\beta ) \le \dim _{\textrm{H}} \big \{x\in {\mathbb {I}}: a_n(x) \rightarrow \infty \ \text {as}\ n \rightarrow \infty \big \} =\frac{1}{2}. \end{aligned}$$

For the lower bound of \(\dim _{\textrm{H}}E(\alpha ,\beta )\), we define \(s_n\) by \(n^\beta \) for \(n=2^k\) and by \(n^\alpha \) for other n’s. Then \(n^\alpha \le s_n \le n^\beta \) and \(\eta =0\). Write \({\mathbb {E}}:=\{x\in {\mathbb {I}}: s_n\le a_n(x)<2s_n\,\,\forall \,n\ge 1\}\). As a consequence of Lemma 2.3, \(\dim _{\textrm{H}}{\mathbb {E}} = 1/2\). Now it suffices to claim that \({\mathbb {E}}\) is a subset of \(E(\alpha , \beta )\). In fact, for \(x\in {\mathbb {E}}\), we see that

$$\begin{aligned} \alpha \le \liminf _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n} \le \limsup _{n \rightarrow \infty } \frac{\log a_n(x)}{\log n} \le \beta \end{aligned}$$

and

$$\begin{aligned} \lim _{k \rightarrow \infty } \frac{\log a_{n_k+1}(x)}{\log (n_k+1)}=\alpha \ \ \ \text {and}\ \ \ \lim _{k \rightarrow \infty } \frac{\log a_{n_k}(x)}{\log n_k}=\beta . \end{aligned}$$

Case (ii) \(0<\alpha <\beta =\infty \). The proof is very similar to that of Case (i). The upper bound follows from [8]. For the lower bound, we define \({\widehat{s}}_n\) by \(e^n\) for \(n=2^k\) and by \(n^\alpha \) for other n’s. Then \(n^\alpha \le {\widehat{s}}_n \le e^n\) and \({\widehat{\eta }}=0\). Write \(\widehat{{\mathbb {E}}}:=\{x\in {\mathbb {I}}: {\widehat{s}}_n\le a_n(x)<2{\widehat{s}}_n \forall \,n\ge 1\}\). Then \(\widehat{{\mathbb {E}}}\) is a subset of \(E(\alpha , \infty )\). It follows from Lemma 2.3 that \(\dim _{\textrm{H}}E(\alpha ,\infty ) \ge \dim _{\textrm{H}}\widehat{{\mathbb {E}}} =1/2\). \(\square \)

2.3 Proof of Theorem 1.3

To deal with \(\Lambda \cap E(\alpha ,\beta )\), we need to construct a set of continued fractions such that not only they are in \(E(\alpha ,\beta )\) but also their partial quotients are non-decreasing. This can be done by the following lemma.

Lemma 2.4

([6, Lemma 3.4]). Let \(\{t_m\}\) be a sequence of positive real numbers such that \(t_m \rightarrow \infty \) as \(m \rightarrow \infty \). Then

$$\begin{aligned} \dim _{\textrm{H}}\big \{x\in {\mathbb {I}}: mt_m\le a_m(x)<(m+1)t_m\,\,\forall m\ge 1\big \}=\frac{1}{2+\xi }, \end{aligned}$$

where \(\xi \in [0,\infty ]\) is given by

$$\begin{aligned} \xi :=\limsup \limits _{m\rightarrow \infty }\frac{2\log (m+1)!+\log t_{m+1}}{\log t_1 + \cdots +\log t_m}. \end{aligned}$$

We are going to prove Theorem 1.3.

Proof of Theorem 1.3

The upper bound follows from (1.2) and the fact that our set in question is a subset of \({\underline{E}}(\alpha )\).

For the lower bound, we only need to deal with the case \(\alpha >1\). When \(\alpha =\beta \), the proof is a direct consequence of Lemma 2.4 by letting \(t_m=m^{\alpha -1}\). Assume \(\alpha <\beta \). We are going to distinguish two cases \(\beta <\infty \) and \(\beta =\infty \).

Case (i) \(1<\alpha<\beta <\infty \). Let \(\{m_k\}\) be an increasing sequence of positive integers such that \(m_0 =1\),

$$\begin{aligned} (m_{k+1}-1)^{\alpha -1}>m^{\beta -1}_{k}, \ \ \ \text {and}\ \ \ \ m^{\beta -1}_{k+1} > (m_{k+1}-1)^{\alpha -1} +m^{\beta -1}_{k}. \end{aligned}$$

Define

$$\begin{aligned} t_m:=\left\{ \begin{array}{ll} m^{\beta -1}_k+1, &{} {m=m_k;} \\ m^{\beta -1}_k + m^{\alpha -1}, &{} {m_k<m<m_{k+1}.} \end{array} \right. \end{aligned}$$

Then \(\{t_m\}\) is increasing, \(m^{\alpha -1}<t_m <2m^{\beta -1}\), \(t_{m_k} = m^{\beta -1}_k+1\), \((m_{k+1}-1)^{\alpha -1}< t_{m_{k+1}-1} < 2(m_{k+1}-1)^{\alpha -1}\). Hence

$$\begin{aligned} \liminf _{m \rightarrow \infty } \frac{\log t_m}{\log m} =\alpha -1,\ \ \ \ \ \limsup _{m \rightarrow \infty } \frac{\log t_m}{\log m} =\beta -1 \end{aligned}$$

and consequently

$$\begin{aligned} \lim _{m \rightarrow \infty } \frac{\log t_{m+1}}{\log t_1+\cdots +\log t_m} =0. \end{aligned}$$

Write \({\mathbb {F}}:=\{x\in {\mathbb {I}}:mt_m\le a_m(x)<(m+1)t_m\,\forall \,m\ge 1\}\). So, \({\mathbb {F}}\) is a subset of \(\Lambda \cap E(\alpha ,\beta )\). In fact, for any \(x\in {\mathbb {F}}\), we have that \(a_{m+1}(x) \ge (m+1)t_{m+1} \ge (m+1)t_m >a_m(x)\) and

$$\begin{aligned} \liminf _{m \rightarrow \infty } \frac{\log a_m(x)}{\log m} =\alpha ,\ \ \ \ \ \limsup _{m \rightarrow \infty } \frac{\log a_m(x)}{\log m} =\beta . \end{aligned}$$

Note that

$$\begin{aligned} \xi \le \limsup _{m \rightarrow \infty }\frac{2\log (m+1)}{\log t_m} = \frac{2}{\alpha -1}, \end{aligned}$$

we conclude from Lemma 2.4 that \(\dim _{\textrm{H}} \big (\Lambda \cap E(\alpha ,\beta )\big ) \ge \dim _{\textrm{H}} {\mathbb {F}} \ge (\alpha -1)/(2\alpha )\).

Case (ii) \(1<\alpha <\beta =\infty \). The proof is similar to that of Case (i). Let \(\{{\widehat{m}}_k\}\) be a sequence of positive integers such that \({\widehat{m}}_0 =1\),

$$\begin{aligned} ({\widehat{m}}_{k+1}-1)^{\alpha -1}>e^{{\widehat{m}}_k}, \ \ \ \text {and}\ \ \ \ e^{{\widehat{m}}_{k+1}} > ({\widehat{m}}_{k+1}-1)^{\alpha -1} +e^{{\widehat{m}}_k}. \end{aligned}$$

Write

$$\begin{aligned} {\widehat{t}}_m:=\left\{ \begin{array}{ll} e^{{\widehat{m}}_k}, &{} {m={\widehat{m}}_k;} \\ e^{{\widehat{m}}_k} +m^{\alpha -1}, &{} {{\widehat{m}}_k<m<{\widehat{m}}_{k+1}.} \end{array} \right. \end{aligned}$$

Then

$$\begin{aligned} \liminf _{m \rightarrow \infty } \frac{\log {\widehat{t}}_m}{\log m} =\alpha -1, \ \ \ \ \limsup _{m \rightarrow \infty } \frac{\log {\widehat{t}}_m}{\log m} = \infty \end{aligned}$$

and consequently

$$\begin{aligned} \limsup _{m \rightarrow \infty } \frac{\log {\widehat{t}}_{m+1}}{\log {\widehat{t}}_1 +\cdots +\log {\widehat{t}}_m}=0. \end{aligned}$$

Let \(\widehat{{\mathbb {F}}}:=\{x\in {\mathbb {I}}:m{\widehat{t}}_m\le a_m(x)<(m+1){\widehat{t}}_m\,\,\forall \,m\ge 1\}\). So, \(\widehat{{\mathbb {F}}}\) is a subset of \(\Lambda \cap E(\alpha ,\infty )\). Applying Lemma 2.4, we obtain that

$$\begin{aligned} \dim _{\textrm{H}} \big (\Lambda \cap E(\alpha ,\infty ) \big ) \ge \dim _{\textrm{H}} \widehat{{\mathbb {F}}} \ge \frac{\alpha -1}{2\alpha }. \end{aligned}$$

\(\square \)