1 Introduction

Let \(f\in \mathbb {C}[x]\). A \(\lambda \in \mathbb {C}\) is called an extremum of f if \(f(x)-\lambda \) has a multiple root in \(\mathbb {C}\). Extrema of polynomials are of wide interest. It is (at least partly) due to the fact that several Diophantine problems can be reduced to the investigation and description of them. Classical results of Siegel [42] and Faltings [16] show that irreducibility of curves is strongly related to the number of integral and rational points on them. Of particular interest are curves defined by a separable polynomial equations of the form \(F(x)=G(y)\); see e.g. results of Davenport et al. [14], Bilu [8], Avanzi and Zannier [3, 4] and An and Diep [1] and the references there. In particular, Bilu and Tichy [9] gave a complete description of equations of the form \(F(x)=G(y)\) allowing infinitely many solutions \(x,y\in \mathbb {Z}\). In these results the extrema of polynomials played an important role. Further, we can mention papers of Beukers et al. [7], Bilu et al. [10], Rakaczki [33], Kulkarni and Sury [23], Bilu et al. [11], Stoll and Tichy [45], Hajdu et al. [21], or Bazsó et al. [5] (and in fact many more), see also the survey paper of Győry et al. [20] and the references there, where certain special types of separable polynomial equations were considered involving some important families of combinatorial polynomials. Also in them, the extrema of the occurring polynomials were of particular importance.

In many cases, the main problem is to find or characterize those extrema \(\lambda \) of a given polynomial \(f\in \mathbb {C}[x]\), where the shifted polynomial \(f(x)-\lambda \) has ’many’ multiple roots. In case of superelliptic equations (i.e. equations of the type \(F(x)=y^k\) with say \(F\in \mathbb {Q}[x]\) and fixed \(k\ge 2\), in integer unknowns xy) it is because of results of LeVeque [25] and Brindza [12], guaranteeing that the equation has only finitely many integral solutions, unless the root structure of F(x) is ’degenerate’ in some sense. Indeed, for example in the papers Pintér and Rakaczki [32] and Rakaczki [34, 35] the main emphasize is on guaranteeing that only a ’few’ shifts of the actual (Bernoulli, Euler, Hermite) polynomials being investigated are ’degenerate’ (i.e. have ’many’ multiple roots), and then the finiteness of the solutions of the underlying Diophantine equations follow in an effective form. On the other hand, also in the general case \(F(x)=G(y)\), extrema yielding ’many’ multiple roots are of great importance as well; see e.g. Sect. 5 of Bilu and Tichy [9].

In this paper we completely characterize the polynomials \(f\in \mathbb {Q}[x]\) which for any fixed t have precisely t shifts \(f(x)-\lambda _i\)\((\lambda _i\in \mathbb {C},i=1,\ldots ,t)\) of the form \(u(g(x))^q(h(x))^k\) with \(u\in \mathbb {C}\), \(g,h\in \mathbb {C}[x]\) and either \(\deg (g)=2\), k is even, \(q=k/2\) or \(\deg (g)\le 1\), \(k\ge 2\), \(q\ge 1\). By the above mentioned results of LeVeque [25] and Brindza [12] this is the decisive condition for many applications, e.g. concerning superelliptic equations. In this characterization the main novelty is the description of the case \(t=2\), the other cases are well-known and/or simple. Our main tool will be a deep result of Avanzi and Zannier [3] concerning a certain Pell-type equation for polynomials.

We apply our results to several Diophantine problems, which are interesting in themselves and are widely studied. First, we give a precise statement concerning the infinitude of shifted power values (in S-integers of an algebraic number field) of a polynomial \(f\in \mathbb {Q}[x]\). Our result provides a complete solution to the problem and also an effective bound for the heights of the solutions when there are finitely many of them. This theorem can be considered to be an effective algebraic version of the main result of Bilu and Tichy [9] concerning equations of the form \(f(x)=g(y)\), when g(y) is of the shape \(g(y)=\beta y^k+\alpha \). In fact, in our result \(k\ge 2\) is also a variable for which we derive an upper bound, too. So our theorem concerns a family of polynomials \(g_k(y)\) (of the given shape) rather than only an arbitrary, but fixed one.

At this point we also mention that superelliptic equations, that is equations of the form

$$\begin{aligned} f(x)=\beta y^k \end{aligned}$$
(1)

where \(k\ge 2\) and say \(f\in \mathbb {K}[x]\), \(\beta \in \mathbb {K}\) in unknown \(x,y\in O_\mathbb {K}\) are of wide interest, with an extremely rich literature. (Here \(\mathbb {K}\) is a number field with ring of integers \(O_\mathbb {K}\).) The same is true for the even more general situation, when in (1) the exponent k is also a variable. The interested reader may check for example Chaps. 6 and 8 of [41] and [6], and the references there. We shall explicitly give some related results later (see Lemmas 4.1 from Shorey and Tijdeman [41] and 4.2 from Brindza [12]), which give explicit conditions under which (1) has only finitely many solutions in xy and xyk, respectively (bounded in terms of the parameters involved). Our Theorem 3.2 can be considered as an extension of these results, too, to the case where on the right hand side of (1), instead of (almost) powers \(\beta y^k\) we have shifted powers \(\beta y^k+\alpha \). Theorem 3.2 gives a characterization when this more general equation has infinitely many solutions, and provides effective bounds for the solutions xyk when there are finitely many of them. (In fact, we shall work in a slightly more general framework, with S-integers.)

We also give a description of composite polynomials assuming infinitely many S-integral power values. In the case where there are only finitely many solutions, the result is effective (i.e., the height of the solutions can be effectively bounded). After that, we give an effective result for polynomial values in the solutions of Pell equations. Finally, we effectively bound the values of polynomials in non-degenerate binary recurrence sequences. The latter problem attracted a lot of attention already, and our Theorem 3.5 generalizes and/or extends several results from the literature, e.g. those of Pethő [31] and Shorey and Stewart [39] about perfect powers in non-degenerate binary recurrence sequences, Nemes and Pethő [29] concerning values of general polynomials in certain binary recurrence sequences and of Kovács [24] on values of certain combinatorial polynomials in concrete, important binary recurrence sequences. We give more details before the formulation of Theorem 3.5.

The structure of the paper is the following. In the next section we introduce some objects needed later, and give some of their most important properties. In Sect. 3 we formulate our results. Their proofs (together with some lemmas) are given in the last section.

2 Preliminaries

In this section we introduce the objects we need later and collect some important facts about them.

2.1 Extrema of polynomials

In this subsection we partly follow the treatment and notation of Section 2.3 of [9]. All polynomials are assumed to be of degree at least one, unless stated otherwise. The root type of a polynomial \(f(x)\in \mathbb {C}[x]\) having r distinct roots is the unordered list \([\mu _1,\ldots ,\mu _r]\) of the multiplicities of its roots. Clearly, \(\mu _1+\cdots +\mu _r=\deg (f)\). The f-type of a complex number \(\lambda \) is the root type of the polynomial \(f(x)-\lambda \). If \(f(x)-\lambda \) has at least one multiple root (i.e. the f-type of \(\lambda \) is not \([1,\ldots ,1]\)), then \(\lambda \) is called an extremum of f(x). For \(\lambda \) of f-type \([\mu _1,\ldots ,\mu _r]\), write

$$\begin{aligned} \delta _f(\lambda )=(\mu _1-1)+\cdots +(\mu _r-1)=\deg (f)-r. \end{aligned}$$
(2)

Observe that \(\delta _f(\lambda )>0\) if and only if \(\lambda \) is an extremum of f(x). We have

$$\begin{aligned} \sum \limits _{\lambda \in \mathbb {C}} \delta _f(\lambda )=\deg (f)-1. \end{aligned}$$
(3)

This follows from the fact that \(\delta _f(\lambda )=\deg (\gcd (f(x)-\lambda ,f'(x)))\), so the sum in (3) equals to \(\deg (f')=\deg (f)-1\).

Let \(\lambda \in \mathbb {C}\) with f-type \([\mu _1,\ldots ,\mu _r]\). We shall say that \(\lambda \) is special with respect to f, if there exists a \(k\ge 2\) such that the tuple

$$\begin{aligned} \left[ \frac{k}{\gcd (k,\mu _1)},\ldots ,\frac{k}{\gcd (k,\mu _r)}\right] \end{aligned}$$
(4)

is one of

$$\begin{aligned}{}[2,2,1,\ldots ,1], \quad [q,1,\ldots ,1]\quad (q\ge 1). \end{aligned}$$

If the choice of f is obvious, we simply say that \(\lambda \) is special. Note that as we shall see later, this condition is very important (in fact, decisive) concerning the infinitude of the solutions of superelliptic equations of the form \(f(x)-\lambda =\beta y^k\).

Remark 1

Observe that if \(\deg (f)\ge 3\) and \(\lambda \) is special with respect to f then \(\lambda \) is also an extremum of f. We shall use this fact throughout the paper without any further mentioning.

Here we point out that special shifts of polynomials (i.e. shifts with special extrema) are of special form.

Lemma 2.1

Let \(f(x)\in \mathbb {Q}[x]\) and \(\lambda \in \mathbb {C}\). Then \(f(x)-\lambda \) is of the form

$$\begin{aligned} f(x)-\lambda =u(g(x))^q(h(x))^k \end{aligned}$$
(5)

with \(u\in \mathbb {C}\), \(g,h\in \mathbb {C}[x]\) and either \(\deg (g)=2\), k is even, \(q=k/2\) or \(\deg (g)\le 1\), \(k\ge 2\), \(q\ge 1\), if and only if \(\lambda \) is special with respect to f.

Proof

Assume first that \(\lambda \) is special with respect to f. If with some k, the tuple (4) is \([2,2,1,\ldots ,1]\) then k is necessarily even and we have

$$\begin{aligned} f(x)-\lambda =u(g(x))^{k/2}(h(x))^k \end{aligned}$$

with \(u\in \mathbb {C}\), \(g,h\in \mathbb {C}[x]\) and \(\deg (g)=2\). On the other hand, if the tuple (4) is \([q,1,\ldots ,1]\) with some \(q\ge 1\), then

$$\begin{aligned} f(x)-\lambda =u(g(x))^q(h(x))^k \end{aligned}$$

holds with \(u\in \mathbb {C}\), \(g,h\in \mathbb {C}[x]\) and \(\deg (g)\le 1\).

Suppose now that \(f(x)-\lambda \) is of the form (5). Then one can readily check that \(\lambda \) is special with respect to f. \(\square \)

2.2 Algebraic numbers and S-integers

Let \(f\in \mathbb {Z}[x]\). Then by the (naive) height of f we mean the maximum of the absolute values of its coefficients. If \(\beta \) is an algebraic number, then \(H(\beta )\) denotes its height, which is the height of the (primitive) defining polynomial \(f_\beta \in \mathbb {Z}[x]\) of \(\beta \).

Let \(\mathbb {K}\) be an algebraic number field, and let S be a finite set of prime ideals in \(\mathbb {K}\). We say that \(\beta \in \mathbb {K}\) is an S-integer, if writing the principal (fractional) ideal \((\beta )\) as \((\beta )=A/B\) with some coprime ideals in \(\mathbb {K}\), the ideal B has no prime ideal divisor outside S. The ring of S-integers will be denoted by \(O_{S,\mathbb {K}}\). Note that if \(\beta \) is an algebraic integer of \(\mathbb {K}\), then we clearly have \(\beta \in O_{S,\mathbb {K}}\).

2.3 Some families of special polynomials

In this subsection we introduce some families of polynomials which will appear in our statements. In fact, they will yield the exceptional cases.

The first family we need is formed by shifts of ’almost power’ rational polynomials:

$$\begin{aligned} \mathcal {P}_1:= & {} \{u(g(x))^q(h(x))^k+v:u,v\in \mathbb {Q},\ u\ne 0,\ g,h\in \mathbb {Q}[x],\; \text {and}\nonumber \\&\text {either}\; \deg (g)=2,\; k\; \text {is even},\ q=k/2\; \text {or}\; \deg (g)\le 1,\ k\ge 2,\ q\ge 1\}. \end{aligned}$$

The second family is related to Dickson polynomials. Let a be a nonzero rational number and d a positive integer. Denote by \(D_d(x,a)\) the dth Dickson polynomial with parameter a, given by

$$\begin{aligned} D_d(x,a) = \sum _{i=0}^{\left\lfloor d / 2 \right\rfloor } \frac{d}{d-i}\left( {\begin{array}{c}d-i\\ i\end{array}}\right) (-a)^i x^{d-2i}. \end{aligned}$$

Dickson polynomials can be characterized by having exactly two extrema. More precisely, we have the following assertion, which is a simple consequence of Proposition 5.1 and Theorem 5.2 of Bilu and Tichy [9].

Lemma 2.2

If \(d\ge 3\) then \(D_d(x,a)\) has exactly two extrema. If d is odd then both are of type \([1,2,\ldots ,2]\). If d is even, then one of them is of type \([2,\ldots ,2]\) and the other is of the type \([1,1,2,\ldots ,2]\).

On the other hand, let \(f(x)\in \mathbb {Q}[x]\) be a polynomial of degree d having exactly two extrema in \(\mathbb {C}\). Moreover, let all its extrema be of one of the following types:

$$\begin{aligned}{}[2,\ldots ,2],\quad [1,2,\ldots ,2],\quad [1,1,2,\ldots ,2]. \end{aligned}$$

Then \(f(x)=uD_d(x+v,a)+w\), where \(a,u,v,w\in \mathbb {Q}\) with \(au\ne 0\).

We need some further objects. Let G(x) be a square-free monic polynomial with rational coefficients, of degree four, and consider the equation

$$\begin{aligned} F(x)^2-G(x)H(x)^2=\gamma \end{aligned}$$
(6)

in polynomials \(F,H\in \mathbb {Q}[x]\) and \(\gamma \in \mathbb {Q}\setminus \{0\}\). By the degree of a solution triple \((F(x),H(x),\gamma )\) of Eq. (6) we mean \(\deg (F(x))\).

We shall need the description of the solutions of (6) which has been completely given by Avanzi and Zannier [3]. For this description, consider the elliptic curve

$$\begin{aligned} {{\mathcal {C}}}: \quad y^2=G(x) \end{aligned}$$

over \(\mathbb {Q}\), by choosing one of the two points at infinity (which are rational as G is monic), as the identity element. Denote by \(\pi \) the other point at infinity.

The following deep result of Avanzi and Zannier [3] gives a precise description of the solutions of (6).

Theorem A

Equation (6) is solvable in \(F,H\in \mathbb {Q}[x]\) and \(\gamma \in \mathbb {Q}\setminus \{0\}\) if and only if \(\pi \) is a torsion point of \({{\mathcal {C}}}\).

Further, if \(\pi \) is a torsion point of order exactly N, then there exists a solution of degree dN for any positive integer d, and, for a fixed degree, the solution with F monic is unique (up to the sign of H). Let \((F_1(x),H_1(x),\gamma _1)\) be the solution with \(F_1(x)\) monic of minimal degree N. Then the solution \((F_d(x),H_d(x),\gamma _d)\) with \(F_d(x)\) monic of degree dN is given by

$$\begin{aligned} F_d(x) = D_d(F_1(x),\gamma _1/4), \quad \gamma _d=4^{1-d}\gamma _1^d, \end{aligned}$$

where \(D_d\) is the dth Dickson polynomial.

Remark 2

Here we mention two points.

  1. 1.

    Importantly, based upon the method of their proof, Avanzi and Zannier could parametrize and give all solutions of (6), see Sect. 5 of [3]. The parametrized solutions are explicitly listed in the PhD thesis of Avanzi [2].

  2. 2.

    Using the well-known connection between Dickson- and Chebyshev polynomials, the above statement could be formulated by the help of (normalized) Chebyshev polynomials. In fact, this is what is done in [2] (see Theorem 2 there). However, as [3] is easier to access, we follow the formulation there (with Dickson polynomials).

Now we can introduce the second family of polynomials we shall need. First, for given G as above, write \(\mathcal {F}_{G,n}(x)\) for the unique monic solution F(x) of (6) of degree n (if such solution exists), and let \(\gamma (G,n)\) be the corresponding \(\gamma \)-value in (6). Put

$$\begin{aligned} \mathcal {P}_2:= & {} \{uD_d(x+v,a)+w: d\in \mathbb {N},\ a,u,v,w\in \mathbb {Q},\ au\ne 0\}\; \cup \\&\{u\mathcal {F}_{G,n}(x)+v:G\; \text {is as above},\; n\; \text {is even},\; u,v\in \mathbb {Q},\ u\ne 0,\\&\quad \mathcal {F}_{G,n}(x)\ne \left( \mathcal {F}_{G,n/2}(x)\right) ^2-\gamma (G,n/2)/2\}. \end{aligned}$$

Remark 3

By classical results of Mazur [26, 27] we know that in Theorem A we have \(2\le N\le 12\) and \(N\ne 11\). Thus \(\mathcal {P}_2\) contains only linear transforms of polynomials of the shape \(D_d(F(x),a)\) with \(\deg (F)\le 12\), \(\deg (F)\ne 11\). Observe further that the polynomials \(\mathcal {F}_{G,n}(x)\) excluded from \(\mathcal {P}_2\) are constant multiples of shifts of full squares in \(\mathbb {Q}[x]\).

2.4 Pell equations

Let abc be integers with \(abc\ne 0\). We shall be interested in polynomial values in the solution sets of Pell equations of the shape

$$\begin{aligned} ax^2-by^2=c. \end{aligned}$$
(7)

If \(ab>0\) then (7) is called a Pell equation, and as it is well-known, it can have infinitely many solutions in integers xy. In case of \(ab<0\), Eq. (7) trivially admits only finitely many solutions in integers xy.

2.5 Binary recurrence sequences

A sequence of integers \((U_n)_{n=0}^\infty \) defined by

$$\begin{aligned} U_{n+2}=AU_{n+1}+BU_n\quad (n\ge 0) \end{aligned}$$

with some \(A,B,U_0,U_1\in \mathbb {Z}\) is called a binary recurrence sequence. We shall always assume that \(U_0^2+U_1^2>0\) and that \((U_n)_{n=0}^\infty \) is non-degenerate, that is \(AB\ne 0\) and the ratio of the roots \(\alpha ,\beta \) of the characteristic polynomial \(x^2-Ax-B\) of the sequence is not a root of unity. It is well-known that we have

$$\begin{aligned} U_n=\frac{a\alpha ^n-b\beta ^n}{\alpha -\beta }\quad (n\ge 0), \end{aligned}$$

where \(a=U_0-U_1\beta \), \(b=U_1-U_0\alpha \). Putting \(V_n=a\alpha ^n+b\beta ^n\), one can easily check that \(V_n\in \mathbb {Z}\) and

$$\begin{aligned} V_n^2-(A^2+4B)U_n^2=4(U_1^2-AU_1U_0-BU_0^2)(-B)^n\quad (n\ge 0) \end{aligned}$$
(8)

holds. It is important to note that if \((U_n)_{n=0}^\infty \) is non-degenerate and \(B=\pm 1\), then we have

$$\begin{aligned} A^2+4B\ne 0\; \text {and}\; U_1^2-AU_1U_0-BU_0^2\ne 0 \end{aligned}$$

in (8).

3 New results

Our principal result is the following.

Theorem 3.1

For \(i\ge 1\), write \(\mathcal {S}_i\) for the set of polynomials \(f\in \mathbb {Q}[x]\) with \(\deg (f)>4\) for which precisely i complex numbers are special. Then \(\mathcal {S}_i\) is empty for \(i\ge 3\), while \(\mathcal {S}_2=\mathcal {P}_2\) and \(\mathcal {S}_1=\mathcal {P}_1\setminus \mathcal {P}_2\).

Remark 4

We give several comments on Theorem 3.1.

  1. 1.

    In view of the theorem, for a monic \(f\in \mathbb {Q}[x]\) of degree at least 5 there exists no special \(\lambda \in \mathbb {C}\) if and only if \(f\notin \mathcal {P}_1\cup \mathcal {P}_2\).

  2. 2.

    As we shall see, the fact that \(\mathcal {S}_i\) is empty for \(i\ge 3\) is rather simple. This (under slightly more special assumptions) was essentially proved by Rakaczki, see Lemma 3 in [34].

  3. 3.

    Clearly, the cases \(\deg (f)\le 4\) could be handled without any problem. Naturally, in these cases some special parametric families of polynomials (which could be easily described) arise. To avoid (trivial) technical complications, we do not give the details here.

  4. 4.

    In view of Remark 3, if \(f(x)\in \mathbb {Q}[x]\) is explicitly given, or if f(x) is a member of a parametric family of some special polynomials (e.g. with combinatorial background), then like in case of the applications of the Bilu–Tichy theorem from [9] (see e.g. [5, 10, 21, 23, 33, 45]), in principle one should be able to decide (relatively easily) whether \(f(x)\in \mathcal {P}_2\) or not. (In our case, one may further use the parametrization of \(\mathcal {F}_{G,n}(x)\) given by Avanzi and Zannier [3] and Avanzi [2] if necessary.) This means that Theorem 3.1 and our other theorems are hopefully easily accessible for various applications.

  5. 5.

    The above theorem has an interesting connection to elliptic integrals. Namely, one can show that the polynomials \(f(x)\in \mathcal {P}_2\) can be expressed by the help of so-called pseudo-elliptic integrals. (As a related paper, see e.g. [30].) We suppress the details.

Combining Theorem 3.1 with (generalizations of) classical results of Schinzel and Tijdeman [38] and Brindza [12] we get the following statement, concerning shifted power values of a polynomial.

Theorem 3.2

Let \(f\in \mathbb {Q}[x]\setminus \mathcal {P}_2\) with \(\deg (f)>4\) and \(\mathbb {K}\) be an algebraic number field. Then for any \(\alpha ,\beta \in \mathbb {K}\) with \(\alpha \notin \mathbb {Q}\) and any finite set S of prime ideals of \(\mathbb {K}\), the equation

$$\begin{aligned} f(x)=\beta y^k+\alpha \end{aligned}$$
(9)

has only finitely many solutions in \(x,y\in O_{S,\mathbb {K}}\) and \(k\in \mathbb {Z}\) with \(k\ge 2\), and we have \(\max (H(x),H(y),k)\le C_1\). Here \(C_1=C_1(f,\alpha ,\beta ,S,\mathbb {K})\) is an effectively computable constant depending only on \(f,\alpha ,\beta ,S,\mathbb {K}\), and we apply the convention that \(k\le \mathrm{ord}(y)+1\) if y is a root of unity in \(\mathbb {K}\) and \(k=2\) if \(y=0\).

Further, if \(f\notin \mathcal {P}_1\cup \mathcal {P}_2\) then the same conclusions hold with \(\alpha \in \mathbb {Q}\), as well.

Remark 5

Importantly, in view of Theorem 3.1 and Lemma 4.2 the condition \(f\notin \mathcal {P}_2\) (or \(f\notin \mathcal {P}_1\cup \mathcal {P}_2\) if \(\alpha \) is rational) is necessary. That is, Theorem 3.2 is best possible.

Now we give an application for power values of decomposable polynomials. For this, let \(f(x)\in \mathbb {Q}[x]\), \(\varphi (x)\) a polynomial having algebraic coefficients, \(\mathbb {K}\) an algebraic number field, \(\beta \in \mathbb {K}\) and S a finite set of prime ideals of \(\mathbb {K}\). Consider the equation

$$\begin{aligned} \varphi (f(x))=\beta y^k \end{aligned}$$
(10)

in \(k\in \mathbb {Z}\) with \(k\ge 2\) and \(x,y\in O_{S,\mathbb {K}}\).

Theorem 3.3

Suppose that \(f(x)\in \mathbb {Q}[x]\setminus \mathcal {P}_2\) with \(\deg (f)>4\) and that \(\varphi \) has two non-rational roots of coprime multiplicities. Then Eq. (10) has only finitely many solutions xyk with \(x,y\in O_{S,\mathbb {K}}\) and \(k\in \mathbb {Z}\) with \(k\ge 2\), under the convention \(k\le \mathrm{ord}(y)+1\) if y is a root of unity in \(\mathbb {K}\) and \(k=2\) if \(y=0\). Further, we have \(\max (H(x),H(y),k)\le C_2\), where \(C_2=C_2(\varphi ,f,\beta ,S,\mathbb {K})\) is an effectively computable constant depending only on \(\varphi ,f,\beta ,S,\mathbb {K}\).

Remark 6

At this point we also mention several things.

  1. 1.

    If all the multiplicities of the roots of \(\varphi \) are multiples of some \(k\ge 2\), then certainly, Eq. (10) may have infinitely many solutions, for any f. Hence the condition concerning the multiplicities of the roots of \(\varphi \) cannot be dropped.

  2. 2.

    If there is only one root \(\alpha \) of f with multiplicity coprime to k, and that root is rational, then in case of \(f\in \mathcal {P}_1\) the statement would fail, too. Hence the condition that there are two non-rational roots of coprime multiplicities, is necessary as well.

  3. 3.

    For fixed k, Theorem 3.3 ultimately reduces to the question whether \(\varphi (f(x))-\beta y^k\) has a genus zero factor or not. Hence in this case the statement practically follows from Ritt’s Second Theorem [36]. For details, related results, remarks and explanations see e.g. [17], Sect. 5 of [3, 18, 37, 47]. However, Theorem 3.3 is much more general than that: as k is a variable, the statement concerns an infinite family of curves of the shape \(\varphi (f(x))-\beta y^k\).

Now we give effective bounds for polynomial values in solutions of Pell equations and in binary recurrence sequences.

Theorem 3.4

Let abc be integers with \(abc\ne 0\). Let \(S_X\) and \(S_Y\) be the X and Y coordinates, respectively, of the solutions \((X,Y)\in \mathbb {Z}^2\) of the equation

$$\begin{aligned} aX^2-bY^2=c. \end{aligned}$$

Then for any \(f\in \mathbb {Q}[x]\setminus \mathcal {P}_2\) with \(\deg (f)>4\) there exists only finitely many integers x for which \(f(x)\in S_X\cup S_Y\). Further, there exists an effectively computable constant \(C_3(a,b,c,f)\) depending only on abc and f such that \(|x|<C_3(a,b,c,f)\) for all such x.

As we shall see, the above theorem immediately implies the next statement, concerning polynomial values in certain binary recurrence sequences. As this problem has an extensive literature, first we survey the related results which are most important from our viewpoint. That is, we restrict our attention to binary recurrences: in the general case, it would be an enormous task to survey the related literature. For related works concerning general recurrences we only refer to the papers of Nemes and Pethő [28], Kiss [22], Corvaja and Zannier [13], Fuchs and Tichy [19] and the references there.

Independently, Pethő [31] and Shorey and Stewart [39] provided an effective bound for the perfect powers in non-degenerate binary recurrence sequences. Stewart [44] and Shorey and Stewart [40] gave effective finiteness results for shifted powers (i.e. polynomial values of the form \(x^k+c\)) in certain binary recurrences. Nemes and Pethő [29] gave a necessary condition (involving Chebyshev polynomials) for the shape of polynomials \(f(x)\in \mathbb {Q}[x]\) having infinitely many values in certain non-degenerate binary recurrence sequences. They did not formulate an effective statement, but they described the structure of the solution set in case of infinitely many solutions. Using the special properties of the problem (in fact, assertion (8)), they could reduce the question to the solution of a polynomial Pell-type equation of the form (6)—however, with \(\deg (G(x))=2\). Thus to prove their theorem, they could use the corresponding results of Dorey and Whaples [15]. Finally, we mention that there are many results in the literature where values of special polynomials in specific binary recurrence sequences are studied (see e.g. the paper Kovács [24] and the references given there).

Now we formulate our result concerning polynomial values in binary recurrence sequences.

Theorem 3.5

Let \((U_n)_{n=0}^\infty \) be a non-degenerate binary recurrence sequence with \(B=\pm 1\) and \(f\in \mathbb {Q}[x]\setminus \mathcal {P}_2\) with \(\deg (f)>4\). Then there exists an effectively computable constant \(C_4(A,U_0,U_1, f)\) depending only on \(A,U_0,U_1\) and f such that \(\max (n,|x|)<C_4(A,U_0,U_1,f)\) for all solutions \(n\ge 0\) and \(x\in \mathbb {Z}\) of the equation

$$\begin{aligned} U_n=f(x). \end{aligned}$$

Remark 7

As we see, Theorem 3.5 can be considered to be a generalization of the above mentioned results from [24, 31, 39, 40, 44]. Further, it provides an effective version of the main result from [29].

4 Proofs

Proof of Theorem 3.1

As we already mentioned, it is easy to see that \(\mathcal {S}_i\) is empty for \(i\ge 3\). (See e.g. Lemma 3 of [34] where the problem is considered in a slightly less general situation.) However, for the sake of completeness, and also because we shall need some information for the case \(i=2\) obtained on our way, we give a complete argument covering the case \(i\ge 3\), as well.

We start with investigating the values \(\delta _f(\lambda )\) of special extrema of a polynomial \(f(x)\in \mathbb {Q}[x]\) of degree \(n>4\). We show that up to rather restricted cases, we have

$$\begin{aligned} \delta _f(\lambda )\ge \frac{n}{2}. \end{aligned}$$
(11)

Let \([\mu _1,\ldots ,\mu _r]\) be the root type of a special extremum \(\lambda \in \mathbb {C}\) of f. Then with some \(k\ge 2\) the tuple

$$\begin{aligned} \left[ \frac{k}{\gcd (k,\mu _1)},\ldots ,\frac{k}{\gcd (k,\mu _r)}\right] \end{aligned}$$

is one of

$$\begin{aligned} {[2,2,1,\ldots ,1]},\quad [q,1,\ldots ,1]\ (q\ge 1). \end{aligned}$$

Assume first that

$$\begin{aligned} \left[ \frac{k}{\gcd (k,\mu _1)},\ldots ,\frac{k}{\gcd (k,\mu _r)}\right] = [q,1,\ldots ,1]\ (q\ge 1). \end{aligned}$$

Then \(k\mid \mu _i\)\((i=2,\ldots ,r)\). Write \(\mu _i=ku_i\)\((i=2,\ldots ,r)\). Assume that contrary to (11) we have

$$\begin{aligned} \delta _f(\lambda )\le \frac{n-1}{2}. \end{aligned}$$

Then by (2) and

$$\begin{aligned} \mu _1+\mu _2+\cdots +\mu _r=n \end{aligned}$$
(12)

we have

$$\begin{aligned} \mu _1+\cdots +\mu _r\le \frac{\mu _1+\cdots +\mu _r-1}{2}+r \end{aligned}$$
(13)

whence

$$\begin{aligned} \mu _1+k(u_2+\cdots +u_r)\le 2r-1. \end{aligned}$$

This immediately gives \(k=2\) and

$$\begin{aligned} {[}\mu _1,\ldots ,\mu _r]=[1,2,\ldots ,2], \end{aligned}$$

yielding

$$\begin{aligned} \delta _f(\lambda )=\frac{n-1}{2}. \end{aligned}$$

Suppose next that

$$\begin{aligned} \left[ \frac{k}{\gcd (k,\mu _1)},\ldots ,\frac{k}{\gcd (k,\mu _r)}\right] = [2,2,1,\ldots ,1]. \end{aligned}$$

Then k is even, k / 2 divides \(\mu _1,\mu _2\) and \(k\mid \mu _i\)\((i=3,\ldots ,r)\). Write \(\mu _i=(k/2)u_i\) for \(i=1,2\) and \(\mu _i=ku_i\)\((i=3,\ldots ,r)\). Assume that contrary to (11) we have

$$\begin{aligned} \delta _f(\lambda )\le \frac{n-1}{2}. \end{aligned}$$

Then using (2) and (12) again, through (13) we obtain

$$\begin{aligned} k(u_1/2+u_2/2+u_3+\cdots +u_r)\le 2r-1. \end{aligned}$$

After a simple calculation, using that \(n\ge 5\), this yields that \(k=2\) and

$$\begin{aligned} {[}\mu _1,\ldots ,\mu _r{]}=[1,2,\ldots ,2],\ [1,1,2,\ldots ,2], \end{aligned}$$
(14)

with

$$\begin{aligned} \delta _f(\lambda )=\frac{n-1}{2},\; \frac{n-2}{2}, \end{aligned}$$
(15)

respectively.

Altogether, we conclude that for any special extrema of f (11) holds, unless \(k=2\) together with (14) and (15).

Hence using (3) we immediately obtain that for \(f(x)\in \mathbb {Q}[x]\) with \(n=\deg (f)>4\), no three distinct special extrema exist.

Suppose that \(\alpha _1,\alpha _2\) are distinct special extrema of f. Then by (3) again, one of \(\alpha _1\) and \(\alpha _2\) must be of one of the types (14). Suppose that say \(\alpha _1\) is of the type

$$\begin{aligned} {[}\mu _1,\ldots ,\mu _r{]}=[1,2,\ldots ,2]. \end{aligned}$$

Then n is odd, and \(\alpha _2\) must be of the same type. However, then by (3) we see that f has only two extrema, and by Lemma 2.2f is a linear transform of a Dickson polynomial. Hence in this case, our theorem follows. Assume next that say \(\alpha _1\) is of the type

$$\begin{aligned} {[}\mu _1,\ldots ,\mu _r{]}=[1,1,2,\ldots ,2]. \end{aligned}$$
(16)

Now if \(\delta _f(\alpha _2)\ge n/2\) then by (3) we get that f has only two extrema again, and by Lemma 2.2 we are done. So we may suppose that \(\alpha _2\) is also of the type (16).

Thus we can write

$$\begin{aligned} f(x)-\alpha _1=g_1(x)h_1(x)^2,\quad f(x)-\alpha _2=g_2(x)h_2(x)^2 \end{aligned}$$
(17)

with some \(g_1,g_2,h_1,h_2\in \mathbb {C}[x]\), \(\deg (g_1)=\deg (g_2)=2\). Here we need some further investigation. If any of \(\alpha _1,\alpha _2\), say \(\alpha _1\) is transcendental, then as it is well-known, \(\mathbb {Q}(\alpha _1)\) is isomorphic to the field of rational fractions \(\mathbb {Q}(z)\). We may assume that \(g_1,h_1\in \mathbb {Q}(\alpha _1)[x]\) in (17). So replacing \(\alpha _1\) by some transcendental \(\alpha _3\in \mathbb {C}\) different from \(\alpha _1,\alpha _2\), and replacing \(f_1,g_1\) by \(f_3=\sigma (f_1)\) and \(g_3=\sigma (g_1)\) where \(\sigma \) is the natural isomorphism from \(\mathbb {Q}(\alpha _1)[x]\) to \(\mathbb {Q}(\alpha _3)[x]\), we get

$$\begin{aligned} f(x)-\alpha _3=g_3(x)(h_3(x))^2. \end{aligned}$$

This is a contradiction, implying that both \(\alpha _1\) and \(\alpha _2\) are algebraic. A similar argument shows that either \(\alpha _1,\alpha _2\in \mathbb {Q}\), or \(\alpha _1,\alpha _2\) are conjugate quadratic algebraic numbers. In both cases, \(\alpha _1+\alpha _2,\alpha _1\alpha _2\in \mathbb {Q}\), so multiplying the left and right hand sides of the equalities in (17) we get

$$\begin{aligned} (f(x))^2+2uf(x)+v=g(x)(h(x))^2 \end{aligned}$$

with some \(u,v\in \mathbb {Q}\), whence

$$\begin{aligned} \left( f(x)+u\right) ^2-u^2+v=g(x)(h(x))^2. \end{aligned}$$
(18)

A simple consideration shows that here we may assume that the polynomials

$$\begin{aligned} g(x)=g_1(x)g_2(x)\quad \text {and}\quad h(x)=h_1(x)h_2(x) \end{aligned}$$

have rational coefficients. Observe that \(\deg (g)=4\) in (18). As

$$\begin{aligned} \gcd (f(x)-\alpha _1,f(x)-\alpha _2)=1, \end{aligned}$$

by (17) we have that g(x) is square-free. Further, since \(f(x)+u\) has two shifts (with \(\alpha _1-u\) and \(\alpha _2-u\)) of root type (16), by (3) it cannot have a shift yielding a square of a polynomial. Thus the inclusion \(\mathcal {S}_2\subseteq \mathcal {P}_2\) follows from Theorem A.

To prove the ’only if’ part, let \(f(x)\in \mathcal {P}_2\). Clearly, without loss of generality we may assume that f is monic. If f is a shifted Dickson polynomial then by Lemma 2.2 we are immediately done. So let f(x) be a rational shift \(f(x)=F(x)+v\) of a (monic) solution F(x) of Eq. (6), with certain \(G,H\in \mathbb {Q}[x]\) and \(\gamma \in \mathbb {Q}\) with \(\gamma \ne 0\). Reordering (6), after factorization we get

$$\begin{aligned} (F(x)+\sqrt{\gamma })(F(x)-\sqrt{\gamma })=G(x)H(x)^2. \end{aligned}$$

Since

$$\begin{aligned} \deg (F(x)+\sqrt{\gamma })=\deg (F(x)-\sqrt{\gamma }) \end{aligned}$$

and

$$\begin{aligned} \gcd (F(x)+\sqrt{\gamma },F(x)-\sqrt{\gamma })=1 \end{aligned}$$

in \(\mathbb {C}[x]\), we must have either

$$\begin{aligned} F(x)+\sqrt{\gamma }=G_1(x)H_1(x)^2\quad \text {and}\quad F(x)-\sqrt{\gamma }=G_2(x)H_2(x)^2 \end{aligned}$$

with some \(G_1,G_2,H_1,H_2\in \mathbb {K}[x]\) with \(\deg (G_1)=\deg (G_2)=2\), where \(\mathbb {K}=\mathbb {Q}(\sqrt{\gamma })\), or

$$\begin{aligned} F(x)+\sqrt{\gamma }=G_1(x)H_1(x)^2\quad \text {and}\quad F(x)-\sqrt{\gamma }=H_2(x)^2 \end{aligned}$$

(or vice versa) with some \(G_1,H_1,H_2\in \mathbb {K}[x]\) with \(\deg (G_1)=4\). In the first case we are done, so we may assume that the second possibility holds. Then clearly \(\sqrt{\gamma }\in \mathbb {Q}\), and we must have \(G_1(x)=G(x)\). Hence we get

$$\begin{aligned} H_2(x)^2+2\sqrt{\gamma }=G(x)H_1(x)^2. \end{aligned}$$

That is, by Theorem A we obtain that

$$\begin{aligned} H_2(x)=\mathcal {F}_{G,\frac{n}{2}}(x)\quad \text {and}\quad -2\sqrt{\gamma }=\gamma \left( G,\frac{n}{2}\right) . \end{aligned}$$

(Note that n is even in this case.) This shows that this possibility, by our condition

$$\begin{aligned} F(x)=\mathcal {F}_{G,n}(x)\ne (\mathcal {F}_{G,\frac{n}{2}}(x))^2-\frac{\gamma (G,\frac{n}{2})}{2} \end{aligned}$$

is excluded. Hence the statement concerning \(\mathcal {S}_2\) follows.

Finally, assume that f has only one special extremum. Observe that by a similar argument as above, we then get that \(\alpha \in \mathbb {Q}\) must hold. Then the statement (in view of Lemma 2.1 and the definition of \(\mathcal {P}_1\)) becomes obvious. \(\square \)

To prove Theorem 3.2 we need two further lemmas.

Let h(x) be a nonzero polynomial having algebraic coefficients. Moreover, let \({\mathbb L}\) be an algebraic number field, \(\beta \) a nonzero element of \({\mathbb L}\), and T a finite set of prime ideals of \({\mathbb L}\). Consider the Diophantine equation

$$\begin{aligned} h(x)=\beta y^k \end{aligned}$$
(19)

in unknown \(k\in \mathbb {Z}\) with \(k\ge 2\) and \(x,y\in O_{T,{\mathbb L}}\).

The next lemma is a simple consequence of Theorem 10.5 of Shorey and Tijdeman [41]. For the first results of this type, we refer to [38, 46].

Lemma 4.1

If h(x) has at least two distinct roots and y is not zero and is not a root of unity, then in (19) we have \(k<C_2(h,\beta ,T,{\mathbb L})\), where \(C_2(h,\beta ,T,{\mathbb L})\) is an effectively computable constant depending only on h, \(\beta \), T, \({\mathbb L}\).

The following result is a consequence of the main result of Brindza [12]. See also Theorem 8.3 in [41].

Lemma 4.2

Let \(k\ge 2\) also be fixed, and write \([\mu _1,\ldots ,\mu _r]\) for the root type of h(x) in (19). If the tuple

$$\begin{aligned} \left[ \frac{k}{\gcd (k,\mu _1)},\ldots ,\frac{k}{\gcd (k,\mu _r)}\right] \end{aligned}$$

is none of

$$\begin{aligned}{}[2,2,1,\ldots ,1],\quad [q,1,\ldots ,1]\; (q\ge 1), \end{aligned}$$

then we have \(\max (H(x),H(y))<C_3(h,k,\beta ,T,{\mathbb L})\) for each solution \(x,y\in O_{T,{\mathbb L}}\) of Eq. (19), where \(C_3(h,k,\beta ,T,{\mathbb L})\) is an effectively computable constant depending only on h, k, \(\beta \), T, \({\mathbb L}\).

Proof of Theorem 3.2

If \(\alpha \notin \mathbb {Q}\), by our assumptions using Theorem 3.1 we have that \(\alpha \) is not special with respect to f. Indeed, otherwise \({\hat{\alpha }}\) would also be special with respect to f, where \({\hat{\alpha }}\) is any algebraic conjugate of \(\alpha \). Thus Lemmas 4.1 and 4.2 imply the statement in this case.

The statement when \(\alpha \in \mathbb {Q}\) but \(f\notin \mathcal {P}_1\cup \mathcal {P}_2\), immediately follows from Theorem 3.1 and Lemmas 4.1 and 4.2. \(\square \)

Proof of Theorem 3.3

Write

$$\begin{aligned} \varphi (x)=\delta (x-\alpha _1)^{t_1}\ldots (x-\alpha _r)^{t_r} \end{aligned}$$

where \(\delta \) is a non-zero algebraic number and \(\alpha _1,\ldots ,\alpha _r\) are the distinct (complex) roots of \(\varphi \), of multiplicities \(t_1,\ldots ,t_r\), respectively. Note that \(\alpha _1,\ldots ,\alpha _r\) are algebraic numbers. As \(r\ge 2\), by Lemma 4.1 we get that k is bounded in (10).

So we may assume that k is fixed. Clearly, without loss of generality we may assume that \(\delta ,\alpha _1,\ldots ,\alpha _r\) all belong to \(\mathbb {K}\). Indeed, otherwise we can replace \(\mathbb {K}\) by the number field \({\mathbb L}\) obtained by adjoining all these elements to \(\mathbb {K}\), and S by the set T of prime ideals of \({\mathbb L}\) which divide the prime ideals of \(\mathbb {K}\) in S (embedded into \({\mathbb L}\)). Suppose that \(x,y\in O_{S,\mathbb {K}}\) is a solution of (10). Then, as it is well-known (see e.g Lemma 8.1 in [41]), we can find non-zero \(\nu _1,\ldots ,\nu _r,\tau _1,\ldots ,\tau _r\in O_\mathbb {K}\) with heights bounded in terms of \(\varphi ,\beta ,f,\mathbb {K}\) such that

$$\begin{aligned} f(x)-\alpha _i=\frac{\nu _i}{\tau _i} z_i^{\ell _i}\quad (i=1,\ldots ,r), \end{aligned}$$
(20)

with some \(z_i\in O_\mathbb {K}\), where \(\ell _i=k/\gcd (k,t_i)\). Using our assumptions, without loss of generality we may assume that \(\alpha _1\) and \(\alpha _2\) are non-rational and \(\gcd (t_1,t_2)=1\). Then one of \(t_1\) and \(t_2\), say \(t_1\) is not divisible by k. So \(\ell _1\ge 2\), and by Theorem 3.2 the statement immediately follows from (20) with \(i=1\). \(\square \)

Proof of Theorem 3.4

Suppose that \(f(x)\in S_X\), the case \(f(x)\in S_Y\) is similar. Then we can write

$$\begin{aligned} (af(x)+\sqrt{ac})(af(x)-\sqrt{ac})=abY^2. \end{aligned}$$

Similarly as in the proof of Theorem 3.3 from this we get that with some non-zero algebraic integers \(u_1,u_2,v_1,v_2\) from \(\mathbb {K}=\mathbb {Q}(\sqrt{ac})\) with heights bounded in terms of abcf we have

$$\begin{aligned} u_1(af(x)+\sqrt{ac})=v_1Y_1^2,\quad u_2(af(x)-\sqrt{ac})=v_2Y_2^2 \end{aligned}$$

with some algebraic integers \(Y_1,Y_2\) from \(\mathbb {K}\). As \(f(x)\notin \mathcal {P}_2\), one of \(\pm \sqrt{c/a}\) is not special with respect to f. Thus by Lemma 4.2, one of the above equations implies that x is bounded as required, and the statement follows. \(\square \)

Proof of Theorem 3.5

The statement concerning |x| immediately follows from Theorem 3.4 using identity (8). Then using the well-know fact that \(|U_n|\) tends to infinity as n tends to infinity (see e.g. Theorem 3.1 of [41], which is a reformulation of a result of Stewart [43]), the statement concerning n also follows. \(\square \)

Acknowledgements

Open access funding provided by University of Debrecen (DE). The author is grateful to the Referees for their insightful, useful and helpful remarks.