On a problem of Pillai with k–generalized Fibonacci numbers and powers of 2

For an integer k≥2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ k \ge 2 $$\end{document}, let {Fn(k)}n≥0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \{F^{(k)}_{n} \}_{n\ge 0}$$\end{document} be the k–generalized Fibonacci sequence which starts with 0,…,0,1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ 0, \ldots , 0, 1 $$\end{document} (k terms) and each term afterwards is the sum of the k preceding terms. In this paper, we find all integers c having at least two representations as a difference between a k–generalized Fibonacci number and a power of 2 for any fixed k≥4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k \ge 4$$\end{document}. This paper extends previous work from Ddamulira et al. (Proc Math Sci 127(3): 411–421, 2017. https://doi.org/10.1007/s12044-017-0338-3) for the case k=2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=2$$\end{document} and Bravo et al. (Bull Korean Math Soc 54(3): 069–1080, 2017. https://doi.org/10.4134/BKMS.b160486) for the case k=3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=3$$\end{document}.


Introduction
A perfect power is a positive integer of the form a x where a > 1 and x ≥ 2 are integers. Pillai wrote several papers on these numbers. In 1936 and again in 1945 (see [15,16]), he conjectured that for any given integer c ≥ 1, the number of positive integer solutions (a, b, x, y), with x ≥ 2 and y ≥ 2, to the Diophantine equation is finite. This conjecture, which is still open for all c = 1, amounts to saying that the distance between two consecutive terms in the sequence of all perfect powers tends to infinity. The case c = 1 is Catalan's conjecture which states that the only solution in positive integers to (1) for a, b > 0, x, y > 1 is x = 2, a = 3, y = 3, b = 2. This conjecture was proved by Mihȃilescu [4].
Pillai's problem was continued in 1936 by Herschfeld (see [12,13]) who showed that if c is an integer with sufficiently large absolute value, then the equation (1), in the special case (a, b) = (3,2), has at most one solution (x, y). For small |c| this is not the case. Pillai (see [15,16]) extended Herschfeld's result to the more general exponential Diophantine equation (1) with fixed integers a, b, c with gcd(a, b) = 1 and a > b ≥ 1. Specifically, Pillai showed that there exists a positive integer c 0 (a, b) such that, for |c| > c 0 (a, b), equation (1) has at most one integer solution (x, y).
Recently, Ddamulira et al. [8] considered the Diophantine equation where c is a fixed integer and {F n } n 0 is the sequence of Fibonacci numbers given by F 0 = 0, F 1 = 1 and F n+2 = F n+1 + F n for all n 0. This type of equation can be seen as a variation of Pillai's equation. Ddamulira et.al. proved that the only integers c having at least two representations of the form F n − 2 m are contained in the set C = {0, −1, 1, −3, 5, −11, −30, 85}. Moreover, they computed for each c ∈ C all representations of the from (2).
Bravo et al. [5] considered the Diophantine equation where c is a fixed integer and {T n } n 0 is the sequence of Tribonacci numbers given by T 0 = 0, T 1 = 1, T 2 = 1 and T n+3 = T n+2 + T n+1 + T n for all n 0. In their paper, Bravo et al. proved that the only integers c having at least two representations of the form T n − 2 m are contained in the set C = {0, −1, −3, 5, −8}. In fact, each c ∈ C has exactly two representations of the from (3).
In the same spirit, Chim et al. [6] considered the Diophantine equation where c is a fixed integer. They proved that the only integers c having at least two representations of the form F n − T m are contained in the set In particular, they computed for each c ∈ C all representations of the from (4), showing that each c ∈ C has at most four representations. The purpose of this paper is to generalize the previous results corresponding to (2) and (3). Let k 2 be an integer. We consider a generalization of Fibonacci sequence called the k-generalized Fibonacci sequence {F (k) n } n 2−k defined as with the initial conditions We call F (k) n the nth k-generalized Fibonacci number. Note that when k = 2, it is the classical Fibonacci number (nth term, which is denoted by F n here for simplicity) and when k = 3 it is the Tribonacci number.
The first direct observation is that the first k + 1 nonzero terms in F (k) n are powers of 2, namely while the next term in the above sequence is F We also observe that the recursion (5) implies the three-term recursion which shows that the k-Fibonacci sequence grows at a rate less than 2 n−2 . In fact, the inequality F (k) n < 2 n−2 holds for all n ≥ k + 2 (see [3], Lemma 2). In this paper, we find all integers c admitting at least two representations of the form F (k) n − 2 m for some positive integers k, n and m. This can be interpreted as solving the equation with (n, m) = (n 1 , m 1 ). As we already mentioned, the cases k = 2 and k = 3 have been solved completely by Ddamulira et al. [8] and Bravo et al. [5], respectively. So, we focus on the case k 4. We prove the following theorem: Theorem 1 Assume that k ≥ 4. Then equation (8) with n > n 1 ≥ 2, m > m 1 ≥ 0 has the following families of solutions (c, n, m, n 1 , m 1 ): (i) In the range 2 ≤ n 1 < n ≤ k + 1, we have the following solution: (ii) In the ranges 2 ≤ n 1 ≤ k + 1 and k + 2 ≤ n ≤ 2k + 2, we have the following solutions: (a) when n 1 = n − 1: In the range k + 2 ≤ n 1 < n ≤ 2k + 2, we have the following solutions: if the maximal integer a such that 2 a ≤ k + 2 satisfies a + 2 a = k + 1 + 2 b for some positive integer b, then (iv) If n = 2k + 3, and additionally k = 2 t − 3 for some integer t ≥ 3, then: Equation (8) has no solutions with n > 2k + 3.

Preliminary results
Here, we recall some of the facts and properties of the k−generalized Fibonacci sequence which will be used later in this paper. It is known that the characteristic polynomial of the k-generalized Fibonacci numbers is irreducible over Q[x] and has just one root outside the unit circle. Let α := α(k) denote that single root, which is located between 2 1 − 2 −k and 2 (see [9]). To simplify notation, in our application we shall omit the dependence on k of α. We shall use α (1) , . . . , α (k) for all roots of Ψ k (x) with the convention that α (1) We now consider for an integer k ≥ 2, the function for z ∈ C.
With this notation, Dresden and Du presented in [9] the following "Binet-like" formula for the terms of F (k) : It was proved in [9] that the contribution of the roots which are inside the unit circle to the formula (10) is very small, namely that the approximation When k = 2, one can easily prove by induction that It was proved by Bravo and Luca [3] that which shows that (12) holds for the k-generalized Fibonacci numbers as well. The observations derived from the expressions (10)-(13) enable us to call α the dominant root of F (k) . In order to prove our main result Theorem 1, we need to use several times a Baker type lower bound for a nonzero linear form in logarithms of algebraic numbers and such a bound, which plays an important role in this paper, was given by Matveev [14]. There are other explicit lower bounds for linear forms in logarithms of algebraic numbers in the literature, like that by Baker and Wüstholz [2], for example. We begin by recalling some basic notions from algebraic number theory.
Let η be an algebraic number of degree d with minimal primitive polynomial over the integers where the leading coefficient a 0 is positive and the η (i) 's are the conjugates of η. Then the logarithmic height of η is given by In particular, if η = p/q is a rational number with gcd( p, q) = 1 and q > 0, then h(η) = log max{| p|, q}. The following are some of the properties of the logarithmic height function h(·), which will be used in the next sections of this paper without reference: With the previous notation, Matveev [14] proved the following theorem, which is our main tool in this paper.
Theorem 2 Let γ 1 , . . . , γ t be positive real algebraic numbers in a real algebraic number field K of degree D, b 1 , . . . , b t be nonzero integers, and let be nonzero. Then During the course of our calculations, we get some upper bounds on our variables which are too large, thus we need to reduce them. To do so, we use some results from the theory of continued fractions. Specifically, for a nonhomogeneous linear form in two integer variables, we use a slight variation of a result due to Dujella and Pethő [10], which itself is a generalization of a result of Baker and Davenport [1].
For a real number X , we write ||X || := min{|X − n| : n ∈ Z} for the distance from X to the nearest integer. Before we conclude this section, we present some useful lemmas that will be used in the next sections on this paper. The following lemma was proved by Bravo and Luca [3].

Lemma 2
For k ≥ 2, let α be the dominant root of F (k) , and consider the function f k (z) defined in (9). Then: Next, we present a useful lemma which is a result due to Cooper and Howard [7].

Lemma 3
For k ≥ 2 and n ≥ k + 2, In the above, we have denoted by x the greatest integer less than or equal to x and also used the convention that a b = 0 if either a < b or if one of a or b is negative. In particular, if we assume that k + 2 ≤ n ≤ 2k + 2, then (n + k)/(k + 1) = 2, and the formula becomes The following estimate was proved by Gómez and Luca [11]. They used the above result Lemma 3 to prove it.

Parametric families of solutions
Assume that (n, m) = (n 1 , m 1 ) are such that n 1 and since min{n, n 1 } ≥ 2, we get that n = n 1 . Thus, (n, m) = (n 1 , m 1 ), contradicting our assumption. Hence, m = m 1 , and we may assume without loss of generality that m > m 1 ≥ 0. Since and the right-hand side of (17) is positive, we get that the left-hand side of (17) is also positive and so n > n 1 . Thus, since F We analyze the possible situations.

Case 1.
Assume that 2 ≤ n 1 < n ≤ k + 1. Then, by (6), we have so, by substituting in (17), we get The number on the left-hand side of the above equation is 2 m−1 + · · · + 2 m 1 and the number on the right-hand side is 2 n−3 + · · · + 2 n 1 −2 . So, by the uniqueness of the binary representation we have m = n − 2 and m 1 = n 1 − 2, giving c = 0. All powers of 2 in the k-generalized Fibonacci sequence are known to be just the numbers F (k) s with 1 ≤ s ≤ k + 1 (see [3]). This gives (i) from the statement of Theorem 1. From now on, we assume that c = 0.
Since n ≤ 2k + 2, it suffices that 2 k−1 > k + 2, which indeed holds for all k ≥ 4. Furthermore, unless n 1 = n − 1, we have from the preceding argument. Thus, we have either n 1 = n − 1 and then which leads to showing that m = n − 3, or n 1 < n − 1, in which case showing that m = n − 2.
We study the two cases. When n 1 = n − 1, then since showing that m 1 = 0. So, we have found the parametric family for which c = 2 k−1 − 1 according to (8). This corresponds to situation (ii-a) in the statement of Theorem 1.
A different possibility is n 1 < n − 1, in which case m = n − 2. Now (18) leads to Simplifying the powers of 2, we get Thus, n − k ∈ [2, k + 2] is a difference of two powers of 2. Take any number in and this is nonnegative from the preceding discussion. So, the family is . This corresponds to situation (ii-b) in the statement of Theorem 1.

Case 3.
Assume that k + 2 ≤ n 1 < n ≤ 2k + 2. Then, by (15), we have that Then by a similar substitution as before, equation (17) translates into Since n 1 ≤ n − 1, the left-hand side is at least where the last inequality is equivalent to giving m = n − 3. In this case, we get from (19), in the statement of the Theorem 1.
Next we consider the situation n 1 < n − 1. We show that there are no solutions in this case. Then, The last inequality is equivalent to which is implied by showing that m = n − 2. In this case, we have by (19), that The left-hand side is positive therefore so is the right-hand side. Thus, To proceed, we write where α, α 1 are nonnegative and u, u 1 are odd. Since n − k, We distinguish various cases.
Case 3.1 α + n − n 1 = α 1 . In this case, by (21), we have Note that we cannot have u = u 1 (otherwise we get n = n 1 , a contradiction). Since the exponent of 2 in the right in (22) is exactly n 1 − 2 and in the left is at least We deduce that the following inequality holds: Thus, which yields 2 k+1 ≤ (k + 2)(k + 1), so k ≤ 3. So, this case cannot lead to infinitely many solutions. Case 3.2 α + n − n 1 < α 1 . In this case, by (21), we now have Identifying factors which are powers of 2 in both sides, we have Since Thus, as in the previous case, this situation cannot lead us to infinitely many solutions either.
The last parametric family from the statement of Theorem 1 will be identified in the next section.

Solutions with n ≥ 2k + 3
From now on, we searched for solutions other than the ones given in Theorem 1 (i), (ii), and (iii), with the aim is to show that perhaps they are none except for some sporadic ones with k < k 0 with some small k 0 . Then the problem will be solved by finding individually for every k ∈ [4, k 0 ], the values of c such that (8) has some solution (n, m, n 1 , m 1 ) with n > n 1 , m > m 1 and determining for each c all such representations. It turns out that this program does not quite work out since along the way we find parametric family (iv) with n = 2k + 3, but afterwards all does work out and we are able to show that indeed if n > 2k + 3, then k ≤ 790.
So, let's get to work. We go back to (8) and assume that n ≥ 2k + 3. Suppose first that m ≥ n − 1. We recall equality (17): The left-hand side is positive and where we used the fact that F (k) n < 2 n−2 for n ≥ k + 2. Thus, m ≤ n − 2. Note that n ≥ 2k + 3, so n − 2k ≥ 3.
Thus, (30) is impossible. Hence, m 1 ≥ n 1 − 1. Using the first identity in (27), we have that the left-hand side in (29) is where |η| < (y 2 + y 3 )/2 < y 2 . Note that since Thus, the left-hand side of (29) is in the interval Now the right-hand side of (29) is in the interval (− 2 m 1 , − 2 m 1 −1 ], where for the right-hand extreme of the interval we used the fact that F (k) In particular, m 1 ≥ n − k − 3, so We thus get, from (29) and (31), that We distinguish two cases.

Equation (29) now implies that
Assume that n 1 ≤ n − 2k − 4. Then which is a contradiction. Thus, we must have n 1 ≥ n − 2k − 3, so The left-hand side above is an integer divisible by 2 n−2k−5 . Since it is smaller than 2 n−2k−7 , it must be the zero integer. Thus, with w = n − 2k, we have In the left-hand side above, one of the factors w − 2 and w + 1 is odd. Since they are both positive and powers of 2, it follows that the smaller one is 1. Hence, w = 3, so giving n 1 − 2 = n − 2k − 3 = 0. Thus, n = 2k + 3, n 1 = 2 and m = n − 2 = 2k + 1. From equality (29), we conclude that for some integer t ≥ 3 and m 1 = k + t. Hence, we obtain the parametric family with c = 1 − 2 t+2 t −3 , which corresponds to situation (iv) in the statement of the Theorem 1.
The equation that we then get from (24) and (33) is Given that m 1 < m and that we are in the case m = n − 2, we have We thus have showing the left-hand side is zero. Thus, a = m 1 −(n −k −3), b = n 1 −2−(n −k −3) and So, n = k + 2 a − 2 b . As in previous iterations, we go one step further and write Inserting these into equation (29), we get We have n 1 = n−k −1+b, so n 1 −k −3 = n−2k −4+b so n 1 −k −3−(n−2k −5) = b + 1 and We already know that 2 n−2 |δ| < 2 n−2k−8 . Now showing that the number in absolute value is zero, which is a contradiction because n − 2k ≥ 3 and b ≥ 0. In conclusion, there are no solutions with n > 2k + 3 provided that (23) holds. In the next section, we estimate a value of k 0 for which inequality (23) is fulfilled for all k > k 0 .

Establishing an inequality in terms of n and k and estimating k 0
Since n > n 1 ≥ 2, we have that F (k) n−1 and therefore So, from the above, (13) and (17), we have leading to We note that the above inequality (36) in particular implies that m < n < 1.2m + 4. Moreover, note that we can assume n ≥ k + 2, since otherwise, this would give us only the solution for c = 0, which is family (i) of Theorem 1.
We assume for technical reasons that n > 1600. By (11) and (17), we get In the above, we have also used the fact that | f k (α)| < 1. Dividing through by 2 m we get where for the right-most inequality in (37) we used (35) and the fact that α 2 > 2.
For the left-hand side of (37) above, we apply Theorem 2 with the data We begin by noticing that the three numbers γ 1 , γ 2 , γ 3 are positive real numbers and belong to the field K := Q(α), so we can take D := [K : Q] = k. Put To see why Λ = 0, note that otherwise, we would then have that f k (α) = 2 m α −(n−1) and so f k (α) would be an algebraic integer, which contradicts Lemma 2 (i).
Now the argument is split into two cases.
Comparing this with (38), we get that In this case, we write (17) as The above inequality (39) suggests once again studying a lower bound for the absolute value of We again apply Matveev's theorem with the following data We can again take B := n and K := Q(α), so that D := k. We also note that, if is an algebraic integer, which is not the case. Thus, Λ 2 = 0. Now, we note that Thus, kh(γ 1 ) < 4k log k + (m − m 1 ) log 2 < 3 × 10 11 k 4 log 2 k(1 + log n), and so we can take A 1 := 3 × 10 11 k 4 log 2 k(1 + log n). As before, we take A 2 := log 2 and A 3 := k log 2. It then follows from Matveev's theorem, after some calculations, that log |Λ 2 | > −4.13 × 10 22 k 7 log 3 k(1 + log n) 2 .
The above inequality leads to n < 5.1 × 10 34 k 11 log 4 k log 3 n, which can be equivalently written as n (log n) 3 < 5.1 × 10 34 k 11 log 4 k.
We then record what we have proved so far as a lemma. (n, m, n 1 , m 1 , k) is a solution in positive integers to equation (8) with (n, m) = (n 1 , m 1 ), n > n 1 ≥ 2, m > m 1 ≥ 0 and k ≥ 4, we then have that n < 2.8 × 10 41 k 11 log 7 k.

Lemma 6 If
6 Reduction of the bounds on n

The cutoff k
We have from the above that Baker's method gives n < 2.8 × 10 41 k 11 log 7 k.
Imposing that the above amount is at most 2 (k−5)/3 , which would imply inequality (23), we get 2.8 3 × 10 123 k 33 (log k) 21 < 2 k , leading to k > 790. We now reduce the bounds and to do so we make use of Lemma 1 several times.

The Case of small k
We next treat the cases when k ∈ [4,790]. We note that for these values of the parameter k, Lemma 6 gives us absolute upper bounds for n. However, these upper bounds are so large that we wish to reduce them to a range where the solutions can be identified by using a computer. To do this, we return to (37) and put For technical reasons we assume that min{n − n 1 , m − m 1 } ≥ 20. In the case that this condition fails, we consider one of the following inequalities instead: (i) if n − n 1 < 20 but m − m 1 ≥ 20, we consider (38); (ii) if n − n 1 ≥ 20 but m − m 1 < 20, we consider (39); (iii) if n − n 1 < 20 and m − m 1 < 20, we consider (41).
Suppose now that Γ < 0. Since Λ = |e Γ − 1| < 1/2, we get that e |Γ | < 2. Thus, In any case, we have that the inequality always holds. Replacing Γ in the above inequality by its formula and dividing through by log 2, we conclude that We apply Lemma 1 with the data We also put M k := 2.8 × 10 41 k 11 log 7 k , which is upper bound on n by Lemma 6. From the fact that α is a unit in O K , the ring of integers of K, ensures that τ k is an irrational number. Furthermore, τ k is transcendantal by Gelfond-Schneider Theorem. A computer search in Mathematica showed that the maximum value of log(200q/ε)/ log α is < 1571 and the maximum value of log(8q/ε)/ log 2 is < 1566. Therefore, either Thus, we have that either n − n 1 ≤ 1571, or m − m 1 ≤ 1566. First, let us assume that n − n 1 ≤ 1571. In this case we consider the inequality (38) and assume that m − m 1 ≥ 20. We put Γ 1 = (n 1 − 1) log α − m log 2 + log( f k (α)(α n−n 1 − 1)). Hence, m − m 1 ≤ 1570. Now let us assume that m − m 1 ≤ 1566. In this case, we consider the inequality (39) and assume that n − n 1 ≥ 20. We put Γ 2 = (n − 1) log α − m 1 log 2 + log( f k (α)(2 m−m 1 − 1)).
Since n > 1600, from (41) we conclude that 0 < |Γ 3 | < 2 6 2 0.8n . With the help of Mathematica we find that the maximum value of log(114q/ε)/ log 2 , for k ∈ [4,790], l ∈ [1, 1574] and j ∈ [1,1570] is < 1574. Thus, n < 1574, which contradicts the assumption that n > 1600 in Sect. 5. We finish the resolution of the Diophantine equation (8), for this case, with the following procedure. Consider the following equivalent equation to (8) For k ∈ [4,790] and n ∈ [k + 2, 1600], let the set with c = log α/ log 2. Note that we have used (36) to define the range of m in D n,k . As in all computations of this paper, with the help of Mathematica, we looked for all (n, k) the intersections F n,k ∩ D n,k . After an extensive search, we obtain that F n,k ∩ D n,k contains only the solutions corresponding to the families (i)-(iv) in the statement of Theorem 1 for the current range of the variables. This completes the proof in the case of small k.

The Case of large k
In this case we assume that k > 790, we have already shown that the Diophantine equation (8) has only the solutions listed in Theorem 1.