1 Introduction

A large number of interesting Diophantine equations arise when one studies the intersection of two sequences of positive integers. For instance, one can ask when the terms of a fixed binary recurrence sequence are perfect powers, factorials or combinatorial numbers etc. As an example, one can consider the solvability of the Diophantine equation

$$\begin{aligned} u_{n} = x^{z} \end{aligned}$$
(1.1)

in integers nxz with \(z\ge 2\), where \((u_{n})_{n \ge 0}\) is a linear recurrence sequence. Pethő [15, Corollary] and Shorey-Stewart [21, Theorem 2] independently proved that, Eq. (1.1) has only finitely many solutions under certain natural assumptions. The problem of finding all perfect powers in the Fibonacci sequence has a very rich history [9, 16] and this problem was open for a quite long time. In 2006, Bugeaud, Mignotte, and Siksek [8, Theorem 1] by using both the classical and the modular approach, proved that

$$\begin{aligned}(n,x,z) \in \{(0, 0, z), (1, 1, z), (2, 1, z), (6, 2, 3), (12, 12, 2)\} \end{aligned}$$

are the only solutions of Eq. (1.1) where \(u_{n}\) is the Fibonacci sequence. In the same paper [8, Theorem 2], they also studied Eq. (1.1) for the Lucas number sequence. In 2008, Pethő [18, Theorem 2] (see also [10]) solved Eq. (1.1) when \(u_{n}\) is the Pell sequence and proved that 0, 1 and 169 are the only perfect powers.

Now one can extend Eq. (1.1) by taking two terms of a binary recurrence sequence and ask the same question, i.e., solvability of the Diophantine equation

$$\begin{aligned} u_{n} + u_m = x^{z} \end{aligned}$$
(1.2)

in integers nmxz with \(z\ge 2\). In this direction, several authors studied the problem of finding (nmz) such that

$$\begin{aligned} u_{n} + u_{m} = 2^{z}, \end{aligned}$$
(1.3)

where \((u_{n})_{n \ge 0}\) is a fixed recurrence sequence. In particular, Bravo and Luca considered the case when \(u_{n}\) is the Fibonacci sequence [7, Theorem 2] and the Lucas number sequence [6, Theorem 2]. Further, variants of Eq. (1.3) were studied independently by Bravo et al. [5, Theorem 1] and Marques [13, Theorem 1], where \(u_{n}\) is replaced by the generalized Fibonacci sequence. Bravo et al. [4, Theorem 1] investigated the case when the power of two can be expressed as sum of three Fibonacci numbers. Recently, Pink and Ziegler [19, Theorem 1] have generalized the results of Bravo and Luca [6, 7], and considered a more general Diophantine equation

$$\begin{aligned} u_{n} + u_{m} = wp_{1}^{z_{1}} \cdots p_{s}^{z_{s}} \end{aligned}$$
(1.4)

in non-negative integer unknowns \(n, m, z_{1}, \ldots , z_{s}\), where \((u_{n})_{n \ge 0}\) is a binary non-degenerate recurrence sequence, \(p_{1}, \ldots , p_{s}\) are distinct primes and w is a non-zero integer with \(p_{i} \not \mid w\) for \(1\le i \le s\). They proved that under certain assumptions, Eq. (1.4) has finitely many solutions using lower bounds for linear forms of p-adic logarithms. In [2, Theorem 2.1], Bertók et al. solved completely equations of the form \(u_n = 2^a + 3^b + 5^c\), where \(u_n\) is one of the Fibonacci, Lucas, Pell and associated Pell sequences, respectively.

The purpose of this paper is twofold. On one hand, we give a general finiteness result for the solutions of the equation

$$\begin{aligned} u_{n_{1}} + u_{n_{2}} + \cdots + u_{n_{t}} = p^{z} \end{aligned}$$
(1.5)

in non-negative integer unknowns \(n_{1},\ldots , n_{t}, z\), where \((u_{n})_{n \ge 0}\) is a binary non-degenerate recurrence sequence with \(n_{1}> n_{2}> \cdots > n_{t} \ge 0\) and p is a given prime. On the other hand, we completely solve Eq. (1.5) where \(u_{n}\) is a balancing number sequence and \((t, p) = (3, 3)\). To prove our main results, we use lower bounds for linear forms in logarithms of algebraic numbers and a version of the Baker–Davenport reduction method.

2 Notation and main results

The sequence \((u_{n})_{n \ge 0} = u_{n}(P, Q, u_{0}, u_{1})\) is called a binary linear recurrence sequence if the relation

$$\begin{aligned} u_{n} = Pu_{n-1} + Qu_{n-2} \;\;(n\ge 2) \end{aligned}$$
(2.1)

holds, where \(P, Q\in \mathbb {Z}\) with \(PQ\ne 0\) and \(u_{0}, u_{1}\) are fixed rational integers with \(|u_{0}| + |u_{1}| > 0\). The polynomial \(f(x) = x^2 -Px -Q\) is called the companion polynomial of the sequence \(u_n\). Let \(\Delta = P^2 + 4Q\) be the discriminant of f. We call \(\Delta \) the discriminant of the sequence \(u_n\). The roots of the companion polynomial are denoted by \(\alpha \) and \(\beta \). Then for \(n\ge 0\)

$$\begin{aligned} u_{n} = \frac{a\alpha ^{n}-b\beta ^{n}}{\alpha -\beta }\quad (\alpha \ne \beta ), \end{aligned}$$
(2.2)

where \(a = u_{1} - u_{0}\beta ,\, b = u_{1} - u_{0}\alpha \). The sequence \((u_{n})_{n\ge 0}\) is called non-degenerate, if \(ab\alpha \beta \ne 0\) and \(\alpha /\beta \) is not a root of unity.

Throughout the paper, we assume that \(u_{n}\) is non-degenerate, \(\sqrt{\Delta } = (\alpha -\beta ) >0\) (that is \(\alpha \) and \(\beta \) are real). We label the roots in such a way that \(|\alpha | > |\beta |\). Up to changing the signs to \((\alpha , \beta )\) simultaneously (that is, replacing \((\alpha , \beta )\) by \((-\alpha , -\beta )\), which has as effect replacing (PQ) by \((-P, Q)\) and the sequence \((u_n)_{n\ge 0}\) by the sequence\(((-1)^nu_n)_{n\ge 0}\), we may assume that \(\alpha \) is positive. From now on, we will assume these conditions.

With these notations, we have the following theorem.

Theorem 1

Suppose \((u_{n})_{n \ge 0}\) is a non-degenerate binary recurrence sequence of integers satisfying recurrence (2.1). Let us assume that \(\alpha > |\beta |\) and \(\Delta = r^2s \) where \(r, s \in \mathbb {Z}_{ >0}, s\ne 1, s\) is square-free. Then there exists an effectively computable constant C depending on \((u_{n})_{n\ge 0}, p, t\) such that all solutions \((n_{1},\ldots , n_{t},z)\) to Eq. (1.5) satisfy

$$\begin{aligned} \max \{n_1,\ldots ,n_t,z\} < C. \end{aligned}$$

Remark 2.1

Suppose \(u_n = 2^n - 1\) and \(t = p = 2\). In this case \(\alpha = 2,\; \beta = a = b =1\) and \(\Delta = s = 1\). Then (1.5) becomes

$$\begin{aligned} \frac{2^{n_1} - 1}{2 -1} + \frac{2^{n_2} - 1}{2 -1} = 2^z, \end{aligned}$$

which has infinitely many solutions given by \(n_2 = 1\) and \(n_1 = z\). This shows that the assumption \(s \ne 1\) is necessary in Theorem 1.

Balancing numbersn are solutions of the Diophantine equation

$$\begin{aligned} \sum _{i=1}^{n-1}i=\sum _{j=n+1}^{m}j, \end{aligned}$$

for some natural number m [1]. Let us denote the nth balancing number by \(B_{n}\). Also, the balancing numbers satisfy the recurrence relation \(B_{n+1}=6B_{n}-B_{n-1}\) with initial conditions \(B_0 = 0, B_1 = 1\) for \(n\ge 1\). Therefore, the sequence in Eq. (2.1) for \((P, Q, u_{0}, u_{1}) = (6, -1, 0, 1)\) is a balancing sequence. For more details regarding balancing numbers one can refer [1, 11, 20]. We prove the following theorem as an example for the explicit computations of constants.

Theorem 2

There is no solution of the Diophantine equation

$$\begin{aligned} B_{n_{1}} + B_{n_{2}} + B_{n_{3}} = 3^{z} \end{aligned}$$
(2.3)

in integers \(n_{1}, n_{2}, n_{3}, z\) with \(n_{1}> n_{2} > n_{3} \ge 0\).

3 Auxiliary results

In the following lemma we find an upper bound for \(|u_{n}|\) which is useful in the proof of Theorem 1 and also we find a relation between \(n_1\) and z when Eq. (1.5) holds.

Lemma 3.1

There exist constants \(d_0\) and \(d_1\) depending only on \((u_n)_{n\ge 0}\) such that the following holds.

  1. (1)

    \(|u_{n}|< d_{0}\alpha ^{n}\).

  2. (2)

    If Eq. (1.5) holds with \(n_1> n_2> \cdots > n_t\), then \(z\le d_1 n_1\).

Proof

From Eq. (2.2), we have

$$\begin{aligned} |u_{n}|&\le \frac{\alpha ^{n}}{\sqrt{\Delta }}\left( |a| + |b| \frac{|\beta |^{n}}{\alpha ^{n}}\right) . \end{aligned}$$

Since \(\alpha > |\beta |\), the above inequality becomes

$$\begin{aligned} |u_{n}|< \alpha ^{n} \frac{|a| + |b|}{\sqrt{\Delta }} = d_{0}\alpha ^{n}, \end{aligned}$$
(3.1)

where \(d_{0} := (|a| + |b|)/\sqrt{\Delta }\). This proves (1).

From Eqs. (1.5) and (3.1)

$$\begin{aligned} p^z < d_0(\alpha ^{n_1} + \cdots + \alpha ^{n_t}). \end{aligned}$$

As p is given, we can always choose a suitable integer \(d_1\) such that \(d_{0}\alpha ^{n_i} < p^{n_id_1} \, (1\le i\le t)\). Thus, the above inequality becomes

$$\begin{aligned} p^z&< \left( p^{n_1d_1} + \cdots + p^{n_{t}d_{1}}\right) \\&<p^{n_1d_1}\left( \frac{p}{p-1}\right) \le p^{d_{1}n_{1}+1}. \end{aligned}$$

Therefore, we get \(z \le d_{1}n_{1}\). \(\square \)

The following lemma is due to Pethő and de Weger [17, Lemma 2.2].

Lemma 3.2

[17] Let \(u, v \ge 0, h\ge 1\) and \(x\in \mathbb {R}\) be the largest solution of \(x = u + v (\log x)^{h}\). Then

$$\begin{aligned} x < \max \{2^{h}(u^{1/h} + v^{1/h} \log (h^{h}v))^{h}, 2^{h}(u^{1/h} + 2e^{2})^{h}\}. \end{aligned}$$

Let \(\eta \) be an algebraic number of degree d with minimal polynomial

$$\begin{aligned} a_{0}x^d + a_1x^{d-1} + \cdots + a_d = a_0 \prod _{i=1}^{d}\left( X - \eta ^{(i)}\right) , \end{aligned}$$

where \(a_0\) is the leading coefficient of the minimal polynomial of \(\eta \) over \(\mathbb {Z}\) and the \(\eta ^{(i)}\)’s are conjugates of \(\eta \) in \(\mathbb {C}\). Define the absolute logarithmic height of an algebraic number \(\eta \) by

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

In particular, if \(\eta = p/q\) is a rational number with \(\gcd (p, q) = 1\) and \(q >0\), then \(h(\eta ) = \log \max \{|p|, q\}\). Some important properties of logarithmic height which we use in our further investigation are as follows (see e.g. [22]).

  1. (1)

    \(h(\eta \pm \gamma ) \le h(\eta ) + h(\gamma ) + \log 2\),

  2. (2)

    \(h(\eta \gamma ^{\pm 1}) \le h(\eta ) + h(\gamma )\),

  3. (3)

    \(h(\eta ^{t}) \le |t|h(\eta ),\;\) for \(t \in \mathbb {Z}\).

Generally it is a very hard problem to find lower bounds for the height of elements in a number field of given degree. For the quadratic fields, we have the following result due to Pink and Ziegler [19, Lemma 3].

Lemma 3.3

[19] For an algebraic number \(\alpha \) of degree two we have \(h(\alpha ) \ge 0.24\) or \(\alpha \) is a root of unity.

To prove our theorem, we use lower bounds for linear forms in logarithms to bound the index \(n_1\) appearing in Eq. (1.5). Generically, we need the following general lower bound for linear forms in logarithms due to Matveev [14, Theorem 2.2] (see also [8, Theorem 9.4]).

Lemma 3.4

[8] Let \(\gamma _1,\ldots ,\gamma _t\) be positive real algebraic numbers and let \(b_{1},\ldots , b_{t}\) be non-zero rational integers. Let \(\mathbb {Q}(\gamma _1,\ldots ,\gamma _t)\) be the quadratic number field over \(\mathbb {Q}\) and let \(A_{j}\) be real numbers satisfying

$$\begin{aligned} A_j \ge \max \left\{ 2h(\gamma _j) , |\log \gamma _j|, 0.16 \right\} , \quad j= 1, \ldots ,t. \end{aligned}$$
(3.2)

Assume that \(B\ge \max \{|b_1|, \ldots , |b_{t}|\}\) and \(\Lambda :=\gamma _{1}^{b_1}\cdots \gamma _{t}^{b_t} - 1\). If \(\Lambda \ne 0\), then

$$\begin{aligned} |\Lambda | \ge \exp \left( -1.4\times 30^{t+3}\times t^{4.5}\times 2^{2}(1 + \log 2)(1 + \log B)A_{1}\cdots A_{t}\right) . \end{aligned}$$

The upper bound on \(n_1\) of the Diophantine equation (2.3) is too large for practical purpose, thus the next step is to reduce it. We present a lemma from [3, Lemma 4] and it is a variant of the famous Dujella and Pethő [12, Lemma 5a] reduction lemma. Now for a real number x, let \(||x|| := \min \{|x - n| : n \in \mathbb {Z}\}\) denote the distance from x to the nearest integer.

Lemma 3.5

[3] Suppose that M is a positive integer, and AB are positive reals with \(B > 1\). Let p / q be the convergent of the continued fraction expansion of the irrational number \(\gamma \) such that \(q > 6M\), and let \(\epsilon := ||\mu q|| - M||\gamma q||\), where \(\mu \) is a real number. If \(\epsilon > 0\), then there is no solution of the inequality

$$\begin{aligned} 0< |u \gamma - n + \mu | < AB^{-m} \end{aligned}$$

in positive integers um and n with

$$\begin{aligned} u \le M\quad \text{ and }\quad m\ge \frac{\log (Aq/\epsilon )}{\log B}. \end{aligned}$$

To prove Theorem 1, we apply linear forms in logarithms several times. Every time, we find an upper bound for \((n_1 - n_i)\) in terms of \(n_1\) for \(2\le i \le t\). In order to apply the linear forms in logarithms to bound \((n_1 - n_i)\) for a fixed i, we require upper bounds of \((n_1 - n_j)\) for all \(1\le j < i\). Finally, using these upper bounds for \((n_1 - n_i),\;2\le i \le t\), we get an upper bound for \(n_1\). In order to apply Lemma 3.4 we must ensure that \(\Lambda _i\) does not vanish. In this regard, we have the following lemma.

Lemma 3.6

Suppose \(\Lambda _i := p^{z}\alpha ^{-n_1}|a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})^{-1} - 1\) for all \(1\le i \le t\). If \(\Lambda _i = 0\), then \(n_1 < \ell _i\), where

$$\begin{aligned} \ell _i:= {\left\{ \begin{array}{ll} \frac{\log \left( i(|b|+|a|)/|a|\right) }{\log \alpha } &{} \quad \text {if } |\beta | \le 1,\\ \frac{\log (i(|b|+|a|)/|a|)}{\log (\alpha /|\beta |)} &{} \quad \text {if } |\beta | > 1. \end{array}\right. } \end{aligned}$$

Proof

Now \(\Lambda _i = 0\) imply

$$\begin{aligned} p^z r\sqrt{s} = |a| (\alpha ^{n_1} + \alpha ^{n_2 } + \cdots + \alpha ^{n_i }). \end{aligned}$$
(3.3)

Since s is a square-free integer other than one, by taking the conjugate of (3.3), we get

$$\begin{aligned} - p^z r\sqrt{s} = |b| (\beta ^{n_1} + \beta ^{n_2 } + \cdots + \beta ^{n_i }). \end{aligned}$$
(3.4)

Thus, from (3.3) and (3.4)

$$\begin{aligned} |a| (\alpha ^{n_1} + \alpha ^{n_2 } + \cdots + \alpha ^{n_i }) = |b (\beta ^{n_1} + \beta ^{n_2 } + \cdots + \beta ^{n_i })|. \end{aligned}$$

Since \(\alpha > 0\)

$$\begin{aligned} |a|\alpha ^{n_1}&< |a|(\alpha ^{n_1} + \alpha ^{n_2} + \cdots + \alpha ^{n_i}) = |b (\beta ^{n_1} + \beta ^{n_2 } + \cdots + \beta ^{n_i })|. \end{aligned}$$

If \(|\beta | \le 1\), then \(|a|\alpha ^{n_1}< |b|i< i (|b|+|a|)\) which implies that \(n_1 < \frac{\log (i(|b|+|a|)/|a|)}{\log \alpha }\). Now for \(|\beta | > 1\),

$$\begin{aligned} |a|\alpha ^{n_1} \le i |b||\beta |^{n_1} < i|\beta |^{n_1}(|b|+|a|) \end{aligned}$$

which implies that \(n_1 < \frac{\log (i(|b|+|a|)/|a|)}{\log (\alpha /|\beta |)}.\)\(\square \)

The following lemma gives a relationship between height of an algebraic number and its logarithm. We can suitably choose a constant \(d_2\) such that

$$\begin{aligned} d_2 > \max \{\max (|a|, 1/|a|), \max (|b|, 1/|b|)\}. \end{aligned}$$

We also denote \(K = \mathbb {Q}(\alpha , \beta ) = \mathbb {Q}(\sqrt{\Delta }) = \mathbb {Q}(\sqrt{s})\) for the quadratic number field corresponding to binary recurrence sequence \((u_n)_{\ge 0}\).

Lemma 3.7

Let \(\gamma _3(i) := |a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})^{-1}\) are the algebraic numbers in the quadratic number field \({\mathbb {Q}}(\sqrt{s})\) for \(1 \le i \le t\). Then there exists a constant \(d_2\) depending on \(\alpha \) and \(\beta \) such that

$$\begin{aligned}&\max \left\{ 2h(\gamma _3(i)), |\log \gamma _3(i)|, 0.16 \right\} \\&\quad \le 2\left( \log d_2 + \log (r \sqrt{s}) + \left( |n_2 - n_1| + \cdots + |n_i - n_1| \right) h(\alpha )\right) \\&\qquad + (i + 1)\log 4 . \end{aligned}$$

Proof

First observe that \( r\sqrt{s} \ge 1\), as \(r\sqrt{s}=\sqrt{\Delta } = \alpha - \beta = \sqrt{P^2 + 4 Q} > 0\) and PQ are rational integers. Since \(\gamma _3(i) = |a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})^{-1}\) and \(\alpha > 0\), we have

$$\begin{aligned} \gamma _3(i)&= \frac{r\sqrt{s}}{|a|(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})} \\&\le \max (|a|, 1/|a|)r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})^{-1} \end{aligned}$$

and this implies

$$\begin{aligned} \begin{aligned} \log \gamma _3(i)&\le \log \max (|a|, 1/|a|) + \log (r\sqrt{s}) - \log (1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})\\&\le \log \max (|a|, 1/|a|) + \log (r\sqrt{s}) + \log i \\&< \log d_2 + \log (r\sqrt{s}) + \log i. \end{aligned} \end{aligned}$$
(3.5)

Since \(\log i < i\log 2\) for \(i\ge 1\), we have

$$\begin{aligned} |\log \gamma _3(i)| \le \log d_2 + \log (r\sqrt{s}) + i\log 2. \end{aligned}$$
(3.6)

Furthermore, a and b are conjugate algebraic numbers which are roots of the quadratic polynomial

$$\begin{aligned} x^2 - (2u_1 - u_0 P)x + u_1^2 - u_0u_1P - u_0^2Q . \end{aligned}$$

Thus,

$$\begin{aligned} h(a) = \frac{1}{2}\left( \log \max \{|a|, 1\} + \log \max \{|b|, 1\}\right) < \log d_2. \end{aligned}$$
(3.7)

Now we estimate height of \(\gamma _3(i)\). We have

$$\begin{aligned} h(\gamma _3(i))&= h\left( |a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_i - n_1})^{-1}\right) \nonumber \\&\le h(|a|)+ h(r\sqrt{s}) + \left( |n_2 - n_1| + \cdots + |n_i - n_1| \right) h(\alpha ) + i\log 2. \end{aligned}$$
(3.8)

Since s is square-free we have

$$\begin{aligned} h(r\sqrt{s}) = \log (r\sqrt{s}). \end{aligned}$$
(3.9)

By Lemma 3.3, we have \(h(\alpha ) \ge 0.24\). Finally the lemma follows by comparing (3.6), (3.7), (3.8) and (3.9).\(\square \)

Suppose \(\ell := \max \{\ell _1, \cdots , \ell _{t}\}\), where \(\ell _i \;(1\le i\le t)\) are defined in Lemma 3.6. If \(n_1 \le \ell \), then the conclusion of Theorem 1 follows trivially (see Lemma 3.1(2)). Henceforth, we assume \(n_1 > \ell \).

Now we are ready to prove Theorem 1. The proof is motivated by the ideas of Bravo and Luca [6, 7].

4 Proof of Theorem 1

4.1 Bounding \((n_1 - n_i)\) in terms of \(n_1\) for \(2\le i \le t\)

Here, we claim that for \(2\le i \le t\), we have

$$\begin{aligned} n_1 - n_i \le C_i (\log n_1)^{i - 1}, \end{aligned}$$
(4.1)

where \(C_i\)’s are effectively computable constants depending on \(P, Q, u_0, u_1, t, p\). We use induction on i to find an upper bound of \(n_1 - n_i\) for \(2\le i \le t\). First, we calculate the upper bound of \(n_1 - n_2\). We can rewrite Eq. (1.5) as

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{\sqrt{\Delta }} - p^{z}\right|&= \left| \frac{b\beta ^{n_1}}{\sqrt{\Delta }} - (u_{n_2} + \cdots + u_{n_t})\right| \le \left| \frac{b\beta ^{n_1}}{\sqrt{\Delta }}\right| + |u_{n_2} + \cdots + u_{n_t}|. \end{aligned}$$

From Lemma 3.1, \(|u_{n}|\le d_{0}\alpha ^{n}\). Also we have assumed that \(n_1> n_2> \cdots > n_{t}\). Thus,

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{r\sqrt{s}} - p^{z}\right| \le \left| \frac{b\beta ^{n_1}}{r\sqrt{s}}\right| + (t-1)d_{0}\alpha ^{n_{2}}. \end{aligned}$$
(4.2)

If \(|\beta | < 1\), then the above inequality becomes

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{r\sqrt{s}} - p^{z}\right| < c_{1}\alpha ^{n_{2}}, \end{aligned}$$
(4.3)

where \(c_1\) is a suitable constant. Now dividing both sides of the inequality (4.3) by \(|a|\alpha ^{n_1}/r\sqrt{s}\),

$$\begin{aligned} \begin{aligned} \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s} \right|&\le \frac{c_{1}r\sqrt{s}}{|a|\alpha ^{n_1-n_2}} < \frac{c_2}{\alpha ^{n_1-n_2}}, \end{aligned} \end{aligned}$$
(4.4)

where \(c_2\) is a suitable constant. For the case \(|\beta | > 1\), we divide both sides of the inequality (4.2) by \(|a|\alpha ^{n_1}/r\sqrt{s}\),

$$\begin{aligned} \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s} \right|&\le \frac{|b\beta ^{n_1}|}{|a| \alpha ^{n_1}}+ \frac{(t-1)d_{0}r\sqrt{s}}{|a|}\alpha ^{n_{2} -n_1}\\&< \frac{|b|}{|a|}\left( \frac{\alpha }{|\beta |}\right) ^{n_2 - n_1} + \frac{(t-1)d_{0}r\sqrt{s}}{|a|}\alpha ^{n_{2} -n_1}\\&< \frac{|b|}{|a|}\left( \frac{|\beta |}{\alpha }\right) ^{n_1 - n_2} + \frac{(t-1)d_{0}r\sqrt{s}}{|a|}\left( \frac{|\beta |}{\alpha }\right) ^{n_{1} -n_2}\\&< \left( \frac{|b|}{|a|} + \frac{(t-1)d_{0}r\sqrt{s}}{|a|}\right) \left( \frac{|\beta |}{\alpha }\right) ^{n_{1} -n_2}. \end{aligned}$$

Thus, for any \(\beta \) it follows that

$$\begin{aligned} \left| 1 - p^{z}\alpha ^{-n_1} |a|^{-1}r\sqrt{s} \right| \le \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s} \right| < \frac{c_3}{\min \left( \frac{\alpha }{|\beta |}, \alpha \right) ^{n_{1} -n_2}}, \end{aligned}$$
(4.5)

where \(c_3 := \max \left\{ c_2, \left( \frac{|b|}{|a|} + \frac{(t-1)d_{0}r\sqrt{s}}{|a|}\right) \right\} \) and the left inequality in (4.5) is obtained using triangle inequality.

In order to apply Lemma 3.4, we take

$$\begin{aligned} \gamma _1 := p,\; \gamma _2 := \alpha ,\; \gamma _3 := |a|^{-1}r\sqrt{s},\; b_1 := z,\; b_2 := -n_1,\; b_3= 1. \end{aligned}$$

Thus our first linear form is \(\Lambda _1 := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\) . Further, to apply Lemma 3.4 we must ensure that \(\Lambda _1 \ne 0\). Suppose on contrary \(\Lambda _1 = 0\). Then from Lemma 3.6, we have \(n_1< \ell _1\) and hence \(n_1\le \ell \) (see the discussion towards the end of the Sect. 3). Thus, this is a contradiction as we have assumed \(n_1 > \ell \). Hence, \(\Lambda _1 \ne 0\). Here we are taking the quadratic number field \({\mathbb {Q}}(\sqrt{s})\) over \({\mathbb {Q}}\) and \(t=3\). Finally, recall \(z\le d_1n_1\) and so we deduce

$$\begin{aligned} \max \{|b_1|, |b_2|, |b_3|\} = \max \{z, n_1, 1\} \le d_1n_1. \end{aligned}$$

Hence we can take \(B := d_1n_1\). Also \( h(\gamma _1)= \log p, h(\gamma _2)\le \log \alpha \). Thus, we can take \(A_1 := 2\log p, A_2 = 2\log \alpha \). Further, using Lemma 3.7, we have

$$\begin{aligned} 2\left( \log d_2+ \log (r\sqrt{s}) + \log 4 \right) \ge \max \{2h(\gamma _3), \log \gamma _3, 0.16\}. \end{aligned}$$

Hence, \( A_3 = 2\left( \log d_2+ \log (r\sqrt{s}) + \log 4 \right) \). Using Lemma 3.4, we have

$$\begin{aligned} |\Lambda _1| >&\exp \left( -1.4\times 30^{5}\times 2^{4.5}\right. \\&\left. \times 4\times (1+\log 2)(2\log p) (2\log \alpha ) A_3(1+ \log d_1n_1)\right) . \end{aligned}$$

So the above inequality can be rewritten as,

$$\begin{aligned} \log |\Lambda _1| > - C_{1} \log n_1, \end{aligned}$$
(4.6)

where \(C_1\) is a suitable constant. Taking logarithms in both sides of inequality (4.5) and comparing the resulting inequality with inequality (4.6),

$$\begin{aligned} (n_1-n_2)\log \min \left( \frac{\alpha }{|\beta |}, \alpha \right) < C_2' \log n_1, \end{aligned}$$
(4.7)

where \(C_2'\) is a suitable constant. This implies that

$$\begin{aligned} (n_1-n_2)< C_2\log n_1. \end{aligned}$$

Therefore, for \(i = 2\), the statement is true. We assume that inequality (4.1) is true for \(i = k\) with \(2\le k \le t-1\). We want to show that inequality (4.1) is true for \(i = k+1\). To formulate the next linear form we rewrite Eq. (1.5) as follows

$$\begin{aligned} \frac{a\alpha ^{n_1}}{\sqrt{\Delta }} + \cdots + \frac{a\alpha ^{n_{k}}}{\sqrt{\Delta }} - p^{z} = \frac{b\beta ^{n_1}}{\sqrt{\Delta }} + \cdots + \frac{b\beta ^{n_{k}}}{\sqrt{\Delta }} - u_{n_{k+1}}. \end{aligned}$$

Taking absolute value and using inequality (3.1), we have

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{r\sqrt{s}}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1}) - p^{z}\right| \le \left| \frac{b(\beta ^{n_1} +\cdots +\beta ^{n_{k}})}{r\sqrt{s}}\right| + d_{0}\alpha ^{n_{k+1}}.\nonumber \\ \end{aligned}$$
(4.8)

If \(|\beta | < 1\), then (4.8) becomes

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{r\sqrt{s}}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1}) - p^{z}\right| < c_4 \alpha ^{n_{k+1}}, \end{aligned}$$
(4.9)

where \(c_4\) is a suitable constant. Dividing both sides of the inequality (4.9) by \(|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{k}})/r\sqrt{s}\),

$$\begin{aligned} \begin{aligned} \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1})^{-1} \right|&< \frac{c_4\alpha ^{n_{k+1}}r\sqrt{s}}{|a|(\alpha ^{n_1}+ \cdots + \alpha ^{n_k})}\\&< \frac{c_4\alpha ^{n_{k+1}}r\sqrt{s}}{|a|\alpha ^{n_1}} < \frac{c_{5}}{\alpha ^{n_1-n_{k+1}}}, \end{aligned} \end{aligned}$$
(4.10)

where \(c_5 = c_4 r\sqrt{s}/|a|\). For the case \(|\beta | > 1\), we divide both sides of the inequality (4.8) by \(|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{k}})/r\sqrt{s}\),

$$\begin{aligned}&\left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1})^{-1} \right| \\&\quad \le \left| \frac{b(\beta ^{n_1} +\cdots +\beta ^{n_{k}})}{|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{k}})}\right| + \frac{d_{0}r\sqrt{s}\alpha ^{n_{k+1}}}{|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{k}})}\le \frac{|kb\beta ^{n_1}|}{|a|\alpha ^{n_1}} + \frac{d_{0}r\sqrt{s}\alpha ^{n_{k+1}}}{|a|\alpha ^{n_{1}} }\\&\quad< \frac{k|b|}{|a|}\left( \frac{\alpha }{|\beta |}\right) ^{n_{k+1} - n_1} + \frac{d_{0}r\sqrt{s}}{|a|}\alpha ^{n_{k+1} -n_1}\\&\quad < \left( \frac{k|b|}{|a|} + \frac{d_{0}r\sqrt{s}}{|a|}\right) \left( \frac{|\beta |}{\alpha }\right) ^{n_{1} -n_{k+1}}. \end{aligned}$$

Thus, for any \(\beta \) it follows that

$$\begin{aligned} \begin{aligned}&\left| 1 - p^{z}\alpha ^{-n_1} |a|^{-1}r\sqrt{s} (1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1})^{-1} \right| \\&\quad \le \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1})^{-1} \right| \\&\quad < \frac{c_6}{\min \left( \frac{\alpha }{|\beta |}, \alpha \right) ^{n_{1} -n_{k+1}}}, \end{aligned} \end{aligned}$$
(4.11)

where \(c_6 := \max \left\{ c_5, \left( \frac{k|b|}{|a|} + \frac{d_{0}r\sqrt{s}}{|a|}\right) \right\} \). To apply Lemma 3.4 we take,

$$\begin{aligned} \gamma _1 := p,\;&\gamma _2 := \alpha ,\; \gamma _3 := |a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{k} - n_1})^{-1},\\&b_1 := z,\;\; b_2 := -n_1,\;\; b_3= 1. \end{aligned}$$

Our next linear form is \(\Lambda _2 := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\). Suppose \(\Lambda _2 = 0\). Then from Lemma 3.6, \(n_1<\ell _k\). That is \(n_1\le \ell \) and this is a contradiction as we have assumed \(n_1 > \ell \). Thus, \(\Lambda _2 \ne 0\). Like in the previous case, here we take \(B= d_1n_1\). We already estimate \(A_1, A_2\) in previous case. Using Lemma 3.7 we can take \(A_3^k = c_{7} + 2(|n_2 - n_1| + \cdots +|n_{k} - n_1|) \log \alpha \) where \(c_7 = 2\left( \log d_2 + \log (r\sqrt{s}) \right) + (k+1)\log 4\).

From Lemma 3.4, we have

$$\begin{aligned} |\Lambda _2|> & {} \exp \left( - 1.4\times 30^{5}\times 2^{4.5}\times 4\right. \nonumber \\&\left. \times (1+\log 2)(1+ \log d_1n_1)(2\log p) (2\log \alpha ) A_3^k\right) . \end{aligned}$$
(4.12)

Now from the inequalities (4.11) and (4.12), we get

$$\begin{aligned}&\exp \left( -c_{8}(\log n_{1})(c_{7} + 2(|n_2 - n_1| + \cdots + |n_k - n_1|)\log \alpha ) \right) \nonumber \\&\quad < \frac{c_{6}}{\min \left( \frac{\alpha }{|\beta |}, \alpha \right) ^{n_{1}-n_{k+1}}}, \end{aligned}$$
(4.13)

where \(c_8\) is a suitable constant. Now taking logarithm on both sides of (4.13)

$$\begin{aligned}&(n_1- n_{k+1}) \log \min \left( \frac{\alpha }{|\beta |}, \alpha \right) < \log c_6 \nonumber \\&\quad + c_{8}(\log n_{1})(c_{7} + 2(|n_2 - n_1| + \cdots + |n_k - n_1|)\log \alpha ). \end{aligned}$$
(4.14)

By induction hypothesis, we have \((n_1 - n_i) < C_i (\log n_1)^{i-1}\) for \(2\le i \le k\). Thus from (4.14), we obtain

$$\begin{aligned} (n_1 - n_{k+1}) < C_{k+1} (\log n_1)^{k}. \end{aligned}$$
(4.15)

4.2 Bounding \(n_1\)

To bound \(n_1\), we write the Eq. (1.5) as

$$\begin{aligned} \frac{a\alpha ^{n_1}}{\sqrt{\Delta }} + \cdots + \frac{a\alpha ^{n_t}}{\sqrt{\Delta }} - p^{z} = \frac{b\beta ^{n_1}}{\sqrt{\Delta }} + \cdots + \frac{b\beta ^{n_t}}{\sqrt{\Delta }}, \end{aligned}$$

which implies that

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{\sqrt{\Delta }}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_t - n_1}) - p^{z}\right| = \left| \frac{b(\beta ^{n_1} + \cdots +\beta ^{n_t})}{r\sqrt{s}}\right| . \end{aligned}$$
(4.16)

If \(|\beta | < 1\), then (4.16) becomes

$$\begin{aligned} \left| \frac{a\alpha ^{n_1}}{r\sqrt{s}}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{t} - n_1}) - p^{z}\right| < \frac{t|b|}{r\sqrt{s}}. \end{aligned}$$
(4.17)

Dividing both sides of the inequality (4.17) by \(|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{t}})/r\sqrt{s}\),

$$\begin{aligned}&\left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{t} - n_1})^{-1} \right| \nonumber \\&\quad < \frac{t|b|}{|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{t}})}\le \frac{c_{9}}{\alpha ^{n_1}}, \end{aligned}$$
(4.18)

where \(c_{9} = t|b|/ |a|\). For the case \(|\beta | > 1\), we divide both sides of the inequality (4.17) by \(|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{t}})/r\sqrt{s}\),

$$\begin{aligned} \left| 1 - p^{z}\alpha ^{-n_1} a^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{t} - n_1})^{-1} \right|&\le \left| \frac{b(\beta ^{n_1} +\cdots +\beta ^{n_{t}})}{|a|(\alpha ^{n_1} +\cdots +\alpha ^{n_{t}})}\right| \\&< \left( \frac{t|b|}{|a|}\right) \left( \frac{|\beta |}{\alpha }\right) ^{n_{1} }. \end{aligned}$$

Thus, for any \(\beta \) we have

$$\begin{aligned} \begin{aligned}&\left| 1 - p^{z}\alpha ^{-n_1} |a|^{-1} r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{t} - n_1})^{-1} \right| \\&\quad \le \left| 1 - p^{z}\alpha ^{-n_1} a^{-1} r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_{t} - n_1})^{-1} \right| < \frac{c_{10}}{\min \left( \frac{\alpha }{|\beta |}, \alpha \right) ^{n_{1}}}, \end{aligned} \end{aligned}$$
(4.19)

where \(c_{10}:= \max \left\{ c_9, \left( \frac{t|b|}{|a|} \right) \right\} \). To apply Lemma 3.4, we take

$$\begin{aligned}&\gamma _1 := p, \gamma _2 := \alpha , \gamma _3 := |a|^{-1}r\sqrt{s}(1 + \alpha ^{n_2 - n_1} + \cdots + \alpha ^{n_t - n_1})^{-1}\\&b_1 := z,\;\; b_2 := -n_1,\;\; b_3= 1. \end{aligned}$$

Thus, the final linear form is \(\Lambda _t := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\). Suppose \(\Lambda _t = 0\). Then from Lemma 3.6, \(n_1< \ell _t\). That is \(n_1\le \ell \) and this is a contradiction as we have assumed \(n_1 > \ell \). Thus, \(\Lambda _t \ne 0\). Here we take \(B= d_1n_1, A_1 = 2\log p, A_2 = 2\log \alpha \). From the conclusions of Lemma 3.7, we can take \(A_3^t= c_{11} + 2[(n_1 - n_2) + \cdots + (n_1 - n_t)]\log \alpha \) where \(c_{11} = 2\left( \log d_2+ \log (r\sqrt{s})\right) + (t+1)\log 4\). From Lemma 3.4, we have

$$\begin{aligned} |\Lambda _t|> & {} \exp \left( - 1.4\times 30^{5}\times 2^{4.5}\right. \nonumber \\&\left. \times 4\times (1+\log 2)(1+ \log d_1n_1)(2\log p) (2\log \alpha ) A_3^t\right) . \end{aligned}$$
(4.20)

Now from the inequalities (4.19) and (4.20), we get

$$\begin{aligned}&\exp \left( -c_{12}(\log n_{1})(c_{10} + 2(|n_2 - n_1| + \cdots + |n_t - n_1|)\log \alpha ) \right) \nonumber \\&\quad < \frac{c_{10}}{\min \left( \frac{\alpha }{|\beta |}, \alpha \right) ^{n_{1}}}, \end{aligned}$$
(4.21)

where \(c_{12}\) is a suitable constant. Now taking logarithm on both sides of (4.21)

$$\begin{aligned}&n_1\log \min \left( \frac{\alpha }{|\beta |}, \alpha \right) < \log c_{10} + c_{{11}}(\log n_{1})(c_{10} \nonumber \\&\quad + 2(|n_2 - n_1| + \cdots + |n_t - n_1|)\log \alpha ) \end{aligned}$$
(4.22)

Since \((n_1 - n_i) < C_i (\log n_1)^{i-1}\) for \(2\le i \le t\), we deduce from (4.22)

$$\begin{aligned} n_1 < C (\log n_1)^{t}, \end{aligned}$$
(4.23)

where C is a suitable constant. Theorem 1 follows by applying Lemma 3.2 and Lemma 3.1(2) to the inequality (4.23).

5 Proof of Theorem 2

We give the computational details of the resolution of Diophantine Eq. (2.3). Let \((B_{n})_{n \ge 0}\) be the balancing sequence given by \(B_{0} = 0, B_1 = 1\) and \(B_{n+1} = 6B_{n} - B_{n-1}\) for all \(n\ge 1\). Now one can easily see from (2.2), \(a =1, b=1, \alpha =3+2\sqrt{2},\; \beta =3-2\sqrt{2}\) and the nth term of balancing sequence is

$$\begin{aligned} B_{n}=\frac{\alpha ^{n}-\beta ^{n}}{\alpha -\beta } \quad \text{ for } \text{ all }\;\; n=0,1,\ldots . \end{aligned}$$
(5.1)

5.1 The case \(n_3 =0\)

In this case \(n_2 > 0\), thus we have

$$\begin{aligned} B_{n_1} + B_{n_2} = 3^z, \end{aligned}$$
(5.2)

which is a reduced form of Eq. (2.3). Hence without loss of generality, we assume \(n_3 > 0\).

5.2 Bounding \((n_1 - n_2)\) and \((n_1 - n_3)\) in terms of \(n_1\)

If \( 1\le n_1 \le 100\), then a brute force search with Mathematica in the range \(1\le n_{3}< n_2 < n_1 \le 100\) gives no solution of Eq. (2.3). Hence from this point onward, we assume that \(n_1 > 100\). Using Lemma 3.1, for balancing sequence we have \(|B_n| \le \alpha ^n\). Now from (2.3) we have

$$\begin{aligned} 3^z \le \alpha ^{n_1} + \alpha ^{n_2}+\alpha ^{n_3}= \alpha ^{n_1}(1+ \alpha ^{n_2-n_1}+ \alpha ^{n_3-n_1})\le 3\alpha ^{n_1} \le 3^{2n_1} \end{aligned}$$

and this implies

$$\begin{aligned} z \le 2n_1. \end{aligned}$$
(5.3)

We record this estimate for future referencing. We rewrite (2.3) as

$$\begin{aligned} \frac{\alpha ^{n_1}}{4\sqrt{2}} -3^z = \frac{\beta ^{n_1}}{4\sqrt{2}} - B_{n_2} - B_{n_3}. \end{aligned}$$

Now take the absolute values on the both hand side of the above relation obtaining

$$\begin{aligned} \left| \frac{\alpha ^{n_1}}{4\sqrt{2}} -3^z\right| \le \frac{|\beta |^{n_1}}{4\sqrt{2}} + |B_{n_2}| +| B_{n_3}| \le \frac{|\beta |^{n_1}}{4\sqrt{2}} +2\alpha ^{n_2}<2. 5\alpha ^{n_2}. \end{aligned}$$
(5.4)

Dividing both sides of the above inequality by \(\frac{\alpha ^{n_1}}{4\sqrt{2}}\), we obtain the first linear form

$$\begin{aligned} \left| 1 - 3^{z}\alpha ^{-n_1} 4\sqrt{2} \right| < \frac{16}{\alpha ^{n_1-n_2}}. \end{aligned}$$
(5.5)

In order to apply Lemma 3.4, we take

$$\begin{aligned} t= 3, \;\; \gamma _1 = 3,\;\;\gamma _2= \alpha ,\;\;\gamma _3 = 4\sqrt{2}, b_1= z, \; b_2 = -n_1, \; b_3 = 1. \end{aligned}$$

Thus, \(B = 2n_1, h(\gamma _1)= \log 3= 1.0986\cdots , h(\gamma _2) = (\log \alpha )/2 = 0.8813\cdots , h(\gamma _3) \le 0.8664\cdots \). We can choose \(A_1 = 2.4, A_2 = 1.9, A_3 = 1.8\). By Lemma 3.4, we obtain the lower bound for the linear form \(\Lambda _1 := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\) is

$$\begin{aligned} \log |\Lambda _1| > -C_1 (1 + \log 2n_1), \end{aligned}$$
(5.6)

where \(C_1 = 1.4 \times 30^{5}\times 2^{4.5}\times 4\times (1+ \log 2) \times 2.4 \times 1.9\times 1.8 = 7.9\times 10^{12}\). Further, since \((1+\log 2n_1) < 2\log n_1\) for \(n_1 > 100\), we get from (5.5) and (5.6) that

$$\begin{aligned} (n_1-n_2)\log \alpha< \log 16 + 15.8\times 10^{12} \log n_1 < 15.9\times 10^{12}\log n_1. \end{aligned}$$
(5.7)

We now construct a second linear form in logarithms by rewriting Eq. (2.3) as follows:

$$\begin{aligned} \frac{\alpha ^{n_1}}{4\sqrt{2}} + \frac{\alpha ^{n_2}}{4\sqrt{2}} - 3^{z} = \frac{\beta ^{n_1}}{4\sqrt{2}} + \frac{\beta ^{n_2}}{4\sqrt{2}} - B_{n_3}. \end{aligned}$$

Taking absolute values in the above relation and using the fact that \(|\beta | <1\)

$$\begin{aligned} \left| \frac{\alpha ^{n_1}}{4\sqrt{2}}(1 + \alpha ^{n_2 - n_1}) - 3^{z}\right| \le \frac{|\beta |^{n_1}}{4\sqrt{2}} + \frac{|\beta |^{n_2}}{4\sqrt{2}} +| B_{n_3}| < \frac{1}{2\sqrt{2}}+ \alpha ^{n_3}. \end{aligned}$$

Dividing both sides of the above inequality by \(\frac{\alpha ^{n_1}}{4\sqrt{2}}(1 + \alpha ^{n_2 - n_1})\), we obtain

$$\begin{aligned} | 1- 3^z 4\sqrt{2}\alpha ^{-n_1}(1+\alpha ^{n_2-n_1})^{-1}|< \frac{7}{\alpha ^{n_1-n_3}}. \end{aligned}$$
(5.8)

Here our second linear form is \(\Lambda _2 := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\) where

$$\begin{aligned} t= 3, \;\; \gamma _1 = 3,\;\;\gamma _2 = \alpha ,\gamma _3=4\sqrt{2} (1 + \alpha ^{n_2- n_1})^{-1},\;\; b_1= z, \; b_2 = -n_1, \; b_3 = 1. \end{aligned}$$

In this case \(A_1\) and \(A_2\) are same as previous case but \(A_3 = \log 8\sqrt{2} + (n_1 - n_2)\log \alpha \). Thus by applying Lemma 3.4 we get

$$\begin{aligned} \log |\Lambda _2| > - 4.4 \times 10^{12}\times (1 + \log 2n_1)\left( \log 8\sqrt{2} + (n_1 - n_2)\log \alpha \right) . \end{aligned}$$
(5.9)

From inequalities (5.8) and (5.9),

$$\begin{aligned} (n_1-n_3)\log \alpha < 1.4\times 10^{26} (\log n_1)^2. \end{aligned}$$
(5.10)

5.3 Bounding \(n_1\)

To bound \(n_1\), we consider the analogue equation for Eq. (4.18) which is

$$\begin{aligned} | 1- 3^z 4\sqrt{2}\alpha ^{-n_1}(1+\alpha ^{n_2-n_1} + \alpha ^{n_3-n_1})^{-1}|< \frac{c_{9}}{\alpha ^{n_1}}, \end{aligned}$$
(5.11)

with \(c_{9} = t|b|/|a| = 3\). Thus, final linear form is \(\Lambda _3 := \gamma _{1}^{b_{1}}\gamma _{2}^{b_{2}}\gamma _{3}^{b_{3}} - 1\), where

$$\begin{aligned} t= 3, \;\; \gamma _1 = 3,\;\;\gamma _2 = \alpha ,\gamma _3=4\sqrt{2} (1+\alpha ^{n_2-n_1} + \alpha ^{n_3-n_1})^{-1}. \end{aligned}$$

Here by taking \(A_3 = \log 4\sqrt{2} + (n_1 - n_2)\log \alpha + (n_1 - n_3)\log \alpha + \log 4\) and applying Lemma 3.4, we get

$$\begin{aligned} \log |\Lambda _3| > - 4.4 \times 10^{12}\times (1 + \log 2n_1)(6 + (n_1 - n_2)\log \alpha + (n_1 - n_3)\log \alpha ).\nonumber \\ \end{aligned}$$
(5.12)

From inequalities (5.11) and (5.12),

$$\begin{aligned} n_1 \log \alpha < 22\times 10^{38} (\log n_1)^3. \end{aligned}$$
(5.13)

Further, from Lemma 3.2, we have

$$\begin{aligned} n_1 < 1.5\times 10^{45}. \end{aligned}$$
(5.14)

We summarize the above discussion in the following proposition.

Proposition 3

Let us assume that \(n_1> n_2 > n_3\) and \(n_1 > 100\). If \((n_1, n_2, n_3, z)\) is a positive integral solution of Eq. (2.3), then

$$\begin{aligned} z \le 2n_1 < 3\times 10^{45}. \end{aligned}$$
(5.15)

5.4 Reducing the size of \(n_1\)

From Proposition 3, we can see that the bound we have obtained for \(n_{1}\) is very large. Now our job is to reduce this upper bound to a certain minimal range. We return to inequality (5.5). Put

$$\begin{aligned} \Lambda _1 := z\log 3 -n_1\log \alpha + \log 4\sqrt{2}. \end{aligned}$$
(5.16)

Then (5.5) implies

$$\begin{aligned} |1- e^{\Lambda _1}|< \frac{16}{\alpha ^{n_1-n_2}}. \end{aligned}$$

Note that \(\Lambda _1 > 0\), otherwise \(3^z \le \alpha ^{n_1}/4\sqrt{2}\). But we always have

$$\begin{aligned} \frac{\alpha ^{n_1}}{4\sqrt{2}}< B_{n_1}+1\le B_{n_1}+B_{n_2}+B_{n_3}= 3^z. \end{aligned}$$

Using the fact that \(1+x< e^x \) holds for all positive real numbers x, we get

$$\begin{aligned} 0< \Lambda _1 \le e ^{\Lambda _1} - 1 < \frac{16}{\alpha ^{n_1-n_2}}. \end{aligned}$$

Dividing Eq. (5.16) by \(\log \alpha \), we have

$$\begin{aligned} 0< z\left( \frac{\log 3}{\log \alpha }\right) -n_1 +\left( \frac{\log 4\sqrt{2}}{\log \alpha }\right) < \frac{10}{\alpha ^{n_1-n_2}}. \end{aligned}$$
(5.17)

We are now ready to use Lemma 3.5 with parameters

$$\begin{aligned} \gamma := \frac{\log 3}{\log \alpha },\;\; \mu := \frac{\log 4\sqrt{2}}{\log \alpha },\;\; A:= 10,\;\; B:= \alpha . \end{aligned}$$

Let \([a_0, a_1, a_2,\ldots ] = [0, 1, 1, 1, 1, 1, 8, 4, 17,\ldots ]\) be a continued fraction expansion of \(\gamma \) and let \(p_k/q_k\) be its kth convergent. We take \(M:= 3\times 10^{45}\), then using Mathematica, we can see that

$$\begin{aligned} 6M < q_{99}. \end{aligned}$$

To apply Lemma 3.5, consider \(\epsilon := \Vert \mu q_{99}\Vert - M\Vert \gamma q_{99}\Vert \) which is positive. If (2.3) has a solution \((n_1, n_2, n_3, z)\), then \((n_1 - n_2) \in [0,70]\). Next we look into inequality (5.8) to estimate the upper bound for \((n_1 - n_3)\). Now putting

$$\begin{aligned} \Lambda _2:= z\log 3 - n_1 \log \alpha + \log \phi (n_1-n_2), \end{aligned}$$
(5.18)

where we take \(\phi (x)= 4\sqrt{2}(1+\alpha ^{-x})^{-1}\), it implies

$$\begin{aligned} | 1- e^{\Lambda _2} | < \frac{7}{\alpha ^{n_1-n_3}}. \end{aligned}$$

Using the Binet formula of the balancing sequence, one can show that \(\Lambda _2 >0\) since

$$\begin{aligned} \frac{\alpha ^{n_1}}{4\sqrt{2}}+\frac{\alpha ^{n_2}}{4\sqrt{2}}< B_{n_1}+B_{n_2}+1\le B_{n_1}+B_{n_2}+B_{n_3}= 3^z. \end{aligned}$$

Altogether we get

$$\begin{aligned} 0< \Lambda _2 <\frac{7}{\alpha ^{n_1 - n_3}}. \end{aligned}$$
(5.19)

Replacing \(\Lambda _2\) in inequality (5.19) by its formula in Eq. (5.18) and arguing as in inequality (5.17), we get

$$\begin{aligned} 0< z\left( \frac{\log 3}{\log \alpha }\right) -n_1 +\left( \frac{\log \phi (n_1-n_2)}{\log \alpha }\right) < \frac{4}{\alpha ^{n_1-n_3}}. \end{aligned}$$
(5.20)

Again we use Lemma 3.5 here with the following parameters

$$\begin{aligned} \gamma := \frac{\log 3}{\log \alpha },\;\; \mu := \frac{\log \phi (n_1-n_2)}{\log \alpha },\;\; A:= 4,\;\; B:= \alpha . \end{aligned}$$
(5.21)

Proceeding like before with \(M := 3\times 10^{45}\) and applying Lemma 3.5 to the inequality (5.20) for all possible choices of \(n_1-n_2 \in [0,70]\) we find that if Eq. (2.3) has a solution \((n_1, n_2, n_3, z)\), then \((n_1 - n_3) \in [0,72]\). Finally, in order to obtain a better upper bound on \(n_1\), we can put

$$\begin{aligned} \Lambda _3:= z\log 3 - n_1 \log \alpha + \log \psi (n_1-n_2, n_1-n_3), \end{aligned}$$
(5.22)

with \(\psi (x_1,x_2):= 4\sqrt{2}(1+ \alpha ^{-x_1}+\alpha ^{-x_2})^{-1}\), which implies

$$\begin{aligned} |1 - e^{\Lambda _3}|< \frac{3}{\alpha ^{n_1}}. \end{aligned}$$

One can observe \(\Lambda _3 \ne 0\). So, for rest of the cases we consider \(\Lambda _3 > 0\) and \(\Lambda _3< 0\) separately. If \(\Lambda _3 > 0\), then

$$\begin{aligned} 0< \Lambda _3 < \frac{3}{\alpha ^{n_1}}. \end{aligned}$$
(5.23)

Suppose \(\Lambda _3< 0\). Since \(\frac{3}{\alpha ^{n_1}}< \frac{1}{2}\) for \(n_1> 2\), we get that \(|e^{\Lambda _3}-1|< 1/2\), therefore \(e^{|\Lambda _3|}< 2\). Thus,

$$\begin{aligned} 0< |\Lambda _3| \le e^{|\Lambda _3|}-1=e^{|\Lambda _3|}|e^{\Lambda _3}-1|<\frac{6}{\alpha ^{n_1}}. \end{aligned}$$

Thus for both cases we have

$$\begin{aligned} 0< |\Lambda _3| \le e^{|\Lambda _3|} - 1< \frac{6}{\alpha ^{n_1}}. \end{aligned}$$
(5.24)

Putting the value of \(\Lambda _3\) from Eq. (5.22) in inequality (5.24) and arguing as previously we obtain

$$\begin{aligned} 0< \left| z\frac{\log 3}{\log \alpha } - n_1 + \frac{\log \psi (n_1-n_2, n_1-n_3)}{\log \alpha }\right| < \frac{4}{\alpha ^{n_1}}. \end{aligned}$$
(5.25)

Now, we repeat the same procedure as earlier with \(M:= 3\times 10^{45}\) for inequality (5.25). For all possible choices of \(n_1-n_2 \in [0,70]\) and \(n_1-n_3 \in [0,72]\), we apply Lemma 3.5 to inequality (5.25). If Eq. (2.3) has a solution \((n_1, n_2, n_3, z)\), then \(n_1 \in [0,75]\). This leads to a contradiction to our assumption that \(n_1 > 100\), which completes the proof of Theorem 2.