1 Introduction

Let \(g\ge 2\) be an integer. A natural number N is called a base g repdigit if all of its base g-digits are equal; that is, if

$$\begin{aligned} N = a\left( \frac{g^m -1}{g-1}\right) ,\quad {\mathrm{for}}~{\mathrm{some}}\quad m\ge 1~{\mathrm{and}}~ a\in \{1,2,\ldots ,g-1\}. \end{aligned}$$

When \(g=10\), we omit the base and simply say that N is a repdigit. Diophantine equations involving repdigits were also considered in several papers which found all repdigits which are perfect powers, or Fibonacci numbers, or generalized Fibonacci numbers, and so on (see [1, 2, 4, 9, 11,12,13] for a sample of such results).

Let \(\{P_m\}_{m\ge 0}\) be the Pell sequence given by

$$\begin{aligned} P_{m+2} = 2P_{m+1} + P_m, \end{aligned}$$
(1)

for \(m\ge 0\), where \(P_0 = 0\) and \(P_1 = 1\). A few terms of this sequence are

$$\begin{aligned} 0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, \ldots \end{aligned}$$

We let \(\{Q_m\}_{m\ge 0}\) be the companion Lucas sequence of the Pell sequence given by \(Q_{m+2} = 2Q_{m+1} + Q_m\), for \(m\ge 0\), where \(Q_0 = 2\) and \(Q_1 = 2\). Its first few terms are

$$\begin{aligned} 2, 2, 6, 14, 34, 82, 198, 478, 1154, 2786, 6726, 16238, 39202, 94642, 228486, 551614, \ldots \end{aligned}$$

In [8], it was shown that there are no Pell or Pell–Lucas numbers larger than 10 with only one distinct digit.

Here, we extend this and prove the following results.

Theorem 1.1

The largest Pell number which is a sum of two repdigits is

$$\begin{aligned} P_{6} = 70 = 4 + 66. \end{aligned}$$
(2)

Theorem 1.2

The largest Pell–Lucas number which is a sum of two repdigits is

$$\begin{aligned} Q_{6} = 198 = 99 + 99. \end{aligned}$$
(3)

We organize this paper as follows: In Sect. 2, we recall some elementary properties of Pell and Pell–Lucas numbers, a result due to Matveev concerning a lower bound for a linear form in logarithms of algebraic numbers, as well as a variant of a reduction result due to Baker and Davenport reduction. The proofs of Theorems 1.1 and 1.2 are achieved in Sects. 3, 4, respectively. We start with some elementary considerations.

2 Preliminaries

2.1 Some Properties of Pell and Pell–Lucas Numbers

In this subsection, we recall some properties of Pell sequence. Binet’s formula says that

$$\begin{aligned} P_m = \frac{\alpha ^m - \beta ^m}{2\sqrt{2}}, \end{aligned}$$
(4)

for all \(m \ge 0\), where \(\alpha = 1 + \sqrt{2}\) and \(\beta = 1 - \sqrt{2}\) are the two roots of the characteristic equation \( x^2 - 2x - 1 = 0 \) of the Pell sequence.

The sequence of Pell–Lucas numbers \(\{Q_m\}_{m\ge 0}\) starts with \(Q_0 = 2, \; Q_1 = 2\) and obeys the same recurrence relation

$$\begin{aligned} Q_{m+2} = 2Q_{m+1} + Q_m, \end{aligned}$$
(5)

for all \(m \ge 0\) as Pell sequence. Its Binet formula is

$$\begin{aligned} Q_m = \alpha ^m + \beta ^m, \quad {\mathrm{for}}~{\mathrm{all}}\quad \ m \ge 0. \end{aligned}$$
(6)

2.2 Linear Forms in Logarithms

We need some results from the theory of lower bounds for nonzero linear forms in logarithms of algebraic numbers. We start by recalling Theorem 9.4 of [3], which is a modified version of a result of Matveev [14]. Let \(\mathbb {L}\) be an algebraic number field of degree \(d_{\mathbb {L}}\). Let \(\eta _1, \eta _2, \ldots , \eta _l \in \mathbb {L}\) not 0 or 1 and \(d_1, \ldots , d_l\) be nonzero integers. We put

$$\begin{aligned} D =\max \{|d_1|, \ldots , |d_l|\}, \end{aligned}$$

and

$$\begin{aligned} \Gamma = \prod _{i=1}^l \eta _i^{d_i} -1. \end{aligned}$$

Let \(A_1, \ldots , A_l\) be positive integers such that

$$\begin{aligned} A_j \ge h'(\eta _j) := \max \{d_{\mathbb {L}}h(\eta _j), |\log \eta _j|, 0.16\}, \quad {\mathrm{for}}\quad j=1,\ldots l, \end{aligned}$$

where for an algebraic number \(\eta \) of minimal polynomial

$$\begin{aligned} f(X)=a_0(X-\eta ^{(1)})\cdots (X-\eta ^{(k)})\in {\mathbb Z}[X] \end{aligned}$$

over the integers with positive \(a_0\), we write \(h(\eta )\) for its Weil height given by

$$\begin{aligned} h(\eta )=\frac{1}{k}\left( \log a_0+\sum _{j=1}^k \max \{0,\log |\eta ^{(j)}|\}\right) . \end{aligned}$$

The following consequence of Matveev’s theorem is Theorem 9.4 in [3].

Theorem 2.1

If \(\Gamma \ne 0\) and \(\mathbb {L}\subseteq \mathbb {R}\), then

$$\begin{aligned} \log |\Gamma | > -1.4 \cdot 30^{l+3}l^{4.5}d_{\mathbb {L}}^2(1+ \log d_{\mathbb {L}})(1+ \log D)A_1A_2\cdots A_l. \end{aligned}$$

2.3 The Baker–Davenport Lemma

Here, we present a variant of the reduction method of Baker and Davenport due to de Weger [6].

Let \(\vartheta _1,\vartheta _2,\beta \in \mathbb {R}\) be given, and let \(x_1,x_2\in \mathbb {Z}\) be unknowns. Let

$$\begin{aligned} \Lambda =\beta +x_1\vartheta _1 +x_2\vartheta _2. \end{aligned}$$
(7)

Let c, \(\delta \) be positive constants. Set \(X=\max \{|x_1|,|x_2|\}\). Let \(X_0, Y\) be positive. Assume that

$$\begin{aligned} |\Lambda |< & {} c\cdot \exp (-\delta \cdot Y), \end{aligned}$$
(8)
$$\begin{aligned} X\le & {} X_0. \end{aligned}$$
(9)

When \(\beta =0\) in (7), we get

$$\begin{aligned} \Lambda =x_1\vartheta _1 +x_2\vartheta _2. \end{aligned}$$

Put \(\vartheta =-{\vartheta _1}/{\vartheta _2}\). We assume that \(x_1\) and \(x_2\) are coprime. Let the continued fraction expansion of \(\vartheta \) be given by

$$\begin{aligned}{}[a_0,a_1,a_2,\ldots ], \end{aligned}$$

and let the kth convergent of \(\vartheta \) be \({p_k}/{q_k}\) for \(k=0,1,2,\ldots \). We may assume without loss of generality that \(|\vartheta _1|<|\vartheta _2|\) and that \(x_1>0\). We have the following results.

Lemma 2.1

(See Lemma 3.2 in [6]) Let

$$\begin{aligned} A=\max _{0\le k\le Y_0} a_{k+1}. \end{aligned}$$

If (8) and (9) hold for \(x_1\), \(x_2\) and \(\beta =0\), then

$$\begin{aligned} Y<\frac{1}{\delta }\log \left( \frac{c(A+2)X_0}{|\vartheta _2|}\right) . \end{aligned}$$
(10)

When \(\beta \ne 0\) in (7), put \(\vartheta =-{\vartheta _1}/{\vartheta _2}\) and \(\psi ={\beta }/{\vartheta _2}\). Then we have

$$\begin{aligned} \frac{\Lambda }{\vartheta _2}=\psi -x_1\vartheta +x_2. \end{aligned}$$

Let p / q be a convergent of \(\vartheta \) with \(q>X_0\). For a real number x we let \(\Vert x\Vert =\min \{|x-n|, n\in {\mathbb Z}\}\) be the distance from x to the nearest integer. We have the following result.

Lemma 2.2

(See Lemma 3.3 in [6]) Suppose that

$$\begin{aligned} \parallel q \psi \parallel >\frac{ 2X_0}{q}. \end{aligned}$$

Then, the solutions of (8) and (9) satisfy

$$\begin{aligned} Y<\frac{1}{\delta }\log \left( \frac{q^2c}{|\vartheta _2|X_0} \right) . \end{aligned}$$

3 The Proof of Theorem 1.1

3.1 An Elementary Estimate

We assume that

$$\begin{aligned} P_n = d_1\left( \frac{10^{m_1} - 1}{9}\right) + d_2\left( \frac{10^{m_2} - 1}{9}\right) , \end{aligned}$$
(11)

for some integers \(m_1 \le m_2\) and \(d_1, d_2 \in \{1, 2, \ldots , 9\}.\) A quick computation with Maple reveals no solutions in the interval \( n \in [7, 1000].\) So, from now on, we may assume that \(n > 1000.\) For this computation, we first note that \(P_{1000}\) has 383 digits. Thus, we generated the list of all repdigits with at most 383 digits; let us call it \(\mathcal {A}.\) Then, for every \(n \in [7, 1000],\) we computed \(M := \lfloor {\log P_n}/ {\log {10}} \rfloor + 1\) (the number of digits of \(P_n\)) and then checked whether \( P_n - d(10^m - 1)/9\) is a member of \(\mathcal {A}\), for some digit \(d \in \{1, \ldots , 9\}\) and some \(m \in \{M-1, M\}.\) This computation took a few minutes.

Lemma 3.1

All solutions of Eq. (11) satisfy

$$\begin{aligned} m_2 \log 10 - 3< n \log \alpha < m_2 \log 10 + 3. \end{aligned}$$

Proof

The proof follows easily from the fact that \(\alpha ^{n-2}< P_n < \alpha ^{n-1},\) for \(n\ge 2\). One can see that

$$\begin{aligned} \alpha ^{n-2}< P_n <2 \cdot 10^{m_2}. \end{aligned}$$

Taking the logarithm of all sides, we get \( (n-2) \log \alpha < \log 2 + m_2 \log 10,\) which leads to

$$\begin{aligned} n \log \alpha< 2\log \alpha + \log 2 + m_2 \log 10 < m_2 \log 10 + 3. \end{aligned}$$

The lower bound follows similarly. \(\square \)

We first return to Eq. (11) and use the Binet formula (4) to get

$$\begin{aligned} \frac{\alpha ^n - \beta ^n}{2\sqrt{2}} =d_1 \left( \frac{10^{m_1} - 1}{9}\right) + d_2 \left( \frac{10^{m_2} - 1}{9}\right) ; \end{aligned}$$

i.e.,

$$\begin{aligned} \frac{9}{2\sqrt{2}}(\alpha ^n - \beta ^n) - d_110^{m_1} - d_2 10^{m_2} = -(d_1 + d_2). \end{aligned}$$
(12)

We examine (12) in two different steps as follows.

Step 1 Equation (12) gives

$$\begin{aligned} \frac{9}{2\sqrt{2}}\alpha ^n - d_2 10^{m_2} =d_110^{m_1} + \frac{9}{2\sqrt{2}}\beta ^n - (d_1 + d_2), \end{aligned}$$

which we rewrite as

$$\begin{aligned} \left|\frac{9}{2 \sqrt{2}}\alpha ^n - d_2 10^{m_2}\right|= \left|d_1 10^{m_1} +\frac{9}{2 \sqrt{2}}\beta ^n - (d_1 + d_2) \right|< 30 \cdot 10^{m_1}. \end{aligned}$$

Thus, dividing both sides by \(d_2 10^{m_2},\) we get

$$\begin{aligned} \left|\left( \frac{9}{2 \sqrt{2}d_2}\right) \alpha ^n 10^{-m_2} - 1\right|< \frac{30}{10^{m_2 - m_1}}. \end{aligned}$$
(13)

Put

$$\begin{aligned} \Gamma := \left( \frac{9}{2 \sqrt{2}d_2}\right) \alpha ^n 10^{-m_2} - 1. \end{aligned}$$
(14)

We compare this upper bound with the lower bound on the quantity \(\Gamma \) given by Theorem 2.1. Observe first that \(\Gamma \) is not zero, for if it were, then \(\sqrt{2}=q\alpha ^n,\) with some \( q \in \mathbb {Q},\) and hence \(\alpha ^{2n}=2q^{-2} \in \mathbb {Q},\) which is false for any \(n > 0\). We take

$$\begin{aligned} \eta _1 = \frac{9}{2 \sqrt{2}d_2},\; \eta _2 = \alpha ,\; \eta _3 = 10,\; d_1 = 1,\; d_2 = n,\; d_3 = - m_2, \end{aligned}$$

where \( \eta _1 ,\; \eta _2 ,\; \eta _3 \in \mathbb {Q}(\sqrt{2})\) and \( d_1 ,\; d_2 ,\; d_3 \in \mathbb {Z}.\) The degree of \({\mathbb L}:=\mathbb {Q}(\sqrt{2})\) is \(d_{\mathbb {L}} = 2.\)

Since \(10^{m_2-1}< P_n < \alpha ^{n-1},\) we have that \(m_2 < n\). Therefore, we can take \( D = n.\) We note also that the conjugates of \(\eta _1, \; \eta _2,\) and \(\eta _3\) are \(\eta _1' = -\eta _1, \; \eta _2' = \beta , \; \eta _3' = \eta _3.\) Furthermore, \(\eta _1, \; \eta _2\) are algebraic integers, while the minimal polynomial of \(\eta _1\) over \(\mathbb {Q}\) is

$$\begin{aligned} (X - \eta _1) (X - \eta _1') = X^2 - \frac{81}{8d_2^2}. \end{aligned}$$

Hence, we get

$$\begin{aligned} h(\eta _1) \le h(9) + h(2d_2\sqrt{2}) \le h(9) + h(18) + h(\sqrt{2}), \end{aligned}$$

which implies that

$$\begin{aligned} 2h(\eta _1) < 10.9. \end{aligned}$$

Thus, we can take

$$\begin{aligned} A_1 := 10.9. \end{aligned}$$

Clearly,

$$\begin{aligned} h(\eta _2) = \frac{1}{2}\log \alpha , \quad h(\eta _3) = \log (10). \end{aligned}$$

We have

$$\begin{aligned} \max \{2 h(\eta _2), |\log \eta _2|, 0.16\}&= \log (\alpha )< 0.9 := A_2.\\ \max \{2 h(\eta _3), |\log \eta _3|, 0.16\}&= 2 \log (10) < 4.7 := A_3. \end{aligned}$$

Theorem 2.1 tells us that

$$\begin{aligned} \log |\Gamma | > -1.4 \cdot 30^{l+3}l^{4.5}d_{\mathbb {L}}^2(1+ \log d_{\mathbb {L}})(1+ \log D)A_1A_2A_3. \end{aligned}$$

Comparing this last inequality with (13) leads to

$$\begin{aligned} \left( m_2 - m_1\right) \log (10) < \log (30) + 5 \cdot 10^{13} (1 + \log n) \end{aligned}$$

giving

$$\begin{aligned} (m_2 - m_1) \log (10) < 5.1 \cdot 10^{13} (1 + \log n) . \end{aligned}$$

Thus, we obtain

$$\begin{aligned} m_2 - m_1 < 2.21 \cdot 10^{13} (1 + \log n). \end{aligned}$$
(15)

Step 2 Equation (12) becomes

$$\begin{aligned} \frac{\alpha ^n}{2\sqrt{2}} - \frac{d_110^{m_1} + d_2 10^{m_2}}{9} = \frac{\beta ^n}{2\sqrt{2}} - \frac{d_1 + d_2}{9}, \end{aligned}$$

which we rewrite as

$$\begin{aligned} \left|\frac{\alpha ^n}{2 \sqrt{2}} - 10^{m_2}\left( \frac{d_1 10^{m_1-m_2} + d_2}{9}\right) \right|= \left|\frac{\beta ^n}{2 \sqrt{2}} - \frac{d_1 + d_2}{9} \right|< 3. \end{aligned}$$

Thus, dividing both sides by \(\alpha ^n/{2 \sqrt{2}},\) we get

$$\begin{aligned} \left|1 - \alpha ^{-n} 10^{m_2}\left( \frac{2 \sqrt{2}(d_1 10^{m_1-m_2} + d_2 )}{9}\right) \right|< \frac{3\alpha ^2}{\alpha ^{n}} < \frac{1}{\alpha ^{n-3.25}}. \end{aligned}$$
(16)

Put

$$\begin{aligned} \Gamma ' := 1-\alpha ^{-n} 10^{m_2}\left( \frac{2 \sqrt{2}(d_1 10^{m_1-m_2} + d_2 )}{9}\right) . \end{aligned}$$
(17)

Suppose that \(\Gamma ' = 0.\) We then have

$$\begin{aligned} \alpha ^n = 2 \sqrt{2}\left( \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9}\right) . \end{aligned}$$

Conjugating in \( \mathbb {Q}(\sqrt{2})\), we get

$$\begin{aligned} \beta ^n = -2 \sqrt{2}\left( \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9}\right) . \end{aligned}$$

Consequently, we obtain

$$\begin{aligned} \frac{4 \sqrt{2} \cdot 10^{m_1}}{9} \le 2 \sqrt{2}\left( \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9}\right) = |\beta |^n < 1, \end{aligned}$$

which leads to a contradiction as \(m_1 \ge 1.\) Thus, \(\Gamma '\ne 0\). With the notations of Theorem 2.1, we take

$$\begin{aligned} \eta _1 = \left( \frac{2 \sqrt{2}(d_1 10^{m_1-m_2} + d_2 )}{9}\right) ,\; \eta _2 = \alpha ,\; \eta _3 = 10,\; d_1 = 1,\; d_2 = -n,\; d_3 = m_2, \end{aligned}$$

where \( \eta _1 ,\; \eta _2 ,\; \eta _3 \in \mathbb {Q}(\sqrt{2})\) and \( d_1 ,\; d_2 ,\; d_3 \in \mathbb {Z}.\) The degree of \({\mathbb L}:=\mathbb {Q}(\sqrt{2})\) is \(d_{\mathbb {L}} = 2\).

Since \(1 \le m_1 \le m_2\) and \(m_2 < n\), we can take \( D = n.\) We now discuss the \( A_j\)’s for \(j=1,2,3\). We have

$$\begin{aligned} h(\eta _1)\le & {} h\left( 2\sqrt{2}\left( \frac{d_1 10^{m_1-m_2} + d_2}{9}\right) \right) \\\le & {} h(\sqrt{2}) + h(18) + h(d_1 10^{m_1-m_2} + d_2) \\\le & {} \frac{1}{2}\log 2 + h(18) + h(d_1) + h(d_2) + (m_2-m_1)h(10) +\log 2\\\le & {} 8.32 + 2.3(m_2-m_1); \end{aligned}$$

i.e.,

$$\begin{aligned} 2h(\eta _1) < 16.64 + 4.6(m_2 - m_1). \end{aligned}$$

Thus, we can take

$$\begin{aligned} A_1 := 16.64 + 4.6(m_2 - m_1). \end{aligned}$$

Clearly, we get

$$\begin{aligned} h(\eta _2) = \frac{1}{2}\log \alpha , \quad h(\eta _3) = \log (10). \end{aligned}$$

We have

$$\begin{aligned} \max \{2 h(\eta _2), |\log \eta _2|, 0.16\}&= \log (\alpha )< 0.9 := A_2.\\ \max \{2 h(\eta _3), |\log \eta _3|, 0.16\}&= 2 \log (10) < 4.7 := A_3. \end{aligned}$$

Theorem 2.1 implies that

$$\begin{aligned} \log |\Gamma _2| > -1.4 \cdot 30^{l+3}l^{4.5}d_{\mathbb {L}}^2(1+ \log d_{\mathbb {L}})(1+ \log D)A_1A_2A_3. \end{aligned}$$

Comparing this last inequality with (16) leads to

$$\begin{aligned} (n - 3.25)\log (\alpha ) < 5 \cdot 10^{12} ( 16.64 + 4.6(m_2 - m_1)) (1 + \log n). \end{aligned}$$

Hence, using inequality (15), we obtain

$$\begin{aligned} n \log (\alpha ) - \log (\alpha ^{3.25}) < 5 \cdot 10^{12} ( 16.64 + 4.6( 2.21 \cdot 10^{13} (1 + \log n))) (1 + \log n). \end{aligned}$$

The above inequality gives us

$$\begin{aligned} n < 3 \cdot 10^{30}. \end{aligned}$$

Lemma 3.1 implies

$$\begin{aligned} m_1\le m_2 < 1.2 \cdot 10^{30}. \end{aligned}$$

We summarize what we have proved so far in the following lemma.

Lemma 3.2

All solutions of Eq. (11) satisfy

$$\begin{aligned} m_1\le m_2< 1.2 \cdot 10^{30},\;\; n < 3 \cdot 10^{30}. \end{aligned}$$

3.2 Bound Reduction

To lower this bound, we return to Eq. (11). We rewrite it into the form

$$\begin{aligned} P_n = \frac{d_2 10^{m_2}}{9} + \left( d_1 \frac{ 10^{m_1} - 1}{9} - \frac{d_2}{9}\right) . \end{aligned}$$

Observe that the term in parentheses is always positive or zero and is zero only when \( d_1 = m_1 = 1\) and \( d_2 = 9\). In this last case, we get \(P_n = 10^{m_2},\) but such a relation is not possible for \(n > 1000,\) because by the primitive divisor theorem (see [5]), the Pell number \(P_n\) has a prime factor \(\ge n-1\), for all values of \(n > 12.\) Thus, the number appearing in parentheses is \(\ge 1/9.\) Hence,

$$\begin{aligned} \frac{ \alpha ^n}{2\sqrt{2}} - \frac{d_2 10^{m_2}}{9} = \left( d_1 \frac{10^{m_1} - 1}{9} - \frac{d_2}{9}\right) + \frac{ \beta ^n}{2\sqrt{2}} \ge \frac{1}{9} - \frac{1}{2\sqrt{2}\alpha ^{1000}} > 0. \end{aligned}$$

Hence, from the above notations given by (13) and (14), we have

$$\begin{aligned} 0< \eta _1 \eta _2^n \eta _3^{-m_2} - 1 < \frac{30}{10^{m_2 - m_1}}. \end{aligned}$$

Put

$$\begin{aligned} \Lambda = - m_2 \log 10 + n \log \alpha + \log \left( \frac{9}{2 d_2 \sqrt{2}}\right) . \end{aligned}$$

We obtain that

$$\begin{aligned} \frac{\alpha ^n}{2\sqrt{2}} - \frac{d_2 10^{m_2}}{9} = \frac{d_2 10^{m_2}}{9}\left( e^\Lambda - 1\right) > 0, \end{aligned}$$

so

$$\begin{aligned} 0< \Lambda< e^{\Lambda } - 1 = \Gamma < \frac{30}{10^{m_2 - m_1}}, \end{aligned}$$

which implies that

$$\begin{aligned} 0< & {} \log \left( \frac{9}{2 d_2 \sqrt{2}}\right) + m_2(-\log 10) + n \log \alpha< \frac{30}{10^{m_2 - m_1}}\\< & {} 10^{1.5} \exp (-2.3 \cdot (m_2 - m_1)) . \end{aligned}$$

Thus, we see that

$$\begin{aligned} \Lambda < 10^{1.5} \exp (-2.3 Y) \end{aligned}$$

holds with \(Y:=m_2 - m_1< m_2 < 1.2 \cdot 10^{30}.\)

We also have

$$\begin{aligned} \frac{\Lambda }{\log 10} = \frac{\log (9/(2 d_2 \sqrt{2}))}{\log 10} + n\frac{\log \alpha }{\log 10} - m_2 . \end{aligned}$$

Thus, we take

$$\begin{aligned} c&= 10^{1.5}, \; \delta = 2.3, \; X_0 = 1.2 \cdot 10^{30}, \; \psi = \frac{\log (9/(2 d_2 \sqrt{2}))}{\log 10},\\ \vartheta&= -\frac{\log \alpha }{\log 10} , \; \vartheta _1 = \log \alpha , \; \vartheta _2 = \log 10, \; \beta = \log (9/{2 d_2 \sqrt{2}}). \end{aligned}$$

The smallest value of \(q > X_0\) is \(q = q_{69}.\) We find that \(q_{72}\) satisfies the hypothesis of Lemma 2.2 for \(d_2 = 1, \ldots , 9.\) Applying it, we get \(m_2 - m_1 =Y\le 36. \) We now take \(0 \le m_2 - m_1 \le 36. \)

Put

$$\begin{aligned} \Lambda ' = - n \log \eta _2 + m_2 \log \eta _3 + \log \eta _1. \end{aligned}$$

From Eq. (12), we have that

$$\begin{aligned} \frac{\alpha ^n}{2 \sqrt{2}}(1 - e^{\Lambda '}) = \frac{\beta ^n}{2 \sqrt{2}} - (d_1 + d_2)/9 = -\left( (d_1 + d_2)/9 - \frac{(-1)^n}{2 \sqrt{2} \alpha ^n} \right) . \end{aligned}$$

Furthermore, we obtain

$$\begin{aligned} \frac{d_1 + d_2}{9} - \frac{(-1)^n}{2 \sqrt{2}\alpha ^n}> \frac{2}{9} - \frac{1}{2 \sqrt{2}\alpha ^{1000}} > 0 . \end{aligned}$$

Thus, one can see that

$$\begin{aligned} e^{\Lambda '} - 1 > 0. \end{aligned}$$

Hence, \(\Lambda '> 0,\) and so from (23) we see that

$$\begin{aligned} 0< \Lambda '< e^{\Lambda '} - 1 = |\Gamma '| < \frac{ 1}{\alpha ^{n-3.25}}, \end{aligned}$$

which implies that

$$\begin{aligned} 0< & {} \log \left( \frac{2 \sqrt{2} ( d_2 10^{m_1-m_2} + d)}{9}\right) + m_2 \log 10 + n (-\log \alpha )< \frac{1}{\alpha ^{n-3.25}} \\< & {} \alpha ^{3.25} \exp (-0.88 \cdot n) . \end{aligned}$$

We consider \(X_0 = 3 \cdot 10^{30}\)

$$\begin{aligned} \psi '&= \frac{\log ({2 \sqrt{2}(d_1 10^{m_1-m_2} + d_2 )}/9)}{\log 10}, \; c = \alpha ^{3.25}, \; \delta = 0.88,\\ \vartheta&= \frac{\log \alpha }{\log 10} , \; \vartheta _1 = - \log \alpha , \; \vartheta _2 = \log 10, \; \beta = \log ({2 \sqrt{2}(d_1 10^{m_1-m_2} + d_2 )}/9). \end{aligned}$$

We get \(q = q_{78} > X_0\), and by Lemma 2.2, we obtain \(n \le 108.\) This contradicts the assumption that \(n > 1000.\) Therefore, the theorem is proved.

4 The Proof of Theorem 1.2

The proof is similar to that of Theorem 1.1. We may sometimes omit some details.

4.1 An Elementary Estimate

We assume that

$$\begin{aligned} Q_n = d_1\left( \frac{10^{m_1} - 1}{9}\right) + d_2\left( \frac{10^{m_2} - 1}{9}\right) , \end{aligned}$$
(18)

for some integers \(m_1 \le m_2\) and \(d_1, d_2 \in \{1, 2, \ldots , 9\}.\) A quick computation with Maple reveals no solutions in the interval \( n \in [7, 1000].\) So, from now on, we may assume that \(n > 1000.\) For this computation, we first note that \(Q_{1000}\) has 383 digits. Thus, we generated the list of all repdigits with at most 383 digits; let us call it \(\mathcal {A}.\) Then, for every \(n \in [7, 1000],\) we computed \(M := \lfloor {\log Q_n}/ {\log {10}} \rfloor + 1\) (the number of digits of \(Q_n\)) and then checked whether \( Q_n - d\frac{10^m - 1}{9}\) is a member of \(\mathcal {A}\), for some digit \(d \in \{1, \ldots , 9\}\) and some \(m \in \{M-1, M\}.\) This computation took a few minutes.

Lemma 4.1

All solutions of Eq. (18) satisfy

$$\begin{aligned} m_2 \log 10 - 4< n \log \alpha < m_2 \log 10 + 2. \end{aligned}$$

Proof

The proof follows easily from the fact that \(\alpha ^{n-1}< Q_n < \alpha ^{n+1},\) for \(n\ge 1\). One can see that

$$\begin{aligned} \alpha ^{n-1}< Q_n <2 \cdot 10^{m_2}. \end{aligned}$$

Taking the logarithm of all sides, we get \( (n-1) \log \alpha < \log 2 + m_2 \log 10,\) which leads to

$$\begin{aligned} n \log \alpha< \log \alpha + \log 2 + m_2 \log 10 < m_2 \log 10 + 2. \end{aligned}$$

Similarly, we get the lower bound. \(\square \)

Next, we return to Eq. (18) and use Binet’s formula (6) to get

$$\begin{aligned} \alpha ^n + \beta ^n = d_1 \left( \frac{10^{m_1} - 1}{9}\right) + d_2 \left( \frac{10^{m_2} - 1}{9}\right) ; \end{aligned}$$

i.e.,

$$\begin{aligned} 9(\alpha ^n + \beta ^n) - d_110^{m_1} - d_2 10^{m_2} = -(d_1 + d_2). \end{aligned}$$
(19)

We examine (19) in two different steps as follows.

Step 1 Equation (19) gives

$$\begin{aligned} 9\alpha ^n - d_2 10^{m_2} = d_110^{m_1} - 9\beta ^n - (d_1 + d_2), \end{aligned}$$

which we rewrite as

$$\begin{aligned} \left|9\alpha ^n - d_2 10^{m_2}\right|= \left|d_1 10^{m_1} - 9\beta ^n - (d_1 + d_2) \right|< 36 \cdot 10^{m_1}. \end{aligned}$$

Thus, dividing both sides by \(d_2 10^{m_2},\) we get

$$\begin{aligned} \left|\left( \frac{9}{d_2}\right) \alpha ^n 10^{-m_2} - 1\right|< \frac{36}{10^{m_2 - m_1}}. \end{aligned}$$
(20)

Put

$$\begin{aligned} \Gamma _1 := \left( \frac{9}{d_2}\right) \alpha ^n 10^{-m_2} - 1. \end{aligned}$$
(21)

We apply Theorem 2.1 to \(\Gamma _1\). Observe first that \(\Gamma _1\) is not zero, for if it were, then \(\alpha ^n = \frac{d_2 10^{m_2}}{9}\). We get that \(\alpha ^n \in \mathbb {Q},\) which is false, for any \(n > 0.\) We take

$$\begin{aligned} \eta _1 = \frac{9}{d_2},\; \eta _2 = \alpha ,\; \eta _3 = 10,\; d_1 = 1,\; d_2 = n,\; d_3 = - m_2, \end{aligned}$$

where \( \eta _1,\; \eta _2 ,\; \eta _3 \in \mathbb {Q}(\alpha )\) and \( d_1 ,\; d_2 ,\; d_3 \in \mathbb {Z}.\) The degree of \({\mathbb L}:=\mathbb {Q}(\alpha )\) is \(d_{\mathbb {L}} = 2\).

Since \(10^{m_2-1}< Q_m < \alpha ^{n+1},\) we have that \(m_2 < n\). Therefore, we can take \( D = n.\) We note also that the conjugates of \(\eta _1, \eta _2,\) and \(\eta _3\) are \(\eta _1' = \eta _1, \eta _2' = \beta , \eta _3' = \eta _3.\) Furthermore, \(\eta _2\) is algebraic integer, while the minimal polynomial of \(\eta _1\) over \(\mathbb {Q}\) is

$$\begin{aligned} (X - \eta _2) (X - \eta _2') = X^2 - 2X - 1. \end{aligned}$$

Hence, we have \(h(\eta _1) \le h(9) + h(d_2) \le h(9) + h(9) \le 2 h(9).\) This implies that \(2h(\eta _1) < 8.8.\) Thus, as in the previous section we can take

$$\begin{aligned} A_1 := 8.8,\; A_2:=0.9,\; A_3:=4.7. \end{aligned}$$

From Theorem 2.1, we obtain

$$\begin{aligned} \log |\Gamma _1| > -1.4 \cdot 30^{l+3}l^{4.5}d_{\mathbb {L}}^2(1+ \log d_{\mathbb {L}})(1+ \log D)A_1A_2A_3. \end{aligned}$$

Comparing this last inequality with (20) leads to

$$\begin{aligned} (m_2 - m_1 ) \log 10 < \log (36) + 4 \cdot 10^{13} (1 + \log n), \end{aligned}$$

giving

$$\begin{aligned} m_2 - m_1 < 1.74 \cdot 10^{13} (1 + \log n). \end{aligned}$$
(22)

Step 2 Equation (19) becomes

$$\begin{aligned} \alpha ^n - \left( d_110^{m_1} + d_2 10^{m_2} \right) /9 = -\beta ^n - \frac{d_1 + d_2}{9}, \end{aligned}$$

which we rewrite as

$$\begin{aligned} \left|\alpha ^n - 10^{m_2}\left( d_1 10^{m_1-m_2} + d_2 \right) /9\right|= \left|-\beta ^n - (d_1 + d_2)/9 \right|< 3. \end{aligned}$$

Thus, dividing both sides by \(\alpha ^n,\) we get

$$\begin{aligned} \left|1-\alpha ^{-n} 10^{m_2} (d_1 10^{m_1-m_2} + d_2 )/9\right|< \frac{3}{\alpha ^n} < \frac{1}{\alpha ^{n-1.3}}. \end{aligned}$$
(23)

Put

$$\begin{aligned} \Gamma '_1 := 1-\alpha ^{-n} 10^{m_2} (d_1 10^{m_1-m_2} + d_2 )/9. \end{aligned}$$
(24)

Suppose that \(\Gamma '_1 = 0.\) Then, we have

$$\begin{aligned} \alpha ^n = \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9}. \end{aligned}$$

Conjugating in \( \mathbb {Q}(\alpha )\), we get

$$\begin{aligned} \beta ^n = \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9}. \end{aligned}$$

Consequently, we obtain

$$\begin{aligned} \frac{2 \cdot 10^{m_1}}{9} \le \frac{d_110^{m_1}}{9} + \frac{d_210^{m_2}}{9} = |\beta |^n < 1, \end{aligned}$$

which is impossible for any \(m_1 \ge 1.\) Thus, \(\Gamma '_1\ne 0\). To apply Theorem 2.1, we take

$$\begin{aligned} \eta _1 = \frac{d_1 10^{m_1-m_2} + d_2}{9},\; \eta _2 = \alpha ,\; \eta _3 = 10,\; d_1 = 1,\; d_2 = - n,\; d_3 = m_2, \end{aligned}$$

where \( \eta _1 ,\; \eta _2 ,\; \eta _3 \in \mathbb {Q}(\alpha )\) and \( d_1 ,\; d_2 ,\; d_3 \in \mathbb {Z}.\) The degree of \({\mathbb L}=\mathbb {Q}(\alpha )\) is \(d_{\mathbb {L}} = 2\).

As \(1 \le m_1 \le m_2\) and \(m_2 < n\), we can take \(D = n.\) Furthermore, we have

$$\begin{aligned} h(\eta _1)\le & {} h\left( \frac{d_1 10^{m_1-m_2} + d_2}{9}\right) \\\le & {} h(9) + h(d_1 10^{m_1-m_2} + d_2) \\\le & {} h(9) + h(d_1) + h(d_2) + (m_2-m_1)h(10) +\log 2\\\le & {} 7.28 + 2.3(m_2-m_1); \end{aligned}$$

i.e.,

$$\begin{aligned} 2h(\eta _1) < 14.56 + 4.6(m_2 - m_1). \end{aligned}$$

Thus, as before we take

$$\begin{aligned} A_1: = 14.56 + 4.6(m_2 - m_1),\; A_2:=0.9,\; A_3:=4.7. \end{aligned}$$

Applying Theorem 2.1 to \(\Gamma '_1\), we get

$$\begin{aligned} \log |\Gamma '_1| > -1.4 \cdot 30^{l+3}l^{4.5}d_{\mathbb {L}}^2(1+ \log d_{\mathbb {L}})(1+ \log D)A_1A_2A_3. \end{aligned}$$

Comparing this last inequality with (23) leads to

$$\begin{aligned} n\log \alpha - \log \alpha ^{1.3} < 5 \cdot 10^{12} (14.56 + 4.6(m_2 - m_1)) (1 + \log n). \end{aligned}$$

Hence, using inequality (15), we obtain

$$\begin{aligned} n\log \alpha - \log \alpha ^{1.3} < 5 \cdot 10^{12} (14.56 + 4.6(1.74 \cdot 10^{13} (1 + \log n))) (1 + \log n). \end{aligned}$$

The above inequality gives us

$$\begin{aligned} n < 2.3\cdot 10^{30}. \end{aligned}$$

Lemma 4.1 implies

$$\begin{aligned} m_1\le m_2 < 8.9\cdot 10^{29}. \end{aligned}$$

We summarize what we have proved so far in the following lemma.

Lemma 4.2

All solutions of Eq. (18) satisfy

$$\begin{aligned} m_1\le m_2<8.9 \cdot 10^{29},\;\; n < 2.3 \cdot 10^{30}. \end{aligned}$$

4.2 Bound Reduction

To lower the above bounds, we return to Eq. (18). We rewrite it into the form

$$\begin{aligned} Q_n = \frac{d_2 10^{m_2}}{9} + \left( d_1 \frac{ 10^{m_1} - 1}{9} - \frac{d_2}{9}\right) . \end{aligned}$$

Observe that the term in parentheses is always positive or zero and is zero only when \( d_1 = m_1 = 1\) and \( d_2 = 9\). In this last case, we get \(Q_n = 10^{m_2},\) but such a relation is not possible for \(n > 1000,\) because by the primitive divisor theorem (see [5]), the Pell–Lucas number \(Q_n\) has a prime factor \(\ge n-1\), for all values of \(n > 12.\) Thus, the number appearing in parentheses is \(\ge 1/9.\) Hence, one can see that

$$\begin{aligned} \alpha ^n - \frac{d_2 10^{m_2}}{9} = \left( d_1 \frac{10^{m_1} - 1}{9} - \frac{d_2}{9}\right) - \beta ^n \ge \frac{1}{9} - \frac{1}{\alpha ^{1000}} > 0 . \end{aligned}$$

From \(\Gamma _1\) given by (21), we have

$$\begin{aligned} 0< \eta _1 \eta _2^n \eta _3^{-m_2} - 1 < \frac{36}{10^{m_2 - m_1}}. \end{aligned}$$

Let

$$\begin{aligned} \Lambda _1 = - m_2 \log 10 + n \log \alpha + \log \left( \frac{9}{d_2 }\right) . \end{aligned}$$

We get

$$\begin{aligned} \alpha ^n - \frac{d_2 10^{m_2}}{9} = \frac{d_2 10^{m_2}}{9}\left( e^{\Lambda _1} - 1\right) > 0, \end{aligned}$$

so

$$\begin{aligned} 0< \Lambda _1< e^{\Lambda _1} - 1 = \Gamma _1 < \frac{36}{10^{m_2 - m_1}}, \end{aligned}$$

which implies that

$$\begin{aligned} 0< & {} \log \left( \frac{9}{d_2 }\right) + m_2(-\log 10) + n \log \alpha< \frac{36}{10^{m_2 - m_1}} \\< & {} 10^{1.56} \exp (-2.3 \cdot (m_2 - m_1)). \end{aligned}$$

Thus, one can see that

$$\begin{aligned} \Lambda _1 < 10^{1.56} \exp (-2.3 Y), \end{aligned}$$

with \(Y:=m_2 - m_1< n < 2.3 \cdot 10^{30}.\) We also have that

$$\begin{aligned} \frac{\Lambda _1}{\log 10} = \frac{\log (9/{d_2 })}{\log 10} + n\frac{\log \alpha }{\log 10} - m_2. \end{aligned}$$

Therefore, we take

$$\begin{aligned} c&= 10^{1.56}, \; \delta = 2.3, \; X_0 = 2.3 \cdot 10^{30}, \; \psi = \frac{\log (9/{ d_2})}{\log 10}\\ \vartheta&= -\frac{\log \alpha }{\log 10} , \; \vartheta _1 = \log \alpha , \; \vartheta _2 = \log 10, \; \beta = \log (9/{ d_2 }). \end{aligned}$$

The smallest value of \(q > X_0\) is \(q = q_{69}.\) We find that \(q_{71}\) satisfies the hypotheses of Lemma 2.2 for \(d_2 = 1, \ldots , 8\) (over all the values of \(d_2\ne 9\)). Applying Lemma 2.2, we get \(m_2 - m_1=Y \le 35 \) for \(d_2\ne 9\).

When \(d_2=9\), we get that \( \beta = 0.\) The largest partial quotient \( a_k\) for \(0 \le k \le 146\) is \( a_{120} = 561.\) Applying Lemma 2.1, \(m_2 - m_1=Y < m_2 \le X_0:=2.3\times 10^{30}\) that

$$\begin{aligned} m_2 - m_1 < \frac{1}{2.3}\log \left( \frac{10^{1.56}(561 + 2)\cdot 2.3\cdot 10^{30}}{|\log 10|}\right) , \end{aligned}$$

We obtain \( m_2 - m_1 \le 34 \), so we get the same conclusion as before, namely that \( m_2 - m_1 \le 35\).

Taking \(1 \le d_1, d_2 \le 9\) and \( 0 \le m_2 - m_1 \le 35,\) we let

$$\begin{aligned} \Lambda '_1 = - n \log \eta _2 + m_2 \log \eta _3 + \log \eta _1. \end{aligned}$$

From Eq. (19), we have that

$$\begin{aligned} \alpha ^n(1 - e^{\Lambda '_1}) = -\beta ^n - \frac{d_1 + d_2}{9} = -\left( \beta ^n + \frac{d_1 + d_2}{9}\right) . \end{aligned}$$

Furthermore, one can see that

$$\begin{aligned} \beta ^n + \frac{d_1 + d_2}{9}> - \frac{1}{\alpha ^n} + \frac{2}{9}> - \frac{1}{\alpha ^{1000}} + \frac{2}{9} > 0 . \end{aligned}$$

Thus, we get

$$\begin{aligned} e^{\Lambda '_1} - 1 > 0. \end{aligned}$$

Hence, \(\Lambda '_1> 0\) and so from (23) we see that

$$\begin{aligned} 0< \Lambda ' _1< e^{\Lambda '_1} - 1 = |\Gamma '_1|< \frac{ 3}{\alpha ^{n}} < \frac{1}{\alpha ^{n-1.3}}, \end{aligned}$$

which implies that

$$\begin{aligned} 0< & {} \log \left( \frac{d_2 10^{m_2-m_1} + d_1}{ 9 }\right) + m_2 \log 10 + n (-\log \alpha )< \frac{1}{\alpha ^{n-1.3}}\\< & {} \alpha ^{1.3} \exp (-0.88 \cdot n) . \end{aligned}$$

We keep the same values for \(X_0\) and only change \(\psi \) to

$$\begin{aligned} \psi '&= \frac{\log ({d_2 10^{m_1-m_2} + d_1 }/9)}{\log 10}, \; \delta = 0.88, \; c = \alpha ^{1.3}, \; \beta = \log ({d_2 10^{m_2-m_1} + d_1 }/9),\\ \vartheta&= \frac{\log \alpha }{\log 10} , \; \vartheta _1 = - \log \alpha , \; \vartheta _2 = \log 10, \; \beta = \log ({d_1 10^{m_1-m_2} + d_2 }/9). \end{aligned}$$

We get \(q = q_{75} > X_0. \) By Lemma 2.2, over all the possibilities for the digits \(d_1,d_2\in \{1,\ldots ,9\}\) and \(m_2-m_1\in \{0,\ldots ,33\}\) except for \(m_1=m_2\) and \(d_1+d_2=9\), we get \(n \le 101.\)

When \(m_2 = m_1\) and \(d_1 + d_2 = 9,\) we have \( \beta = 0.\) The largest partial quotient \( a_k\) for \(0 \le k \le 146\) is \( a_{119} = 561.\) Applying Lemma 2.1, we get

$$\begin{aligned} n < \frac{1}{0.88} \cdot \log \left( \frac{\alpha ^{1.3}(561 + 2)\cdot 2.3\cdot 10^{30}}{|\log 10|}\right) . \end{aligned}$$

We obtain \( n <86\), so we get the same conclusion as before, namely that \( n \le 101.\) This contradicts the assumption that \(n > 1000.\) Hence, the theorem is proved.