# Markoff–Rosenberger triples and generalized Lucas sequences

## Abstract

We consider the Markoff–Rosenberger equation

\begin{aligned} ax^2+by^2+cz^2=dxyz \end{aligned}

with $$(x,y,z)=(U_i,U_j,U_k)$$, where $$U_i$$ denotes the i-th generalized Lucas number of first/second kind. We provide an upper bound for the minimum of the indices and we apply the result to completely resolve concrete equations, e.g. we determine solutions containing only balancing numbers and Jacobsthal numbers, respectively.

## Introduction

Markoff [7] showed that the equation

\begin{aligned} x^2+y^2+z^2=3xyz \end{aligned}

has infinitely many integral solutions. The equation defined above is called Markoff equation, and it has been generalized in many directions by several authors. In this article, we deal with the generalization

\begin{aligned} ax^2+by^2+cz^2=dxyz \end{aligned}
(1.1)

considered by Rosenberger [8]. Rosenberger proved that if $$a,b,c,d\in {\mathbb {N}}$$ are integers such that $$\gcd (a,b)=\gcd (a,c)=\gcd (b,c)=1$$ and $$a,b,c \mid d$$, then non-trivial solutions exist only if $$(a,b,c,d)\in A$$, where

\begin{aligned} A= \big \{(1,1,1,1),(1,1,1,3),(1,1,2,2),(1,1,2,4),(1,1,5,5),(1,2,3,6) \big \}. \end{aligned}

Luca and Srinivasan [6] proved that the only solution of Markoff equation with $$x\le y\le z$$ such that $$(x,y,z)=(F_i,F_j,F_k)$$ is given by the well-known identity related to the Fibonacci numbers

\begin{aligned} 1+F_{2n-1}^2+F_{2n+1}^2=3F_{2n-1}F_{2n+1}. \end{aligned}

Kafle, Srinivasan and Togbé [5] determined all triples of Pell numbers $$(x,y,z)=(P_i,P_j,P_k)$$ satisfying the Markoff equation $$x^2+y^2+z^2=3xyz$$. Here, there is an other identity given by

\begin{aligned} 2^2 + P_{2m-1}^2 + P_{2m+1}^2 = 3\cdot 2\cdot P_{2m-1}P_{2m+1}. \end{aligned}

Markoff–Rosenberger triples containing only Fibonacci numbers were determined by Tengely [9]. Altassan and Luca [1] considered Markoff–Rosenberger equations with integer solutions (xyz) which are all members of a Lucas sequence whose characteristic equation has roots which are quadratic units. In this article, we consider generalized Lucas number solutions of the Markoff–Rosenberger equation. We define the sequences $$\{U_n\}_{n \ge 0}$$,$$\{V_n\}_{n \ge 0}$$ as follows:

\begin{aligned} U_0(P,Q)&=0,\quad U_1(P,Q)=1,\quad U_{n}(P,Q)=PU_{n-1}(P,Q)-QU_{n-2}(P,Q),\\ V_0(P,Q)&=2,\quad V_1(P,Q)=P,\quad V_{n}(P,Q)=PV_{n-1}(P,Q)-QV_{n-2}(P,Q), \end{aligned}

where neither P nor Q is zero.

### Remark 1.1

Assume that $$P^\star =-P$$ and define

\begin{aligned}&U^\star _0=0, \quad U^\star _1=1, \quad U^\star _n=P^\star U^\star _{n-1}-QU^\star _{n-2},\\&V^\star _0=2, \quad V^\star _1=P^\star , \quad V^\star _n=P^\star V^\star _{n-1}-QV^\star _{n-2}. \end{aligned}

Then we have

\begin{aligned} U^\star _n=(-1)^{n+1}U_n,\quad V^\star _n=(-1)^nV_n. \end{aligned}

Based on the above identities in this paper we only deal with sequences satisfying $$P>0$$.

In this paper we assume that $$0<D=P^2-4Q$$ $$, P\ge 2$$ and $$-P-1\le Q\le P-1$$. We excluded the cases with $$P=1$$ to make the presentation simpler. However, if $$P=1$$, then $$-2\le Q\le 0$$. Therefore, there are only two sequences to be considered. Namely, the Fibonacci sequence with $$(P,Q)=(1,-1)$$ and the Jacobsthal sequence with $$(P,Q)=(1,-2)$$. The former one was completely solved in [9], the latter one will be handled separately in this paper. The characteristic polynomial associated to the above sequences is given by $$x^2-Px+Q$$. The roots of the characteristic polynomial can be written in the form

\begin{aligned} \alpha =\frac{P+\sqrt{D}}{2},\quad \beta =\frac{P-\sqrt{D}}{2} \end{aligned}

and we have $$\alpha -\beta =\sqrt{D}$$, $$\alpha +\beta =P$$ and $$\alpha \beta =Q$$. We note that the conditions $$P\ge 2$$, $$D>0$$ and $$-P-1\le Q\le P-1$$ imply that $$\alpha \ge 2$$ and $$|\beta |\le 1$$. First we justify the second statement, and then the first one. Since $$P\ge 2$$ and $$-P-1\le Q\le P-1$$, we have

\begin{aligned} (P-2)^2\le P^2-4Q\le (P+2)^2. \end{aligned}

Therefore, $$P-2\le \sqrt{D}\le P+2$$. We have that $$\beta =\frac{P-\sqrt{D}}{2}$$. Hence,

\begin{aligned} -1\le \beta \le 1. \end{aligned}

This implies that $$\alpha \ge 2$$. Indeed, if $$P \ge 3$$, then $$\alpha =P- \beta \ge P-1 \ge 2$$. On the other hand, if $$P=2$$, then $$Q \in \{-3,-2,-1,1\}$$. The case $$Q=1$$ is not convenient since it leads to the characteristic equation $$x^2-2x+1=(x-1)^2$$ which has a double root so $$D=0$$. Thus, $$Q \le -1$$, so $$\alpha =(2+\sqrt{4-4Q})/2 \ge (2+\sqrt{8})/2=1+\sqrt{2} >2$$. Also, $$\alpha >\left| \beta \right|$$. All this has relevance later.

By Binet’s formulas we have that

\begin{aligned} U_n=\frac{\alpha ^n-\beta ^n}{\alpha -\beta },\quad V_n=\alpha ^n+\beta ^n. \end{aligned}

We assume that

\begin{aligned} \alpha ^{k-2}&\le U_k \le 2 \alpha ^k , \end{aligned}
(1.2)
\begin{aligned} 2 \alpha ^{k-1}&\le V_k \le 2 \alpha ^k \quad \text{ for } k\ge 1, \end{aligned}
(1.3)

and these will be fulfilled in case of $$D>0$$, $$P\ge 2$$ and $$-P-1\le Q\le P-1$$, $$Q \ne 0$$. The bounds on inequalities (1.2) and (1.3) are obtained as follows. The upper bounds are clear since $$\alpha -\beta =\sqrt{D} \ge 1$$, so

\begin{aligned} U_k=\frac{\alpha ^k-\beta ^k}{\alpha -\beta } \le \alpha ^k-\beta ^k \le 2\alpha ^k \quad \text{ for } k\ge 1. \end{aligned}

Similarly, we get that $$V_k=\alpha ^k+\beta ^k \le 2\alpha ^k$$. For the lower bounds, first we note that if $$\beta >0$$, or $$\beta <0$$ and k is even, then

\begin{aligned} V_k=\alpha ^k+\beta ^k > \alpha ^k \ge 2 \alpha ^{k-1}. \end{aligned}

If $$\beta <0$$ and k is odd, then

\begin{aligned} V_k=\alpha ^k-\left| \beta \right| ^k=(\alpha -\left| \beta \right| )(\alpha ^{k-1}+\cdots +\left| \beta \right| ^{k-1})\ge 2\alpha ^{k-1}, \end{aligned}

since $$\alpha -\left| \beta \right| =\alpha +\beta =P\ge 2$$. For $$U_k$$, we use a similar argument. If $$\beta >0$$, then

\begin{aligned} U_k=\frac{\alpha ^k-\beta ^k}{\alpha -\beta } =\alpha ^{k-1}+\alpha ^{k-2}\beta +\cdots +\beta ^{k-1}>\alpha ^{k-1} > \alpha ^{k-2}. \end{aligned}

If $$\beta <0$$, then

\begin{aligned} U_k\ge \frac{\alpha ^k-\left| \beta \right| ^k}{\alpha +\left| \beta \right| } > \frac{\alpha -\left| \beta \right| }{2 \alpha } (\alpha ^{k-1}+\cdots +\left| \beta \right| ^{k-1}) \ge \alpha ^{k-2}, \end{aligned}

where we used again the fact that $$\alpha -\left| \beta \right| =\alpha +\beta =P\ge 2$$. In general, we assume that if $$\{R_n\}_{n \ge 0}$$ is a nondegenerate Lucas sequence of the first or second kind, then there exist constants $$s_1,s_2,i_1,i_2$$ such that

\begin{aligned} s_1\alpha ^{n-i_1}\le R_n \le s_2\alpha ^{n+i_2} \quad \text{ for } n\ge 1, \end{aligned}

and this will be fulfilled in the cases that we investigate in this paper.

### Remark 1.2

Let $$\{R_n\}_{n \ge 0}$$ be a binary linear recurrence sequence represented by $$\{U_n\}_{n \ge 0}$$ or $$\{V_n\}_{n \ge 0}$$. In order to determine all triples $$(R_i, R_j, R_k)$$ satisfying equation (1.1) at a given tuple $$(a,b,c,d)\in A$$, we first compute an upper bound for i (such that $$1\le i\le j\le k$$), denote it by $$\mathfrak {ub}_{R_n}(a,b,c,d)$$. Hence, to resolve the equation completely with e.g. $$(a,b,c,d)=(1,2,3,6)$$ one needs to handle the cases with $$i\le \mathfrak {ub}_{R_n}(1,2,3,6)$$, $$i\le \mathfrak {ub}_{R_n}(1,3,2,6)$$, $$i\le \mathfrak {ub}_{R_n}(2,1,3,6)$$, $$i\le \mathfrak {ub}_{R_n}(2,3,1,6)$$, $$i\le \mathfrak {ub}_{R_n}(3,1,2,6)$$ and $$i\le \mathfrak {ub}_{R_n}(3,2,1,6)$$. Then after obtaining the solutions of (1.1) with these cases, we permute the components of these solutions in which they satisfy equation (1.1) at the tuple $$(a,b,c,d)=(1,2,3,6)$$ to determine the complete list of its solutions. Although, Theorem 2.1 gives the least upper bound for all such cases of the tuples of A. For that we let S be the set of all distinct tuples (abcd) derived from permuting the first three components of elements in A.

## Main results

### Theorem 2.1

Let $$(a,b,c,d)\in S$$, $$P\ge 2$$, $$-P-1\le Q\le P-1$$ such that $$Q \ne 0$$, $$D>0$$ and

\begin{aligned} B_0=\min _{I\in {\mathbb {Z}}}\left| \alpha ^I-\frac{d}{c\sqrt{D}}\right| ,\quad B_1=\min _{I\in {\mathbb {Z}}}\left| \alpha ^I-\frac{d}{c}\right| . \end{aligned}

If $$B_0\ne 0$$, then $$B_0\ge \alpha ^{-4}$$ and if $$B_1\ne 0$$, then $$B_1\ge 0.17$$. Furthermore, if $$x=U_i$$, $$y=U_j$$ and $$z=U_k$$ with $$1\le i\le j\le k$$ is a solution of (1.1) and $$B_0\ne 0$$, then $$i \le 12$$. If $$x=V_i$$, $$y=V_j$$ and $$z=V_k$$ with $$1\le i\le j\le k$$ is a solution of (1.1) and $$B_1\ne 0$$, then $$i \le 7$$.

### Proof

Let us start proving the first part of the theorem in which we show that $$B_0\ge \alpha ^{-4}$$ and $$B_1\ge 0.26$$ as $$B_0\ne 0$$ and $$B_1\ne 0$$, respectively. We start with the case of $$B_1$$. From S we have the rational number d/c is in the set $$\{1,2,3,4,5,6\}$$. If $$I=0$$ and $$B_1\ne 0$$, then $$d/c \in \{2,3,4,5,6\}$$. So $$B_1\ge 1$$. However, if $$d/c=1$$, then $$B_1=0$$ is achieved at $$I=0$$ independently on P and Q. If $$I<0$$, then $$\alpha ^I \le \alpha ^{-1} \le 1/2$$, which implies that $$B_1\ge 1/2$$. Next, assume that $$I=1$$. If $$d/c=1$$, then $$B_1\ge 1$$ since $$\alpha \ge 2$$. But, $$B_1=0$$ in case of $$\alpha =d/c \in$$ $$\{2,3,4,5,6\}$$. Now, we indicate the values of P and Q in each of these cases giving that $$B_1=0$$. Since $$\alpha$$ and P are positive integers such that $$\alpha \in \{2,3,4,5,6\}$$ and $$P \ge 2$$. Then $$\beta =P-\alpha$$ must be an integer. Thus, we obtain that $$\beta \in \{-1,1\}$$ since $$-1 \le \beta \le 1$$. Furthermore, we get that $$D=(\alpha -\beta )^2 \ge 1$$ as $$\alpha \ge 2$$ and $$\beta =\pm 1$$. Therefore, the appropriate values of P and Q can be determined by

\begin{aligned} P=\alpha + \beta ,\quad Q=\alpha \beta , \end{aligned}

where $$\alpha \in \{2,3,4,5,6\}$$ and $$\beta \in \{-1,1\}$$. In the following table, we summarize the details of computations for the values of P and Q (such that $$P\ge 2$$ and $$-P-1\le Q\le P-1, Q \ne 0$$) in which we have $$B_1=0$$.

$$\alpha$$ (PQ)
2 (3, 2)
3 $$(4,3), (2,-3)$$
4 $$(5,4), (3,-4)$$
5 $$(6,5),(4,-5)$$
6 $$(7,6), (5,-6)$$

Assuming that that $$I \ge 2$$. If $$P \ge 4$$, then $$\alpha ^I \ge \alpha ^2 \ge (P-1)^2 \ge 9$$. So $$B_1 \ge 3$$. Thus, it remains to deal with the cases $$P \in \{2,3\}$$ and $$-P-1\le Q\le P-1$$ such that $$Q \ne 0$$. We start with $$P=2$$ and $$-3 \le Q \le 1$$. As mentioned earlier the case with $$Q=1$$ is not convenient since $$D=0$$. So $$Q \in \{-3,-2,-1\}$$. If $$P=2$$ and $$Q=-3$$, then $$\alpha =(P+\sqrt{P^2-4Q})/2=(2+\sqrt{16})/2=3$$. This gives us $$\alpha ^I \ge 9$$. Thus, $$B_1 \ge 3$$. Next, if $$P=2$$ and $$Q=-2$$, then $$\alpha =1+\sqrt{3}$$ and $$\alpha ^I \ge 2(2+\sqrt{3})$$, which give $$B_1 > 1.46$$. Similarly, in case of $$P=2$$ and $$Q=-1$$ we get $$\alpha ^I \ge 3+2\sqrt{2}$$. Therefore, $$B_1 \ge 3-2\sqrt{2} \simeq 0.17$$. In the following table, we provide details of computations for the remaining cases in which we have $$B_1$$ is nonzero for all $$I \ge 2$$.

(PQ) $$\alpha$$ Lower bound on $$B_1$$
$$(3,-4)$$ 4 $$B_1 \ge 10$$
$$(3,-3)$$ $$(3+\sqrt{21})/2$$ $$B_1 > 8.37$$
$$(3,-2)$$ $$(3+\sqrt{17})/2$$ $$B_1 >6.68$$
$$(3,-1)$$ $$(3+\sqrt{13})/2$$ $$B_1 > 4.90$$
(3, 1) $$(3+\sqrt{5})/2$$ $$B_1 > 0.85$$

Indeed, the only special case in which we have $$B_1=0$$ is with $$(P,Q) =(3,2)$$. Here, $$B_1=0$$ is achieved at $$I=2$$ and $$d/c=4$$ since $$\alpha =2$$. However, if $$I \ge 3$$, then $$\alpha ^I \ge 9$$. So $$B_1 \ge 3$$. The computations above show that $$B_1 \ge 0.17$$.

We now turn to $$B_0$$. We have $$\sqrt{D}=\alpha -\beta \in [\alpha -1, \alpha +1]$$. If $$I \le -2$$, then

\begin{aligned} B_0 \ge \frac{(d/c)}{\sqrt{D}}-\frac{1}{\alpha ^2} \ge \frac{1}{\alpha +1}-\frac{1}{\alpha ^2}=\frac{\alpha ^2-\alpha -1}{\alpha ^2(\alpha +1)} > \frac{1}{\alpha ^4}, \end{aligned}

since $$\alpha \ge 2$$, so $$\alpha ^2-\alpha -1 \ge 1$$. If $$I=-1$$, then either $$d/c \ge 2$$, so

\begin{aligned} B_0 \ge \frac{2}{\alpha -\beta }-\frac{1}{\alpha } \ge \frac{2}{\alpha +1}-\frac{1}{\alpha }=\frac{\alpha -1}{\alpha (\alpha +1)} \ge \frac{1}{\alpha ^3}> \frac{1}{\alpha ^4}, \end{aligned}

or $$d/c=1$$ so

\begin{aligned} B_0 = \left| \frac{1}{\alpha }-\frac{1}{\alpha - \beta } \right| = \frac{\left| \beta \right| }{\alpha (\alpha -\beta )} \ge \frac{1}{\alpha ^2(\alpha +1)} \ge \frac{1}{\alpha ^4}, \end{aligned}

where we used the fact that $$\left| \beta \right| =\left| Q \right| /\alpha \ge 1/\alpha$$. In particular, the expression under the minimum to compute $$B_0$$ is not zero when I is negative.

Assume next that $$I \ge 0$$. If $$\beta \in \{-1,1\}$$, then $$\sqrt{D}=\alpha -\beta$$ is an integer. Thus, in this case when $$B_0 \ne 0$$, the number $$B_0$$ is a positive rational number of denominator $$c(\alpha -\beta ) \le 5(\alpha +1)$$. Therefore,

\begin{aligned} B_0 \ge \frac{1}{5(\alpha +1)} \ge \frac{1}{\alpha ^4}, \end{aligned}

where the last inequality holds since $$\alpha \ge 2$$. Finally, if $$\beta \in (-1,1)$$, then $$\bigl | c\sqrt{D} \alpha ^I - d \bigr |$$ is a quadratic real algebraic integer multiple of c. Its conjugate is $$\bigl | -c \sqrt{D}\beta ^I-d \bigr |=| c(\alpha - \beta )\beta ^I+d | \le c \alpha + (c+d)$$. Hence, since the norm of a quadratic nonzero algebraic integer divisible by c is greater than or equal to $$c^2$$, we get

\begin{aligned} B_0&=\frac{\bigl | c\sqrt{D}\alpha ^I-d \bigr |}{c \sqrt{D}} \ge \frac{1}{c \sqrt{D}}\left( \frac{c^2}{(c\alpha +c+d)} \right) \\&= \frac{1}{(\alpha -\beta )(\alpha +1+d/c)} \ge \frac{1}{(\alpha +1)(\alpha +7)} \ge \frac{1}{\alpha ^4}. \end{aligned}

We finish the proof by justifying the last inequality. If $$P = 2$$, then $$\alpha \ge 1+\sqrt{2}$$ and the last inequality holds. If $$P \ge 4$$, then $$\alpha =P-\beta >3$$, so the last inequality holds. It also holds if $$P = 3$$ and $$Q < 0$$, since then again $$\alpha > 3$$. Finally, if $$P = 3$$ and $$Q > 0$$, then $$Q = 1, 2$$. The case $$Q=2$$ gives $$\beta =1$$, a case already treated, and if $$Q = 1$$, then $$\alpha$$ is the square of the golden section so it is greater than $$1 +\sqrt{2}$$ and the desired inequality holds anyway.

Now, we prove the second part of the theorem. In fact, we look for solutions satisfying $$x=U_i, y=U_j$$ and $$z=U_k$$ with $$1\le i\le j\le k.$$ We have that

\begin{aligned} \frac{c\alpha ^k}{\sqrt{D}}-\frac{d}{D}\alpha ^{i+j}=-\frac{aU_i^2+bU_j^2}{U_k}+\frac{c\beta ^k}{\sqrt{D}}-\frac{d}{D}(\alpha ^i\beta ^j+\alpha ^j\beta ^i-\beta ^{i+j}). \end{aligned}

We apply (1.2) to get an upper bound for $$\frac{aU_i^2+bU_j^2}{U_k}$$ such that $$aU_i^2+bU_j^2\le (a+b)U_j^2$$ holds since the Lucas sequence $$\{U_n\}_{n \ge 0}$$ is monotone increasing. We obtain that

\begin{aligned} \frac{aU_i^2+bU_j^2}{U_k}\le \frac{(a+b)U_j^2}{U_k}\le 4 (a+b)\alpha ^2 \alpha ^j. \end{aligned}

Since $$|\beta |\le 1$$, we get that

\begin{aligned} \left| \frac{c\beta ^k}{\sqrt{D}}\right| \le \left| \frac{c}{\sqrt{D}}\right| \le \left| \frac{c\alpha ^j}{\sqrt{D}}\right| . \end{aligned}

The last expression to bound is $$\frac{d}{D}(\alpha ^i\beta ^j+\alpha ^j\beta ^i-\beta ^{i+j})$$. In this case we obtain that

\begin{aligned} \left| \frac{d}{D}(\alpha ^i\beta ^j+\alpha ^j\beta ^i-\beta ^{i+j})\right| \le \frac{d}{D}(2\alpha ^j+1). \end{aligned}

Hence, we have that

\begin{aligned} \left| \frac{d}{D}(\alpha ^i\beta ^j+\alpha ^j\beta ^i-\beta ^{i+j})\right| \le \frac{3d}{D}\alpha ^j. \end{aligned}

From the above inequalities we get

\begin{aligned} \left| \frac{c\alpha ^k}{\sqrt{D}}-\frac{d}{D}\alpha ^{i+j}\right| \le \left( 4 (a+b)\alpha ^2+\frac{c}{\sqrt{D}}+\frac{3d}{D}\right) \alpha ^j. \end{aligned}

It follows that

\begin{aligned} \left| \alpha ^{k-i-j}-\frac{d}{c\sqrt{D}}\right| \le \left( 4 (a+b)\alpha ^2 \frac{\sqrt{D}}{c}+\frac{3d}{c\sqrt{D}}+1\right) \alpha ^{-i}. \end{aligned}
(2.1)

Let

$$B_0=\min _{I\in {\mathbb {Z}}}\left| \alpha ^I-\frac{d}{c\sqrt{D}}\right| .$$

If $$B_0\ne 0$$ (then $$B_0\ge \alpha ^{-4}$$), then we get an upper bound for i from the inequality

\begin{aligned} \alpha ^i\le \frac{1}{B_0}\left( 4 (a+b)\alpha ^2 \frac{\sqrt{D}}{c}+\frac{3d}{c\sqrt{D}}+1\right) . \end{aligned}
(2.2)

Since $$B_0\ge \alpha ^{-4}, a+b \le 6, 1 \le \sqrt{D} \le \alpha +1, c \ge 1$$ and $$d/c \le 6$$, then (2.2) becomes

\begin{aligned} \alpha ^i \le \alpha ^4 (4 \cdot 6 \cdot \alpha ^2(\alpha +1)+19) <\alpha ^{13}, \end{aligned}

where the last inequality holds since $$\alpha \ge 2$$. Thus, $$i \le 12$$. In a similar way, one can prove the second part of the statement. Hence, we note that we get the inequalities (assuming that $$B_1\ne 0$$, then $$B_1\ge 0.17$$)

\begin{aligned} \left| \alpha ^{k-i-j}-\frac{d}{c}\right|&\le \left( 2(a+b) \alpha \frac{1}{c}+\frac{3d}{c}+1\right) \alpha ^{-i}, \end{aligned}
(2.3)
\begin{aligned} \alpha ^i&\le \frac{1}{B_1}\left( 2(a+b) \alpha \frac{1}{c}+\frac{3d}{c}+1\right) . \end{aligned}
(2.4)

Again, since $$B_1\ge 0.17, a+b \le 6, c \ge 1$$ and $$d/c \le 6$$, so (2.4) is

\begin{aligned} \alpha ^i \le (0.17)^{-1} (2 \cdot 6 \cdot \alpha +19) <\alpha ^{8}, \end{aligned}

where the last inequality holds since $$\alpha \ge 2$$. So $$i \le 7$$. Hence, Theorem 2.1 is completely proved. $$\square$$

It is important to remark that these lower bounds on $$B_0$$ or $$B_1$$ (namely, $$B_0 \ge \alpha ^{-4}$$ or $$B_1 \ge 0.17$$) are the greatest lower bounds in case of any Lucas sequence of the first or second kind with all the tuples $$(a,b,c,d) \in S$$, respectively. Indeed, they may be greater due to particular sequences with certain tuples $$(a,b,c,d) \in S$$. A similar idea goes for the upper bounds on $$i's$$ (i.e. $$i \le 12$$ or $$i \le 7$$), they are only least upper bounds in case of any Lucas sequence of the first or second kind with all the tuples $$(a,b,c,d) \in S$$, respectively. Indeed, they could be smaller due to particular sequences and tuples.

Note that in the proof of Theorem 2.1, the cases where we have $$B_1=0$$ were completely studied. Thus, it remains to classify the cases satisfying $$B_0=0$$, the result is as follows.

### Theorem 2.2

If $$P\ge 2$$, $$-P-1\le Q\le P-1$$, $$Q\ne 0$$ and $$D>0$$, then $$B_0\ne 0$$ fulfills unless

• $$e=1$$, $$P=3$$, $$Q=2$$, $$\alpha =2$$, $$\sqrt{D}=1$$, $$I=0$$,

• $$e=2$$, $$P=3$$, $$Q=2$$, $$\alpha =2$$, $$\sqrt{D}=1$$, $$I=1$$,

• $$e=2$$, $$P=4$$, $$Q=3$$, $$\alpha =3$$, $$\sqrt{D}=2$$, $$I=0$$,

• $$e=3$$, $$P=5$$, $$Q=4$$, $$\alpha =4$$, $$\sqrt{D}=3$$, $$I=0$$,

• $$e=4$$, $$P=3$$, $$Q=2$$, $$\alpha =2$$, $$\sqrt{D}=1$$, $$I=2$$,

• $$e=4$$, $$P=6$$, $$Q=5$$, $$\alpha =5$$, $$\sqrt{D}=4$$, $$I=0$$,

• $$e=4$$, $$P=2$$, $$Q=-3$$, $$\alpha =3$$, $$\sqrt{D}=4$$, $$I=0$$,

• $$e=5$$, $$P=7$$, $$Q=6$$, $$\alpha =6$$, $$\sqrt{D}=5$$, $$I=0$$,

• $$e=5$$, $$P=3$$, $$Q=-4$$, $$\alpha =4$$, $$\sqrt{D}=5$$, $$I=0$$,

• $$e=6$$, $$P=4$$, $$Q=3$$, $$\alpha =3$$, $$\sqrt{D}=2$$, $$I=1$$,

• $$e=6$$, $$P=8$$, $$Q=7$$, $$\alpha =7$$, $$\sqrt{D}=6$$, $$I=0$$,

• $$e=6$$, $$P=4$$, $$Q=-5$$, $$\alpha =5$$, $$\sqrt{D}=6$$, $$I=0$$,

where $$e=d/c$$ such that $$(a,b,c,d) \in S$$.

### Proof

From the proof of Theorem 2.1 (particularly, if $$B_0=0$$, then $$B_0 \ge \alpha ^{-4}$$), it follows that $$B_0$$ cannot be zero if I is negative. Therefore, $$I \ge 0$$. If $$\beta \in (-1,1)$$, then $$B_0$$ cannot be zero if $$I=0$$ (since $$\sqrt{D}$$ is not rational). So $$I \ne 0$$ and $$\alpha ^I=e/\sqrt{D}$$, where $$e=d/c$$. Conjugating and taking ratios we get $$(\alpha /\beta )^I=-1$$, which is false. Thus, $$\beta = \pm 1$$ and $$\sqrt{D}=\alpha -\beta =P-2 \beta =P \pm 2$$. Since $$I \ge 0$$, then $$P \pm 2$$ divides $$e \in \{1,2,3,4,5,6 \}$$. So $$P \le 8$$ (indeed, $$2 \le P \le 8$$). Since $$\sqrt{D}=P-2 \beta >0$$, then $$3 \le P \le 8$$ in case of $$\beta =1$$. Hence, it remains to study the cases in which we have

\begin{aligned} B_0=\min _{I\ge 0}\left| \alpha ^I - \frac{e}{\sqrt{D}}\right| =\min _{I\ge 0}\left| (P-\beta )^I - \frac{e}{(P-2 \beta )}\right| =0. \end{aligned}

Since $$(P-\beta )^{I}$$ is a positive integer as $$\beta \in \{-1,1\}, I \ge 0$$ and $$2 \le P \le 8$$ (avoiding that $$P=2$$ in case of $$\beta =1$$), so $$e/(P-2 \beta )$$ must be also a positive integer. In fact, the latter condition (i.e. $$e/(P-2 \beta ) \in \mathbb {Z^+}$$) is achieved only at the following cases:

$$\square$$:

$$e=1$$, and $$P-2 \beta =1$$, i.e. $$(P, \beta )=(3, 1)$$.

$$\square$$:

$$e=2$$, and $$P-2 \beta =1, 2$$, i.e. $$(P, \beta )=(3, 1)$$, (4, 1), respectively.

$$\square$$:

$$e=3$$, and $$P-2 \beta =1, 3$$, i.e. $$(P, \beta )=(3, 1)$$, (5, 1), respectively.

$$\square$$:

$$e=4$$, and $$P-2 \beta =1, 2,4$$, i.e. $$(P, \beta )=(3, 1)$$, (4, 1), (6, 1) or $$(2,-1)$$, respectively.

$$\square$$:

$$e=5$$, and $$P-2 \beta =1, 5$$, i.e. $$(P, \beta )=(3, 1)$$, (7, 1) or $$(3,-1)$$, respectively.

$$\square$$:

$$e=6$$, and $$P-2 \beta =1, 2,3,6$$, i.e. $$(P, \beta )=(3, 1)$$, (4, 1), (5, 1), (8, 1) or $$(4,-1)$$, respectively.

Finally, by examining which of the above cases leads to $$B_0=0$$ we get the results as follows. From the first case we get that $$B_0=0$$ at $$P=3, \beta =1, I=0$$, $$e=1$$, and these give that $$\sqrt{D}=P-2 \beta = 1, \alpha = P-\beta =2$$ and $$Q=\alpha \beta =2$$. Hence, the first statement of the theorem is achieved. Similarly, from the second case we obtain that $$B_0=0$$ at $$(P, \beta , I, e)=(3, 1, 1, 2)$$ and (4, 1, 0, 2). The former tuple implies that $$\sqrt{D}=1, \alpha =2$$ and $$Q=2$$. So the second statement of the theorem is also fulfilled. However, the third statement is accomplished similarly by the latter tuple. We also get $$B_0=0$$ only in case of $$P=5, \beta =1, I=0$$, $$e=3$$, that give $$\sqrt{D}=3, \alpha =4$$ and $$Q=4$$. Hence, the fourth statement of the theorem is obtained. In a very similar way, the remaining statements of the theorem will be fulfilled from the last three cases above. This completes the proof of Theorem 2.2. $$\square$$

## Applications

Let $$(a,b,c,d) \in A$$ and $$\{R_n\}_{n \ge 0}$$ be either $$\{U_n\}_{n \ge 0}$$ or $$\{V_n\}_{n \ge 0}$$. In order to apply the procedure described in Theorem 2.1 to resolve equation (1.1) in $$x=R_i,y=R_j,z=R_k$$, we firstly do the following steps (since in Theorem 2.1, $$1\le i\le j\le k$$ is assumed). The first step is permuting the first three components in (abcd). Then for each of the resulting tuples, we provide an upper bound for i as explained in Theorem 2.1. In fact, Theorem 2.1 gives the least upper bound for all such cases of the tuples of A. After that we adopt the arguments described in [9] (in case of the Fibonacci sequence) to determine the list of solutions. Finally, when the solutions of (1.1) with these cases are obtained we permute the components of these solutions in which they satisfy equation (1.1) at the tuple $$(a,b,c,d)\in A$$ in order to determine all of its solutions $$(x,y,z)=(R_i, R_j, R_k).$$

If we fix (abcd), i and $$m=k-j$$, then we need to study the equation

\begin{aligned} aR_i^2+bR_j^2+c R_{j+m}^2-dR_i R_j R_{j+m}=0, \end{aligned}

where $$R_n=U_n$$ or $$V_n.$$ We note that the equation above only depends on j. Now, we adopt the arguments given in [9].

1. (I)

We eliminate as many values of i as possible by checking the solvability of quadratic equations

\begin{aligned} aR_i^2+by^2+cz^2-dR_iyz=0. \end{aligned}
2. (II)

For fixed m we eliminate equations $$aR_i^2+bR_j^2+c R_{j+m}^2-dR_i R_j R_{j+m}=0$$ modulo p, where p is a prime.

3. (III)

We can also eliminate equations $$aR_i^2+bR_j^2+c R_{j+m}^2-dR_i R_j R_{j+m}=0$$ using related identities of second order linear recurrence sequences.

4. (IV)

We consider the equation $$aR_i^2 + bR_j^2 + cR_{j+m}^2 = dR_i R_j R_{j+m}$$ as a quadratic in $$R_j$$. Its discriminant $$d^2R_i^2R_{j+m}^2 -4b(aR_i^2 + cR_{j+m}^2 )$$ must be a square. The terms of the sequences $$\{U_n\}_{n \ge 0}$$ and $$\{V_n\}_{n \ge 0}$$ satisfy the fundamental identity

\begin{aligned} V_n^2-DU_n^2=4Q^n. \end{aligned}

Therefore, in case of $$Q=\pm 1$$ we have the systems of equations

\begin{aligned} Y_1^2&=DX^2\pm 4,\\ Y_2^2&=d^2R_i^2X^2 -4b(aR_i^2 + cX^2 ), \end{aligned}

where $$X=R_{j+m}=U_{j+m}$$, $$Y_1=V_{j+m}$$, $$Y_2=2bR_j-dR_iU_{j+m}$$; and

\begin{aligned} Y_1^2&=DX^2\mp 4D,\\ Y_2^2&=d^2R_i^2X^2 -4b(aR_i^2 + cX^2 ), \end{aligned}

where $$X=R_{j+m}=V_{j+m}$$, $$Y_1= DU_{j+m}$$, $$Y_2=2bR_j-dR_iV_{j+m}$$. Multiplying these equations together, in general, yields quartic genus 1 curves. One may determine the integral points on these curves using the Magma [3] function SIntegralLjunggrenPoints (based on results obtained by Tzanakis [10]). Indeed, it may happen that we get genus 0 curves.

Let us apply the procedure described in Theorem 2.1 with these arguments to determine the solutions of equation (1.1) in some second order linear recurrence sequences.

### Balancing numbers and Markoff–Rosenberger equations

The first definition of balancing numbers is essentially due to Finkelstein [4], although he called them numerical centers. In 1999, Behera and Panda [2] defined balancing numbers as follows. A positive integer n is called a balancing number if

$$1 + 2 +\cdots + (n-1) = (n + 1) + (n + 2) +\cdots + (n + k)$$

for some $$k\in {\mathbb {N}}$$. The sequence of balancing numbers is denoted by $$\{B_n\}_{n\ge 0}$$. This sequence can be defined in a recursive way as well, we have that $$B_0=0,B_1=1$$ and

\begin{aligned} B_{n}=6B_{n-1}-B_{n-2},\quad n\ge 2. \end{aligned}

As we see this is the sequence $$\{U_n(6,1)\}_{n \ge 0}$$. So $$P=6$$, $$Q=1$$ and $$D=32$$. We also have that

\begin{aligned} \alpha =3+2\sqrt{2},\quad \beta =3-2\sqrt{2}. \end{aligned}

We have the bounds

\begin{aligned} \alpha ^{n-1}\le B_n\le \alpha ^n \quad \text{ for } n\ge 1, \end{aligned}
(3.1)

which are specific to the sequence of balancing numbers. Since $$Q=1$$ the numbers $$X=B_n$$ satisfy the Pellian equation $$Y^2=8X^2+1$$. We prove the following result.

### Theorem 3.1

If $$(x,y,z)=(B_i,B_j,B_k)$$ is a solution of the equation

\begin{aligned} ax^2+by^2+cz^2=dxyz \end{aligned}

and $$(a,b,c,d)\in \bigl \{(1,1,1,1),(1,1,1,3),(1,1,2,2), (1,1,2,4), (1,1,5,5), (1,2,3,6) \bigr \}$$, then there is at most one solution given by $$x=y=z=B_1=1.$$

### Proof

Note that here we can directly use the results given in Theorem 2.1 (i.e. $$B_0 \ge \alpha ^{-4}$$ and $$i \le 12$$), argument (I) and any of the arguments described in (II), (III) or (IV) to prove the theorem completely. But in practice, having a smaller upper bound on i and eliminating as many $$i's$$ as possible are very useful for determining the complete set of solutions, and, as pointed earlier, the upper bound “12” on i is only the least upper bound that could be even smaller due to particular sequences. Therefore, we follow the general strategy given in Theorem 2.1 to compute the best possible values for the lower bounds on $$B_0's$$ (i.e. greater values) and the upper bounds on $$i's$$ (i.e. smaller values) specific to the sequence of balancing numbers with the use of the inequalities given in (3.1). It turns out that in all the cases we have that $$i\le 5$$. Moreover, by applying argument (I), many values of $$i's$$ can be eliminated by checking integral solutions of binary quadratic forms. Therefore, we skip the congruence arguments given by (II) and (III). We directly consider the genus 1 curves obtained from the system of equations

\begin{aligned} Y_1^2&=8X^2+1,\\ Y_2^2&=d^2B_i^2X^2 -4b(aB_i^2 + cX^2 ). \end{aligned}

In the following table, we provide details of the computations.

$$\left[ a,b,c,d\right]$$ $$B_0$$ $$C_0$$ $$\left[ i\right]$$ $$\left[ i, A'X^{4} +B'X^{2} +C', \left[ X,Y\right] \right]$$
$$\left[ 1, 1, 1, 1\right]$$ 0.0052038 5 $$\left[ 2 \right]$$ $$\left[ 2, 256X^{4} - 1120X^{2} - 144, \left[ \right] \right]$$
$$\left[ 1, 1, 1, 3\right]$$ 0.3587572 2 $$\left[ 1 \right]$$ $$\left[ 1, 40X^{4} - 27X^{2} - 4, \left[ \left[ 1, -3\right] , \left[ -1, -3\right] \right] \right]$$
$$\left[ 1, 1, 2, 2\right]$$ 0.0052038 4 $$\left[ 2 \right]$$ $$\left[ 2, 1088X^{4} - 1016X^{2} - 144, \left[ \right] \right]$$
$$\left[ 1, 2, 1, 2\right]$$ 0.1819805 3 $$\left[ 2 \right]$$ $$\left[ 2, 1088X^{4} - 2168X^{2} - 288, \left[ \right] \right]$$
$$\left[ 2, 1, 1, 2\right]$$ 0.1819805 3 [] []
$$\left[ 1, 1, 2, 4\right]$$ 0.1819805 2 $$\left[ 1 \right]$$ $$\left[ 1, 64X^{4} - 24X^{2} - 4, \left[ \left[ 1, 6\right] , \left[ -1, 6\right] \right] \right]$$
$$\left[ 1, 2, 1, 4\right]$$ 0.2928932 3 $$\left[ 1 \right]$$ $$\left[ 1, 64X^{4} - 56X^{2} - 8, \left[ \left[ 1, 0\right] , \left[ -1, 0\right] \right] \right]$$
$$\left[ 2, 1, 1, 4\right]$$ 0.2928932 3 $$\left[ 1 \right]$$ $$\left[ 1, 96X^{4} - 52X^{2} - 8, \left[ \left[ 1, -6\right] , \left[ -1, -6\right] \right] \right]$$
$$\left[ 1, 1, 5, 5\right]$$ 0.0052038 4 $$\left[ 1 \right]$$ $$\left[ 1, 40X^{4} - 27X^{2} - 4, \left[ \left[ 1, -3\right] , \left[ -1, -3\right] \right] \right]$$
$$\left[ 1, 5, 1, 5\right]$$ 0.1161165 4 $$\left[ 1 \right]$$ $$\left[ 1, 40X^{4} - 155X^{2} - 20, \left[ \left[ 2, 0\right] , \left[ -2, 0\right] \right] \right]$$
$$\left[ 5, 1, 1, 5\right]$$ 0.1161165 4 $$\left[ 1 \right]$$ $$\left[ 1, 168X^{4} - 139X^{2} - 20, \left[ \left[ 1, -3\right] , \left[ -1, -3\right] \right] \right]$$
$$\left[ 1,2,3,6\right]$$ 0.1819805 2 $$\left[ 1 \right]$$ $$\left[ 1, 96X^{4} - 52X^{2} - 8, \left[ \left[ 1, -6\right] , \left[ -1, -6\right] \right] \right]$$
$$\left[ 1,3,2,6\right]$$ 0.3587572 2 $$\left[ 1 \right]$$ $$\left[ 1, 96X^{4} - 84X^{2} - 12, \left[ \left[ 1, 0\right] , \left[ -1, 0\right] \right] \right]$$
$$\left[ 2, 1, 3, 6\right]$$ 0.1819805 2 $$\left[ 1 \right]$$ $$\left[ 1, 192X^{4} - 40X^{2} - 8, \left[ \left[ 1, 12\right] , \left[ -1, 12\right] \right] \right]$$
$$\left[ 2, 3, 1, 6\right]$$ 0.0606601 4 $$\left[ 1 \right]$$ $$\left[ 1, 192X^{4} - 168X^{2} - 24, \left[ \left[ 1, 0\right] , \left[ -1, 0\right] \right] \right]$$
$$\left[ 3, 1, 2, 6\right]$$ 0.3587572 2 $$\left[ 1 \right]$$ $$\left[ 1, 224X^{4} - 68X^{2} - 12, \left[ \left[ 1, -12\right] , \left[ -1, -12\right] \right] \right]$$
$$\left[ 3, 2, 1, 6\right]$$ 0.0606601 4 $$\left[ 1 \right]$$ $$\left[ 1, 224X^{4} - 164X^{2} - 24, \left[ \left[ 1, 6\right] , \left[ -1, 6\right] \right] \right]$$

The first column gives the tuples $$(a,b,c,d) \in S$$, the second column represents approximated lower bounds on $$B_0's$$, the third column has upper bounds on $$i's$$ represented by $$C_0$$, in the fourth column we provide lists containing the remaining values of $$i's$$ not eliminated by argument (I), and in the last column we have lists containing i, the right hand side of the quartic polynomial $$Y^2=A'X^{4} +B'X^{2} +C'$$ defining genus 1 curve and the integral solutions (the second coordinate is only up to sign, for us, only the first coordinate is interesting since that gives $$B_{j+m}$$). For example, in case of $$(a,b,c,d)=(1,2,3,6)$$ we have that $$B_0\approx 0.1819805$$ and $$C_0=2$$. That is $$i\le 2$$. Applying argument (I) we can eliminate $$i=2$$. Hence, it remains to study the case with $$i=1$$. Here, we get that the only integral solutions are the ones with $$X=\pm 1$$. Since $$X=B_{j+m}$$, the only possibility is $$B_{j+m}=1$$. The last step is the solution of the quadratic equation

\begin{aligned} 1^2+2\cdot B_j^2+3\cdot 1^2=6\cdot 1\cdot B_j\cdot 1. \end{aligned}

It follows that $$B_j$$ is either 1 or 2, but 2 is not a balancing number. Therefore, the only solution in this case is

\begin{aligned} (B_i,B_j,B_k)=(B_1,B_1,B_1)=(1,1,1). \end{aligned}

$$\square$$

### Jacobsthal numbers and Markoff–Rosenberger equations

If $$(P,Q)=(1,-2)$$, then we deal with a special sequence in which we have that $$P <2$$; that is the sequence of Jacobsthal numbers $$\{J_n\}_{n \ge 0}=\{U_n(1,-2)\}_{n \ge 0}$$. Here, we have $$J_0=0,J_1=1$$ and

\begin{aligned} J_n=J_{n-1}+2J_{n-2}\quad \text{ if } n\ge 2. \end{aligned}

It is also known that the next Jacobsthal number is also given by the recursion formula

\begin{aligned} J_{n+1}=2J_n+(-1)^n. \end{aligned}

We obtain that

\begin{aligned} D=9, \quad \alpha =2, \quad \beta =-1. \end{aligned}

Therefore, the closed-form of $$J_n$$ is given by

\begin{aligned} \frac{2^n-(-1)^n}{3}. \end{aligned}

Based on the above closed-form equation we may provide bounds for $$J_n$$, these are as follows

\begin{aligned} \frac{2^{n-1}}{3}\le J_n\le 2^{n-1}, \quad n\ge 1. \end{aligned}
(3.2)

Similarly, these bounds are only specific to the general term $$J_n$$. Here, we prove the following statement.

### Theorem 3.2

If $$(x,y,z)=(J_i,J_j,J_k)$$ is a solution of equation

\begin{aligned} aJ_i^2+bJ_j^2+cJ_k^2=dJ_iJ_jJ_k \end{aligned}
(3.3)

and $$(a,b,c,d)\in \{(1,1,1,1), (1,1,1,3), (1,1,2,2), (1,1,2,4), (1,1,5,5), (1,2,3,6)\}$$, then the complete list of solutions is given by

(abcd) Solutions
(1, 1, 1, 1) $$\{(3,3,3)\}$$
(1, 1, 1, 3) $$\{(1,1,1)\}$$
(1, 1, 2, 2) $$\{ \}$$
(1, 1, 2, 4) $$\{(1,1,1),(1,3,1),(1,3,5),(3,1,1),(3,1,5),(3,11,1),(11,3,1)\}$$
(1, 1, 5, 5) $$\{(1,3,1),(3,1,1)\}$$
(1, 2, 3, 6) $$\{(1,1,1),(5,1,1)\}$$

### Proof

Since $$P<2$$, we cannot directly use the results given in Theorem 2.1. But, since $$\beta =-1, \alpha =2$$ and $$\sqrt{D}=3$$, we may follow the steps of the proof of Theorem 2.1 with the use of the inequalities given in (3.2). Hence, we obtain that

\begin{aligned} B_0=\min _{I\in {\mathbb {Z}}}\left| 2^I-\frac{d}{3c}\right| \end{aligned}

and

\begin{aligned} \left| 2^{k-i-j}-\frac{d}{3c}\right| \le \left( \frac{9(a+b)}{2c}+\frac{d}{c}+1\right) 2^{-i}. \end{aligned}
(3.4)

In fact, in some cases we obtain that $$B_0=0$$.

The case $$(a,b,c,d)=(1,1,1,1)$$. Here, we obtain that $$B_0\approx 0.0833333$$ and the bound for i is 7. Applying the argument given at (I) it turns out that all values can be eliminated except $$i=3$$. If $$i=3$$, then we compute the possible values of $$k-j$$ from inequality (3.4). We have that $$k-j\in \{0,1,2,3\}$$. If $$k-j\in \{1,2\}$$, then applying (II) with $$p=3$$ works and in case of $$k-j=3$$ we use $$p=11$$ to show that there is no solution. The remaining case is related to $$k-j=0$$. We obtain the equation

\begin{aligned} 3^2+J_j^2+J_j^2=3J_jJ_j. \end{aligned}

It follows that $$J_j=J_k=3$$, so the solution is given by $$(J_i,J_j,J_k)=(3,3,3).$$

The case $$(a,b,c,d)=(1,1,1,3)$$. In this case in (3.4) we have $$|2^{k-i-j}-1|$$ and this expression is 0 if $$k-i-j=0$$. Therefore, we need to study the equation

\begin{aligned}&(2^i-(-1)^i)^2+(2^j-(-1)^j)^2+(2^{i+j}-(-1)^{i+j})^2\\&\quad =(2^i-(-1)^i)\cdot (2^j-(-1)^j)\cdot (2^{i+j}-(-1)^{i+j}). \end{aligned}

By symmetry we may assume that $$i\le j$$. The small solutions with $$0\le i\le j\le 2$$ can be enumerated easily. Since we consider solutions with $$i,j>0$$, we omit $$(i,j)=(0,0)$$. The other solution is given by $$(i,j)=(1,1)$$. Hence, we get that $$(J_i,J_j,J_k)=(1,1,1)$$. If $$i=2$$, then it follows that with modulo 7 there is no solution. If $$i>2$$, then we work modulo 8 to show that no solution exists. If $$k-i-j\ne 0$$, then we obtain that $$B_0=1$$. As a consequence we have that $$i\in \{1,2\}$$. We may exclude the cases $$i=1,2$$ and $$k-j=2$$ modulo 5. In a similar way, working modulo 7 we eliminate the cases $$i=1,k-j=3$$ and $$i=2,k-j=3,4$$. The remaining cases are given by $$i\in \{1,2\},k-j\in \{0,1\}.$$ If $$i=1,2, k-j=0$$, then it easily follows that (1, 1, 1) is the only solution. If $$i=1,2,k-j=1$$, then the equation is

\begin{aligned} 1+J_j^2+J_{j+1}^2=3J_jJ_{j+1}. \end{aligned}

Since $$J_{j+1}=2J_j+(-1)^j$$, the above equation can be written as

\begin{aligned} J_j^2-(-1)^jJ_j-2=0. \end{aligned}

Thus, the only possibilities are given by $$J_j\in \{\pm 1,\pm 2\}$$. Again, the only solution we get is (1, 1, 1).

The case $$(a,b,c,d)=(1,1,2,2)$$. Here, we compute the bounds for i in the cases $$(a,b,c,d)=(1,1,2,2),(1,2,1,2),(2,1,1,2)$$. Simply argument (I) is enough to show that there exists no solution.

The case $$(a,b,c,d)=(1,1,2,4)$$. The bound for i is 4 and by (I) we can eliminate the case $$i=4$$ when the order of the coefficients is (1, 1, 2, 4) . Congruence arguments (modulo 3 or 7) work if $$(i,k-j)\in \{(1,2),(1,3),(2,2),(2,3)\}$$. The remaining cases are

\begin{aligned} (i,k-j)\in \{(1,0),(1,1),(2,0),(2,1),(3,0),(3,1),(3,2),(3,3)\}. \end{aligned}

From $$(i,k-j)=(1,0),(2,0),(3,0)$$ we obtain the solutions (by solving quadratic equations) (1, 1, 1) and (3, 1, 1) . If $$(i,k-j)=(1,1),(2,1)$$, then we get $$J_j^2+4(-1)^jJ_j+3=0$$. Hence, $$J_j=1$$ or 3. So we obtain the solutions (1, 1, 1), (1, 3, 1), (1, 3, 5). In case of $$(i,k-j)=(3,1)$$ we obtain $$15J_j^2+4(-1)^jJ_j-11=0$$. Thus, we have the solution (3, 1, 1) . By applying the rule $$J_{n+1}=2J_{n}+(-1)^n$$ two or three times we can reduce the problems $$(i,k-j)=(3,2),(3,3)$$ to quadratic equations. The formulas are getting more involved, for example if $$(i,k-j)=(3,2)$$ we have

\begin{aligned} 9+J_j^2+2(4J_j+2(-1)^j+(-1)^{j+1})^2=12J_j(4J_j+2(-1)^j+(-1)^{j+1}). \end{aligned}

In this case we get that $$J_j=1$$. In a very similar way, we handle the cases with the tuples (1, 2, 1, 4) and (2, 1, 1, 4).

The case $$(a,b,c,d)=(1,1,5,5).$$ Here, we need to deal with the tuples $$(1,1,5,5),(1,5,1,5)$$ and (5, 1, 1, 5) . The bounds for i are given by 3, 6 and 6, respectively. Since the steps are similar as we have applied in the previous cases, we omit the details.

The case $$(a,b,c,d)=(1,2,3,6).$$ We only provide some data related to the computation. Let us start with the bounds:

Tuple Bound for i Special case
(1, 2, 3, 6) 4
(1, 3, 2, 6) 2 $$k-i-j=0$$
(2, 1, 3, 6) 4 -
(2, 3, 1, 6) 2 $$k-i-j=1$$
(3, 1, 2, 6) 2 $$k-i-j=0$$
(3, 2, 1, 6) 2 $$k-i-j=1$$

As before we apply the arguments given by (I) and (II) and the identity $$J_{n+1}=2J_n+(-1)^n$$ to resolve all the possible cases. The only new case that has not appeared yet is $$k-i-j=1$$. If we take the tuple (2, 3, 1, 6), then we obtain

\begin{aligned} 2J_i^2+3J_j^2+J_{i+j+1}^2-6J_iJ_jJ_{i+j+1}=0, \end{aligned}
(3.5)

or

\begin{aligned}&2(2^i-(-1)^i)^2+3(2^j-(-1)^j)^2+(2^{i+j+1}-(-1)^{i+j+1})^2\nonumber \\&\quad =2(2^i-(-1)^i)\cdot (2^j-(-1)^j)\cdot (2^{i+j+1}-(-1)^{i+j+1}). \end{aligned}
(3.6)

With respect to the values of i and j we consider the following cases (assuming that $$1 \le i \le j \le k$$):

• If i and j are both even, i.e. $$i=2t$$ and $$j=2r$$ for all positive integers $$t, r \ge 1$$, then equation (3.6) becomes

\begin{aligned} E_1=2(4^t-1)^2+3(4^r-1)^2+(2\cdot 4^{t+r}+1)^2-2(4^t-1)\cdot (4^r-1)\cdot (2\cdot 4^{t+r}+1)=0. \end{aligned}

But $$E_1 \equiv 4 \pmod {8}$$ for all $$t, r \ge 1$$, which leads to a contradiction. Moreover, since i and j are both even with $$i \ge 2$$ and $$j \ge 2$$, then all the even values of i and j are excluded.

• If i and j are both odd, i.e. $$i=2t+1$$ and $$j=2r+1$$ for all positive integers $$t, r \ge 1$$, then equation (3.6) implies that

\begin{aligned} E_2= & {} 2(2\cdot 4^t+1)^2+3(2\cdot 4^r+1)^2+(2\cdot 4^{t+r+1}+1)^2\\&-2(2\cdot 4^t+1) \cdot (2\cdot 4^r+1)\cdot (2\cdot 4^{t+r+1}+1)=0. \end{aligned}

Similarly, $$E_2\equiv 4 \pmod {8}$$ for all $$t, r \ge 1$$, and again we get a contradiction. Indeed, all the odd values of $$i \ge 3$$ and $$j \ge 3$$ are excluded, and it remains only to check whether equation (3.5) has solutions or not at the following cases: $$i=1$$, $$j=1$$; $$i=1$$, $$j\ge 3$$; $$j=1$$, $$i\ge 3$$. In fact, since we assumed that $$1 \le i \le j \le k$$, then the latter case can be covered by checking the solvability of equation (3.5) at $$i=j=1.$$

• If i is even and j is odd, i.e. $$i=2t$$ and $$j=2r+1$$ for all positive integers $$t, r \ge 1$$, then equation (3.6) leads to

\begin{aligned} E_3= & {} 2(4^t-1)^2+3(2\cdot 4^r+1)^2+(4^{t+r+1}-1)^2\\&- 2(4^t-1)\cdot (2\cdot 4^r+1)\cdot (4^{t+r+1}-1)=0. \end{aligned}

Again, we get a contradiction since $$E_3 \equiv 4 \pmod {8}$$ for all $$t, r \ge 1$$. Here, we excluded all the even values of $$i \ge 2$$ and odd values of $$j \ge 3$$, and it remains to check whether equation (3.5) has solutions or not only at $$j=1, i\ge 2$$. Similarly, this can be covered by studying the solutions of equation (3.5) only at $$i=j=1$$.

• Finally, if i is odd and j is even, i.e. $$i=2t+1$$ and $$j=2r$$ for all positive integers $$t, r \ge 1$$, then similarly we have

\begin{aligned} E_4= & {} 2(2\cdot 4^t+1)^2+3(4^r-1)^2+(4^{t+r+1}-1)^2\\&- 2(2\cdot 4^t+1)\cdot (4^r-1)\cdot (4^{t+r+1}-1)=0, \end{aligned}

and $$E_4 \equiv 4 \pmod {8}$$ for all $$t, r \ge 1$$, which gives a contradiction. It is clear that all the odd values of $$i \ge 3$$ and even values of $$j \ge 2$$ are excluded, and we need to check whether equation (3.5) has solutions or not only at $$i=1, j\ge 2$$.

From these cases we conclude that it only remains to study the solutions of equation (3.5) at $$i=1$$ and all the integers of j with $$j\ge 1$$. This can be done by direct substitution and using argument (III) as follows. It is clear that we have $$k=i+j+1=j+2$$ and

\begin{aligned} 2+3J_j^2+J_{j+2}^2-6J_jJ_{j+2}=0 \quad \text{ for } \quad j \ge 1. \end{aligned}
(3.7)
• If $$j=1$$, then we have that $$-4=2+3J_1^2+J_{3}^2-6J_1J_{3}=0$$, which is impossible.

• If $$j=2$$, then we get the solution $$(i,j,k)=(1,2,4)$$. Hence, equation (3.5) has the solution $$(J_i, J_j, J_{i+j+1})=(J_i, J_j, J_{k})=(J_1, J_2, J_4)=(1,1,5).$$

• If $$j \ge 3$$, we can show that equation (3.5) has no more solutions by showing that

\begin{aligned} 2+3J_j^2+J_{j+2}^2-6J_jJ_{j+2}<0 \quad \text{ for } \quad j \ge 3. \end{aligned}

Indeed, after substituting the Jacobsthal numbers formula $$J_j=J_{j-1}+2J_{j-2}$$ in the left hand side of equation (3.7) a few times we get that

\begin{aligned} 2+3J_j^2+J_{j+2}^2-6J_jJ_{j+2}=2-2J_{j-1}^2-24J_{j-1}J_{j-2}-24J_{j-2}^2 <0, \end{aligned}

for $$j \ge 3$$, and this contradicts equation (3.7).

Therefore, by permuting the components of the solution (1, 1, 5) to be a solution of equation (3.3) at the tuple (1, 2, 3, 6) we get the solution (5, 1, 1). $$\square$$

## References

1. A. Altassan, F. Luca, Markov type equations with solutions in Lucas sequences. submitted

2. A. Behera, G.K. Panda, On the square roots of triangular numbers. Fibonacci Q. 37(2), 98–105 (1999)

3. W. Bosma, J. Cannon, C. Playoust, The Magma algebra system. I. The user language. J. Symbolic Comput. 24(3–4), 235–265 (1997). (Computational algebra and number theory (London, 1993))

4. R. Finkelstein, The house problem. Am. Math. Mon. 72, 1082–1088 (1965)

5. B. Kafle, A. Srinivasan, A. Togbé, Markoff equation with Pell component. Fibonacci Q. 58(3), 226–230 (2020)

6. F. Luca, A. Srinivasan, Markov equation with Fibonacci components. Fibonacci Q. 56(2), 126–129 (2018)

7. A. Markoff, Sur les formes quadratiques binaires indéfinies. Math. Ann. 17(3), 379–399 (1880)

8. G. Rosenberger, Über die diophantische Gleichung $$ax^{2}+by^{2}+cz^{2}=dxyz$$. J. Reine Angew. Math. 305, 122–125 (1979)

9. Sz. Tengely, Markoff-Rosenberger triples with Fibonacci components. Glas. Mat. Ser. III 55(75)(1), 29–36 (2020)

10. N. Tzanakis, Solving elliptic Diophantine equations by estimating linear forms in elliptic logarithms. The case of quartic equations. Acta Arith. 75(2), 165–190 (1996)

## Acknowledgements

The authors would like to express their sincere gratitude to the referee for the careful reading of the manuscript and many useful comments which improve the quality of the paper. For Sz. T. the research was supported in part by grants ANN130909, K115479 and K128088 of the Hungarian National Foundation for Scientific Research. For L. Szalay the research and this work was supported by Hungarian National Foundation for Scientific Research Grant No. 128088, and No. 130909, furthermore by National Research, Development and Innovation Office Grant 2019-2.1.11- TÉT-2020-00165, and by the Slovak Scientific Grant Agency VEGA 1/0776/21. The work of H. R. Hashim was supported by the Stipendium Hungaricum Scholarship

## Funding

Open access funding provided by University of Debrecen.

## Author information

Authors

### Corresponding author

Correspondence to Hayder R. Hashim.

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Hashim, H.R., Szalay, L. & Tengely, S. Markoff–Rosenberger triples and generalized Lucas sequences. Period Math Hung (2021). https://doi.org/10.1007/s10998-021-00430-w

• Accepted:

• Published:

• DOI: https://doi.org/10.1007/s10998-021-00430-w

### Keywords

• Markoff equation
• Lucas sequences
• Balancing numbers
• Jacobsthal numbers

### Mathematics Subject Classification

• Primary 11D45
• Secondary 11B39