1 Introduction

Pillai’s Conjecture [10] states that for any given positive integer c the Diophantine equation

$$\begin{aligned} a^n - b^m =c \end{aligned}$$
(1)

has only finitely many positive integer solutions (abnm) with \(n,m\ge 2\). Pillai’s conjecture is a corollary of the abc conjecture. For \(c = 1\), it coincides with Catalan’s conjecture, which has been proved by Mihăilescu [8]. For all \(c > 1\), Pillai’s conjecture is still open.

For fixed integers ab Pillai [10, 11] proved that for sufficiently large c there is at most one solution (nm) with \(n, m \ge 2\) to Eq. (1). Pillai [9] also proved the following asymptotic result on the number of integers c in the range [1, x] which can be expressed in the form \(c = a^n - b^m\):

$$\begin{aligned} \# \{ c\in [1,x] :c=a^n - b^m \text { for some } (n,m)\in {\mathbb {N}}^2\} \sim \frac{(\log x)^2}{2 (\log a) (\log b)}, \quad \text {as } x\rightarrow \infty . \end{aligned}$$
(2)

We denote by \({\mathbb {N}}\) the set of all non-negative integers.

In recent years, there have been several papers studying a generalised version of equation (1), that is

$$\begin{aligned} U_n - V_m = c, \end{aligned}$$
(3)

where \(\{U_n\}_{n \ge 0}\) and \(\{V_m\}_{m \ge 0}\) are linear recurrence sequences of integers.

For instance, in [6] the authors considered the case where \(\{U_n\}_{n \ge 0}\) are the Fibonacci numbers and \(\{V_m\}_{m \ge 0}\) are the powers of two. In [2] the authors considered the Tribonacci numbers and powers of two and in [4] the authors considered the Fibonacci numbers and the Tribonacci numbers. In each paper, the authors found all integers c having at least two different representations of the form \(c = U_n - V_m\) for the respective sequences.

Chim et al. [5] proved, that this is possible for general linear recurrence sequences (with a few subtle restrictions), i.e. there exists an effectively computable finite set \({\mathcal {C}}\) such that Eq. (3) has at least two distinct solutions (nm) if and only if \(c \in {\mathcal {C}}\). This can be seen as the generalisation of Pillai’s result in [10, 11].

What has not been established properly yet, is for how many integers c there exists a solution to (3) at all. In other words, Pillai’s result (2) has not been extended yet. This is what we aim to do in this paper. In fact, we will find an asymptotic formula analogous to (2) for the number of integers \(c\in [-x,x]\) which can be represented as \(c=U_n-V_m\) for given linear recurrence sequences \(\{U_n\}_{n \ge 0}\) and \(\{V_m\}_{m \ge 0}\). Our proof is based on ideas from [5] and [12]Footnote 1 and in particular on lower bounds for linear forms in logarithms. A weaker version of this result has been proved by the third author in [12].

In order to state our result, we recall some definitions.

Let \(\{U_n\}_{n \ge 0}\) be a linear recurrence sequence of integers given by

$$\begin{aligned} U_{n+k}=c_1 U_{n+k-1} + \cdots + c_k U_n, \end{aligned}$$

for all \(n\ge 0\), for some given \(k\ge 1\), some given integers \(c_1,\ldots ,c_k\) with \(c_k\ne 0\) and some given integers \(U_0,\ldots ,U_{k-1}\). Then the characteristic polynomial of \(\{U_n\}_{n \ge 0}\) is defined by

$$\begin{aligned} f(X) = X^k - c_1 X^{k-1} - \cdots - c_k =\prod _{i=1}^t (X-\alpha _i)^{\sigma _i}, \end{aligned}$$

where \(\alpha _1 ,\ldots ,\alpha _t\) are distinct complex numbers and \(\sigma _1,\ldots ,\sigma _t\) are positive integers whose sum is k. It is known that for any such sequence \(\{U_n\}_{n \ge 0}\) there exist poynomials \(a_1(X),\ldots ,a_t(X)\) with coefficients in \({\mathbb {Q}}(\alpha _1,\ldots ,\alpha _t)\) and degrees \(\deg a_i(X)\le \sigma _i -1\) for \(i=1,\ldots ,t\), such that the formula

$$\begin{aligned} U_n=\sum _{i=1}^t a_i(n)\alpha _i^n \end{aligned}$$

holds for all \(n\ge 0\). We call \(\alpha =\alpha _1\) a dominant root, if \(|\alpha _1|>|\alpha _2|\ge \cdots \ge |\alpha _t|\) and \(a_1(X)\) is not the zero polynomial. In this case the sequence \(\{U_n\}_{n \ge 0}\) is said to satisfy the dominant root condition.

Now we state our main result.

Theorem 1

Let \(\{U_n\}_{n\ge 0}\) and \(\{V_m\}_{m\ge 0}\) be two linear recurrence sequences of integers satisfying the dominant root condition with dominant roots \(\alpha \) and \(\beta \) respectively. Suppose that \(|\alpha |>1\) and \(|\beta | >1\) and that \(\alpha \) and \(\beta \) are multiplicatively independent. Let

$$\begin{aligned} S(x)=\# \{c\in [-x,x]:c=U_n-V_m \text { for some } (n,m)\in {\mathbb {N}}^2\}. \end{aligned}$$

Then we have the asymptotic behaviour

$$\begin{aligned} S(x) \sim \frac{(\log x)^2}{\log |\alpha | \log |\beta |}, \quad \text {as } x \rightarrow \infty . \end{aligned}$$

More precisely, we have

$$\begin{aligned} \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot \log \log x) \le S(x) \le \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot (\log \log x)^2), \end{aligned}$$

for x large enough. The implied constants are effective.

Corollary 1

Assume the same conditions for \(\{U_n\}_{n \ge 0}\) and \(\{V_m\}_{m \ge 0}\) as in Theorem 1. Then the density of integers of the form \(U_n - V_m\) is 0.

Example 1

The Fibonacci Numbers \(\{F_n\}_{n \ge 0}\), defined by \(F_0 = 0\), \(F_1 = 1\) and \(F_{n+2} = F_n + F_{n+1}\) for \(n\ge 0\), have the dominant root \(\alpha = \frac{1+\sqrt{5}}{2}\). Therefore, by Theorem 1, the number of integers c in the range \([-x, x]\) which can be written in the form \(c = F_n - 2^m\) is asymptotically equal to

$$\begin{aligned} \frac{(\log x)^2}{\log (\frac{\sqrt{5}+1}{2}) \cdot \log 2}. \end{aligned}$$

Chim et al. [5] proved for the situation of Theorem 1 that if an integer c has a representation \(c=U_n-V_m\), then in the “generic” case this representation is unique. Therefore, instead of counting integers \(c\in [-x,x]\) which are representable as \(c=U_n-V_m\), one can count the solutions (nm) to the Diophantine inequality \(|U_n-V_m|\le x\). We will see that both ways of counting yield the same result. In fact, Theorem 1 is equivalent to the following.

Theorem 2

Let \(\{U_n\}_{n\ge 0}\) and \(\{V_m\}_{m\ge 0}\) be two linear recurrence sequences of integers satisfying the dominant root condition with dominant roots \(\alpha \) and \(\beta \) respectively. Suppose that \(|\alpha |>1\) and \(|\beta | >1\) and that \(\alpha \) and \(\beta \) are multiplicatively independent. Let

$$\begin{aligned} T(x)=\# \{ (n,m)\in {\mathbb {N}}^2 :|U_n-V_m|\le x \}. \end{aligned}$$

Then we have

$$\begin{aligned} \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot \log \log x) \le T(x) \le \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot (\log \log x)^2), \end{aligned}$$

for x large enough. The implied constants are effective.

The paper is structured as follows. In Sect. 2 we state some preliminary results, in particular results on linear forms in logarithms, heights, the result from [5] and some elementary inequalities. We also prove the equivalence of Theorems 1 and 2. In Sect. 3 we use elementary arguments to prove the lower bound for T(x). In Sect. 4 we prove the upper bound for T(x) using linear forms in logarithms. Finally, in Sect. 5 we put some further problems.

2 Preliminaries

In this section we present the tools for our proof. The most powerful one is certainly lower bounds for linear forms in logarithms. Moreover, will need some estimates for heights. Next, we state some facts on linear recurrence sequences and the result from [5], which will show the equivalence of Theorems 1 and 2. Finally, we check some simple relations between inequalities, which will be important for the proofs of the lower and the upper bound in Theorems 1 and 2.

2.1 Linear forms in logarithms and heights

Let \(\gamma \) be an algebraic number of degree \(d\ge 1\) with the minimal polynomial

$$\begin{aligned} a_d X^d + \cdots +a_1 X + a_0 = a_d \prod _{i=1}^{d} (X- \gamma _i), \end{aligned}$$

where \(a_0, \ldots , a_d\) are relatively prime integers and \(\gamma _1, \ldots , \gamma _d\) are the conjugates of \(\gamma \). Then the logarithmic height of \(\gamma \) is given by

$$\begin{aligned} h(\gamma ) = \frac{1}{d} \left( \log |a_d| + \sum _{i=1}^d \log \left( \max \{ 1,|\gamma _i|\} \right) \right) . \end{aligned}$$

Since the first results by Baker, there have been many powerful results on lower bounds for linear forms in logarithms. In particular, in 1993 Baker and Wüstholz [1] obtained a very good explicit bound. In the following years, further improvements were made. At the present time, one of the most widely used results is due to Matveev [7]. The following theorem [3, Thm. 9.4] is a consequence of Matveev’s result.

Theorem 3

(Matveev’s theorem) Let \(\gamma _1,\ldots , \gamma _t\) be non-zero algebraic numbers in a number field \({\mathbb {K}}\) of degree D, let \(b_1,\ldots ,b_t\) be rational integers, and let

$$\begin{aligned} \varLambda = \gamma _1^{b_1}\ldots \gamma _t^{b_t}-1 \end{aligned}$$

be non-zero. Then

$$\begin{aligned} \log |\varLambda |> -3 \cdot 30^{t+4} \cdot (t+1)^{5.5}\cdot D^{2} (1+\log D)(1+\log tB) A_1 \ldots A_t, \end{aligned}$$

where

$$\begin{aligned} B\ge \max \left\{ |b_1|,\ldots ,|b_t|\right\} \end{aligned}$$

and

$$\begin{aligned} A_i\ge \max \left\{ D h(\gamma _i),|\log \gamma _i|,0.16 \right\} \quad \text{ for } \quad i=1,\ldots ,t. \end{aligned}$$

In order to estimate the height of certain expressions, we will use the following two well known lemmas [5, Lems. 1 and 2].

Lemma 1

Let \({\mathbb {K}}\) be a number field and \(\alpha , \beta \in {\mathbb {K}}\) two multiplicatively independent algebraic numbers. Then there exists an effectively computable constant \(C_0=C_0(\alpha ,\beta ) > 0\) such that

$$\begin{aligned} h\left( \frac{\alpha ^n}{\beta ^m}\right) \ge C_0\, \max \{|n|, |m| \}, \quad \text {for all } n,m \in {\mathbb {Z}}. \end{aligned}$$

Lemma 2

Let \({\mathbb {K}}\) be a number field and \(p, q \in {\mathbb {K}}[x]\) two arbitrary but fixed polynomials. Then there exists an effectively computable constant \(C=C(p,q)>0\) such that

$$\begin{aligned} h\left( \frac{p(n)}{q(m)}\right) \le C \log \left( \max \{n, m \}\right) , \quad \text {for all } n,m \in {\mathbb {N}}_{\ge 2}. \end{aligned}$$

2.2 Linear recurrence sequences and solutions to \(c=U_n-V_m\)

From now on, until the end of this paper, let \(\{U_n\}_{n\ge 0}\) and \(\{V_m\}_{m\ge 0}\) be two linear recurrence sequences of integers satisfying the dominant root condition with dominant roots \(\alpha \) and \(\beta \) respectively and \(|\alpha |>1\) and \(|\beta | >1\). Moreover, we assume that \(\alpha \) and \(\beta \) are multiplicatively independent. Suppose that

$$\begin{aligned} U_n&=a(n)\alpha ^n + a_2(n)\alpha _2^n + \cdots + a_s(n)\alpha _s^n \quad \text {and} \\ V_m&=b(m)\beta ^m + b_2(m)\beta _2^m + \cdots + b_t(m)\beta _t^m, \end{aligned}$$

for all \(n,m \ge 0\). As in [5], we use the L-notation: For functions f(x), k(x) with \(k(x)>0\) for \(x>1\) we write

$$\begin{aligned} f(x)=L(k(x)) \quad \text {if} \quad |f(x)| \le k(x). \end{aligned}$$

Then we have

$$\begin{aligned} U_n&=a(n)\alpha ^n + L(a' \alpha '^n) \quad \text {and} \\ V_m&=b(m)\beta ^m + L(b' \beta '^m), \end{aligned}$$

for some \(1<\alpha '<|\alpha |\), \(1<\beta ' <|\beta |\) and \(a',b'>0\). Suppose that \(\deg a(X)=\sigma \) and \(\deg b(X)=\tau \). Then there exist positive constants \(C_1,C_2,C_3,C_4\) such that

$$\begin{aligned} C_1 |\alpha |^n&\le |U_n| \le C_2 n^\sigma |\alpha |^n \quad \text {and} \end{aligned}$$
(4)
$$\begin{aligned} C_3 |\beta |^m&\le |V_m| \le C_4 m^\tau |\beta |^m, \end{aligned}$$
(5)

for all nm large enough.

In order to prove Theorem 1, we will actually prove Theorem 2. The following lemma shows the equivalence of the two theorems. In other words, it allows us to switch between counting integers c which have a representation \(c=U_n-V_m\) and counting solutions (nm) of the Diophantine inequality \(|U_n - V_m|\le x\).

Lemma 3

Under the same assumptions as in Theorems 1 and 2, let

$$\begin{aligned} S(x)&=\# \{c\in [-x,x]:c=U_n-V_m \text { for some } (n,m)\in {\mathbb {N}}^2\} \quad \text {and}\\ T(x)&= \# \{ (n,m)\in {\mathbb {N}}^2 :|U_n-V_m|\le x \}. \end{aligned}$$

Then

$$\begin{aligned} S(x)\le T(x) \le S(x) + O(\log x). \end{aligned}$$

The first inequality is clear because each solution (nm) of \(|U_n-V_m|\le x\) corresponds to an integer c in \([-x,x]\) which has the representation \(c=U_n-V_m\).

For the second inequality we need the fact that “most” representations are unique. This was proved in [5]. We state the result as a lemma. Note that this is not the main result in [5], but it follows immediately from the proof.

Lemma 4

Assume the same conditions for \(\{U_n\}_{n \ge 0}\) and \(\{V_m\}_{m \ge 0}\) as in Theorems 1 and 2. Then there are effectively computable constants N and M such that if

$$\begin{aligned} U_n-V_m=U_{n'}-V_{m'} \quad \text {with } (n,m)\ne (n',m'), \end{aligned}$$

then either \(n\le N\) or \(m \le M\).

Proof

(Proof of Lemma 3) We need to show that \(T(x)\le S(x) + O(\log x)\). Therefore, we need to bound the number of pairs (nm) which are counted in T(x) and correspond to the same integer c as another pair. Suppose that (nm) corresponds to an integer c which has more than one representation. Then by Lemma 4 we have \(n\le N\) or \(m\le M\). Assume without loss of generality that \(m \le M\). Then we have

$$\begin{aligned} x \ge |c| = |U_n-V_m| \ge |U_n|-|V_m| \ge |U_n| - \max \{|V_0|,\ldots ,|V_{M}|\}. \end{aligned}$$

Together with (4) this yields

$$\begin{aligned} C_1 |\alpha |^n \le |U_n| \le x + \max \{|V_0|,\ldots ,|V_{M}|\}. \end{aligned}$$

Taking logarithms we get

$$\begin{aligned} n \le O(\log x). \end{aligned}$$

But there are at most \(O(\log x)\) pairs (nm) with \(m \le M\) and \(n\le O(\log x)\). Thus \(T(x)\le S(x) + O(\log x)\). \(\square \)

2.3 Some auxiliary inequalities

Lemma 5

Let k be a fixed positive number, \(c>1\) and d any fixed real number. Then for \(z\ge \max \{k^{(c-1)} e^d,1\}\) the inequality

$$\begin{aligned} n\le k z -c\log z \end{aligned}$$
(6)

implies

$$\begin{aligned} n + (c-1)\log n + d \le kz. \end{aligned}$$

Proof

Inequality (6) implies \(n\le kz\) and \(\log n \le \log k + \log z\). Thus we get

$$\begin{aligned} n + (c-1)\log n + d&\le kz -c \log z + (c-1)(\log k + \log z) + d\\&= kz - \log z + (c-1) \log k + d\\&\le kz. \end{aligned}$$

\(\square \)

Lemma 6

Let k and c be positive constants. Suppose that \(n\ge N =N(k,c)\) is a large number (to be precise, we need n to satisfy \(n\ge e^{\sqrt{2}c^{-1/2}}\) and \(k^2c^2(\log n)^4 \le n\)). Suppose that

$$\begin{aligned} n\le k z + c (\log n )^2 \end{aligned}$$

for some \(z \ge 2/k\). Then

$$\begin{aligned} n \le k z + 4c(\log z)^2. \end{aligned}$$

Proof

Note that for \(r,s\ge 2\) we have \(\log (r+s)\le \log r + \log s\). By assumption, n and z are large, in particular \(c (\log n )^2\ge 2\) and \(kz\ge 2\). Thus, using the assumptions, we have

$$\begin{aligned} \log n&\le \log \left( kz + c (\log n )^2\right) \\&\le \log (kz) + \log (c (\log n )^2)\\&\le \log k + \log z + \log c + 2 \log \log n\\&\le \log z + 0.5 \log n, \end{aligned}$$

for \(n\ge N\). Thus \(\log n \le 2 \log z\) and using the assumption again we get

$$\begin{aligned} n&\le k z + c (\log n )^2 \\&\le k z + c (2 \log z)^2\\&= k z + 4 c (\log z)^2. \end{aligned}$$

\(\square \)

3 Lower bound for T(x)

In this section we prove the lower bound for the number of solutions (nm) to the Diophantine inequality \(|U_n-V_m|\le x\):

$$\begin{aligned} T(x) \ge \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot \log \log x). \end{aligned}$$

In fact, we show that if \(n\le \log x / \log |\alpha | + O(\log \log x)\) and \(m\le \log x / \log |\beta | + O(\log \log x)\), then \(|U_n-V_m|\le x\) (if x is large enough).

Suppose that

$$\begin{aligned} n\le \frac{\log x}{\log |\alpha |} - \left( \frac{\sigma }{\log |\alpha |} + 1 \right) \log \log x. \end{aligned}$$
(7)

Then Lemma 5 with \(k=1/\log |\alpha |\), \(c={\sigma }/{\log |\alpha |}+1\) and \(d=(\log C_2 + \log 2)/\log |\alpha |\) yields for \(z=\log x\) large enough

$$\begin{aligned} n + \frac{\sigma }{\log |\alpha |} \log n + \frac{\log C_2 +\log 2}{\log |\alpha |} \le \frac{\log x}{\log |\alpha |}. \end{aligned}$$

Multiplying by \(\log |\alpha |\) and applying the exponential function we obtain

$$\begin{aligned} |\alpha |^n \cdot n^\sigma \cdot C_2 \cdot 2 \le x, \end{aligned}$$

which together with (4) implies

$$\begin{aligned} |U_n| \le C_2 n^\sigma |\alpha |^n \le \frac{x}{2}. \end{aligned}$$

Analogously, we obtain that

$$\begin{aligned} m\le \frac{\log x}{\log |\beta |} - \left( \frac{\tau }{\log |\beta |} + 1 \right) \log \log x \end{aligned}$$
(8)

implies

$$\begin{aligned} |V_m| \le C_4 m^\tau |\beta |^m \le \frac{x}{2}. \end{aligned}$$

Therefore, for all \((n,m) \in {\mathbb {N}}^2\) satisfying (7) and (8) we have

$$\begin{aligned} |U_n-V_m| \le |U_n| + |V_m| \le x. \end{aligned}$$

But the number of \((n,m)\in {\mathbb {N}}^2\) satisfying (7) and (8) is larger than

$$\begin{aligned} \left( \frac{\log x}{\log |\alpha |} + O( \log \log x ) \right) \left( \frac{\log x}{\log |\beta |} + O( \log \log x ) \right) , \end{aligned}$$

so for x large enough we have

$$\begin{aligned} T(x) \ge \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot \log \log x). \end{aligned}$$

4 Upper bound for T(x)

In this section we use linear forms in logarithms to prove the upper bound for the number of solutions (nm) to the Diophantine inequality \(|U_n-V_m|\le x\):

$$\begin{aligned} T(x) \le \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot (\log \log x)^2). \end{aligned}$$

In fact, we assume that \(|U_n-V_m|\le x\), i.e.

$$\begin{aligned} U_n-V_m= c \end{aligned}$$
(9)

with \(|c|\le x\) and show that \(n\le {\log |c|}/{\log |\alpha |} + O((\log \log |c|)^2)\) and \(m\le {\log |c|}/{\log |\beta |} + O((\log \log |c|)^2)\). This immediately yields the desired bound for T(x).

Note that we can assume that n and m are large enough, i.e. \(n\ge N\) and \(m\ge M\) for some suitable NM. This is because of the same argument as in the proof of Lemma 3: Ignoring solutions with \(n\le N\) or \(m\le M\), we only miss \(O(\log x)\) solutions, which has no impact on our result. Similarly, we may assume that c is large enough.

Recall that by (4) we have

$$\begin{aligned} |U_n| \ge C_1 |\alpha |^n, \end{aligned}$$
(10)

for n large enough. On the other hand, by (5) we have

$$\begin{aligned} |V_m + c| \le |V_m| + |c| \le C_4 m^\tau |\beta |^m + |c|, \end{aligned}$$
(11)

for m large enough. Combining (9), (10) and (11) we get

$$\begin{aligned} C_1 |\alpha |^n \le C_4 m^\tau |\beta |^m + |c|, \end{aligned}$$

which implies (note that \(\log (r+s)\le \log r + \log s\) for \(r,s \ge 2\))

$$\begin{aligned} n \le C_5 + \frac{m \log |\beta |}{\log |\alpha |} + \frac{\tau \log m}{\log |\alpha |} + \frac{\log |c|}{\log |\alpha |}, \end{aligned}$$
(12)

for some effectively computable constant \(C_5\). From now on, if we write a new constant \(C_i\), we imply that it exists and it is effectively computable. Analogously we get

$$\begin{aligned} m \le C_6 + \frac{n \log |\alpha |}{\log |\beta |} + \frac{\sigma \log n}{\log |\beta |} + \frac{\log |c|}{\log |\beta |}. \end{aligned}$$
(13)

Assume without loss of generality that

$$\begin{aligned} |\alpha |^n \le |\beta |^m. \end{aligned}$$
(14)

We rewrite Eq. (9) as

$$\begin{aligned} a(n) \alpha ^n + L(a'\alpha '^n) - (b(m) \beta ^m + L(b'\beta '^m)) =c. \end{aligned}$$

Shifting expressions, taking absolute values and estimating we obtain

$$\begin{aligned} |\varLambda | :=\left| \frac{a(n) \alpha ^n}{b(m)\beta ^m}-1 \right|&\le \frac{a'\alpha '^n}{|b(m)||\beta |^m} + \frac{b'\beta '^m}{|b(m)||\beta |^m} + \frac{|c|}{|b(m)||\beta |^m}\nonumber \\&\le C_7 \frac{\alpha '^n}{|\beta |^m} + C_8 \frac{\beta '^m}{|\beta |^m} + C_ 9\frac{|c|}{|\beta |^m}, \end{aligned}$$
(15)

where we used the fact that |b(m)| cannot be arbitrarily small if m is large enough.

If \(\varLambda = 0\), then \(\frac{a(n)}{b(m)}=\frac{\beta ^m}{\alpha ^n}\) and Lemmas 1 and 2 yield

$$\begin{aligned} C_0 \max \{n,m\} \le h \left( \frac{\beta ^m}{\alpha ^n} \right) = h \left( \frac{a(n)}{b(m)} \right) \le C \log \left( \max \{n,m\}\right) , \end{aligned}$$

which is only possible for small n and m.

If \(\varLambda \ne 0\), then we can apply Matveev’s theorem with \(t=3\), \(D=[{\mathbb {Q}}(\alpha ,\beta ):{\mathbb {Q}}]\) and

$$\begin{aligned} \gamma _1&=\frac{a(n)}{b(m)},&b_1 = 1,\\ \gamma _2&=\alpha ,&b_2= n, \\ \gamma _3&=\beta ,&b_3=-m. \end{aligned}$$

Moreover, we set \(B=\max \{n,m\}\) and

$$\begin{aligned} A_2&=\max \{Dh(\alpha ), |\log \alpha |, 0.16\},\\ A_3&=\max \{Dh(\beta ), |\log \beta |, 0.16 \}. \end{aligned}$$

In order to choose \(A_1\), we use Lemma 2:

$$\begin{aligned} \max \left\{ D h\left( \frac{a(n)}{b(m)}\right) , \left| \log \frac{a(n)}{b(m)}\right| , 0.16 \right\} \le C_{10} \log \left( \max \{n,m\} \right) =: A_1. \end{aligned}$$

Then Matveev’s Theorem tells us that

$$\begin{aligned} \log |\varLambda |&\ge -C(3,D) (1 + \log (3 \max \{n,m\}) )\, C_{10} \log \left( \max \{n,m\}\right) A_2 A_3\nonumber \\&\ge - C_{11} \left( \log \left( \max \{n,m\}\right) \right) ^2. \end{aligned}$$
(16)

In order to use inequality (15), we distinguish between two cases.

Case 1 \(|c|\ge \max \{\alpha '^n, \beta '^m\}\). Then (15) implies

$$\begin{aligned} |\varLambda | \le (C_7+C_8+C_9)\frac{|c|}{|\beta |^m} =C_{12} \frac{|c|}{|\beta |^m} \end{aligned}$$

and together with (16) this yields

$$\begin{aligned} - C_{11} (\log \left( \max \{n,m\}\right) )^2 \le \log |\varLambda | \le \log C_{12} + \log |c| -m \log |\beta |, \end{aligned}$$

which implies

$$\begin{aligned} m \log |\beta |&\le \log C_{12} + \log |c| + C_{11} \left( \log \left( \max \{n,m\}\right) \right) ^2. \end{aligned}$$
(17)

By the case assumption we have \(|c|\ge \alpha '^n\), i.e. \(n\le \log |c|/\log \alpha '\), and \(|c|\ge \beta '^m\), i.e. \(m \le \log |c| / \log \beta '\). Therefore, \(\max \{n,m\} \le C_{13} \log |c|\). Thus (17) implies

$$\begin{aligned} m \log |\beta | \le \log C_{12} + \log |c| + C_{11} (\log (C_{13} \log |c|))^2 \le \log |c| + C_{14} (\log \log |c|)^2. \end{aligned}$$

Dividing by \(\log |\beta |\) we get

$$\begin{aligned} m \le \frac{\log |c|}{\log |\beta |} + O((\log \log |c|)^2). \end{aligned}$$

Moreover, by (14) we have \(n \le m \log |\beta | / \log |\alpha |\), so we also get

$$\begin{aligned} n \le \frac{\log |c|}{\log |\alpha |} + O((\log \log |c|)^2), \end{aligned}$$

as required.

Case 2 \(|c|< \max \{\alpha '^n, \beta '^m\}\). By assumption (14) inequality (15) implies

$$\begin{aligned} |\varLambda | \le C_7 \frac{\alpha '^n}{|\alpha |^n} + C_8 \frac{\beta '^m}{|\beta |^m} + C_9 \frac{|c|}{|\beta |^m}. \end{aligned}$$
(18)

Case 2a \(\max \{\alpha '^n, \beta '^m\}= \alpha '^n\), i.e. \(|c|<\alpha '^n\). Then \(\log |c| \le n \log \alpha '\) and (13) implies \(m \le C_{15} n\). Then (18) implies

$$\begin{aligned} |\varLambda | \le (C_7 + C_9) \left( \frac{\alpha '}{|\alpha |}\right) ^n + C_8 \left( \frac{\beta '}{|\beta |}\right) ^m \le (C_7 + C_9) \left( \frac{\alpha '}{|\alpha |}\right) ^{m/C_{15}} + C_8 \left( \frac{\beta '}{|\beta |}\right) ^{m}. \end{aligned}$$

Setting

$$\begin{aligned} \frac{1}{\gamma } := \max \left\{ \left( \frac{\alpha '}{|\alpha |}\right) ^{1/C_{15}}, \frac{\beta '}{|\beta |} \right\} <1 \end{aligned}$$

we get

$$\begin{aligned} |\varLambda |\le C_{16} \gamma ^{-m}. \end{aligned}$$

Combined with (16) this yields

$$\begin{aligned} -C_{11}\left( \log \left( \max \{n,m\}\right) \right) ^2 \le \log |\varLambda | \le \log C_{16} -m \log \gamma . \end{aligned}$$

This implies

$$\begin{aligned} m \log \gamma \le \log C_{16} + C_{11}\left( \log \left( \max \{n,m\}\right) \right) ^2 \le \log C_{16} + C_{11}(\log (C_{15}n))^2 \end{aligned}$$

and we get

$$\begin{aligned} m \le C_{17} (\log n)^2. \end{aligned}$$
(19)

This means that m is actually very small compared to n and therefore \(|c|\approx |\alpha |^n\), i.e. \(n \approx \log |c|/ \log |\alpha |\), which is exactly what we need. In order to formalise this argument, we go back to (9) and use inequalities (4) and (5):

$$\begin{aligned} |c|&= |U_n - V_m|\\&\ge |U_n| - |V_m|\\&\ge C_1 |\alpha |^n - C_4 m^\tau |\beta |^m\\&\ge C_1 |\alpha |^n - C_4 \left( C_{17} (\log n)^2\right) ^\tau |\beta |^{C_{17}(\log n)^2}. \end{aligned}$$

Taking logarithms and noting that \(\log (r-s) \ge \log r - \log s\) for \(r\ge s+2 \ge 4\), we get

$$\begin{aligned} \log |c|&\ge \log C_1 + n \log |\alpha | - \left( \log C_4 + \tau (\log C_{17} + 2 \log \log n) + C_{17}(\log n)^2 \log |\beta |\right) \\&\ge n \log |\alpha | - C_{18} (\log n)^2, \end{aligned}$$

for n large enough. We rewrite this inequality as

$$\begin{aligned} n \le \frac{1}{\log |\alpha |}\log |c| + \frac{C_{18}}{\log |\alpha |}(\log n)^2. \end{aligned}$$

Now Lemma 6 (with \(z=\log |c|\)) tells us that

$$\begin{aligned} n \le \frac{1}{\log |\alpha |}\log |c| + \frac{4 C_{18}}{\log |\alpha |}(\log \log |c|)^2 = \frac{\log |c|}{\log |\alpha |} + O(( \log \log |c|)^2). \end{aligned}$$

Moreover, inserting this into (19) yields

$$\begin{aligned} m \le O((\log \log |c|)^2). \end{aligned}$$

Case 2b \(\max \{\alpha '^n, \beta '^m\}=\beta '^m\), i.e. \(|c|< \beta '^m\). This case is completely analogous to Case 2a.

Thus, in every case we obtain

$$\begin{aligned} n\le \frac{\log |c|}{\log |\alpha |} + O((\log \log |c|)^2) \quad \text {and} \quad m\le \frac{\log |c|}{\log |\beta |} + O((\log \log |c|)^2). \end{aligned}$$

Therefore, all solutions (nm) to the Diophantine inequality \(|U_n-V_m|\le x\) have the property \(n\le {\log x}/{\log |\alpha |} + O((\log \log x)^2)\) and \(m\le {\log x}/{\log |\beta |} + O((\log \log x)^2)\). But there are at most

$$\begin{aligned} \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot (\log \log x)^2) \end{aligned}$$

such solutions. Thus

$$\begin{aligned} T(x) \le \frac{(\log x)^2}{\log |\alpha | \log |\beta |} + O(\log x \cdot (\log \log x)^2). \end{aligned}$$

This completes the proof of Theorem 2 and by Lemma 3 we have also proved Theorem 1.

5 Further problems

The key in our proof is the use of lower bounds for linear forms in logarithms. This tool only works if \(\alpha \) and \(\beta \) are algebraic. The natural question is: What happens if \(\alpha \) and/or \(\beta \) are transcendental? We pose the following problem.

Problem 1

For which multiplicatively independent complex numbers \(\alpha ,\beta \in {\mathbb {C}}\) with \(|\alpha |>1\) and \(|\beta | > 1\) do we have

$$\begin{aligned} \#\{(n, m)\in {\mathbb {N}}^2:~ | \alpha ^n - \beta ^m | \le x \} \sim \frac{(\log x)^2}{\log |\alpha |\cdot \log |\beta | }, \quad \text {as } x \rightarrow \infty . \end{aligned}$$

In particular, is the above true for \(\alpha =\pi \) and \(\beta =e\)? Note that it is an open conjecture that \(\pi \) and e are multiplicatively independent (this is equivalent to \(\log \pi \) being irrational). In that case it would be interesting to find out whether

$$\begin{aligned} \#\{(n, m)\in {\mathbb {N}}^2:~ | \pi ^n - e^m | \le x \} \sim \frac{(\log x)^2}{\log \pi }, \quad \text {as } x \rightarrow \infty . \end{aligned}$$

Of course, the same question can be asked for sequences with sums of powers. For instance, we pose the following problem.

Problem 2

Is the following true?

$$\begin{aligned} \#\{(n, m)\in {\mathbb {N}}^2:~ | \pi ^n + (\sqrt{5})^n - 7^m - e^m| \le x \} \sim \frac{(\log x)^2}{\log \pi \cdot \log 7 }, \quad \text {as } x \rightarrow \infty . \end{aligned}$$

And finally, we ask what happens if we allow three different powers.

Problem 3

For which positive numbers \(\alpha , \beta , \gamma \), all larger than 1 and any two of them multiplicatively independent, do we have

$$\begin{aligned} \#\{(n, m, k)\in {\mathbb {N}}^3 :| \alpha ^n + \beta ^m - \gamma ^k| \le M\} = \infty , \end{aligned}$$

for some \(M>0\)?