# On the discriminator of Lucas sequences

- 98 Downloads

## Abstract

We consider the family of Lucas sequences uniquely determined by \(U_{n+2}(k)=(4k+2)U_{n+1}(k) -U_n(k),\) with initial values \(U_0(k)=0\) and \(U_1(k)=1\) and \(k\ge 1\) an arbitrary integer. For any integer \(n\ge 1\) the discriminator function \(\mathcal {D}_k(n)\) of \(U_n(k)\) is defined as the smallest integer *m* such that \(U_0(k),U_1(k),\ldots ,U_{n-1}(k)\) are pairwise incongruent modulo *m*. Numerical work of Shallit on \(\mathcal {D}_k(n)\) suggests that it has a relatively simple characterization. In this paper we will prove that this is indeed the case by showing that for every \(k\ge 1\) there is a constant \(n_k\) such that \({\mathcal D}_{k}(n)\) has a simple characterization for every \(n\ge n_k\). The case \(k=1\) turns out to be fundamentally different from the case \(k>1\).

### Keywords

Lucas sequence Index of appearance Discriminator Quadratic number field Congruence## FRENCH ABSTRACT

Pour un entier arbitraire \(k\ge 1\), on considère la famille de suites de Lucas déterminée de manière unique par la relation de récurrence \(U_{n+2}(k)=(4k+2)U_{n+1}(k) -U_n(k),\) et les valeurs initiales \(U_0(k)=0\) et \(U_1(k)=1\). Pour tout entier \(n\ge 1\), la fonction discriminante \(\mathcal {D}_k(n)\) de \(U_n(k)\) est définie comme le plus petit *m* tel que \(U_0(k),U_1(k),\ldots ,U_{n-1}(k)\) soient deux à deux non congruents modulo *m*. Des travaux numériques de Shallit sur \(\mathcal {D}_k(n)\) suggère qu’il en existe une caractérisation relativement simple. Dans cet article, on démontre que c’est en effet le cas en établissant que pour tout \(k\ge 1\), il existe une constante \(n_k\) telle que \({\mathcal D}_{k}(n)\) possède une caractérisation simple pour tout \(n\ge n_k\). Le cas \(k=1\) se révèle être de nature totalement différente du cas \(k>1\).

### Mathematics Subject Classification

11B39 11B50## 1 Introduction

*discriminator*of a sequence \(\mathbf{a}=\{a_n\}_{n\ge 1}\) of distinct integers is the sequence given by

*m*that allows one to discriminate (tell apart) the integers \(a_0,\ldots , a_{n-1}\) on reducing modulo

*m*.

*n*distinct residue classes modulo \({\mathcal D}_\mathbf{a}(n)\) it follows that \({\mathcal D}_\mathbf{a}(n)\ge n\). On the other hand obviously

*f*a polynomial has been well-studied, see, for example, [3, 9, 10, 16]. The most general result in this direction is due to Zieve [16], who improved on an earlier result by Moree [9].

In this paper we study the discriminator problem for Lucas sequences (for a basic account of Lucas sequences see, for example, Ribenboim [13, 2.IV]). Our main results are Theorem 1 (\(k=1\)) and Theorem 3 (\(k>2\)). Taken together with Theorem 2 (\(k=2\)) they evaluate the discriminator \({\mathcal D}_k(n)\) for the infinite family of second-order recurrences (1), with for each *k* at most finitely many *n* that are not covered.

*q*, the smallest positive integer

*m*discriminating \(u_q(1),\ldots ,u_q(n)\) modulo

*m*equals \(\min \{2^e,5^f\},\) where

*e*is the smallest integer such that \(2^e\ge n\) and

*f*is the smallest integer such that \(5^f\ge 5n/4\).

Despite structural similarities between the present paper and [6] (for example the index of appearance *z* in the present paper plays the same role as the period \(\rho \) in [6]), there are also many differences. For example, Ciolan and Moree have to work much harder to exclude small prime numbers as discriminator values. This is related to the sequence of good discriminator candidate values in that case being much sparser, namely being \(O(\log x)\) for the values \(\le x\), versus \(\gg \log ^2 x\). In our case one has to work with elements and ideals in quadratic number fields, whereas in [6] in the proof of the main result the realm of the rationals is never left.

*n*, but that he was reluctant to conjecture such an unpredictable thing. More extensive numerical experiments show that if we compute \({\mathcal D}_1(n)\) for all \(n\le 2^{10}\), then they are powers of 2 except for \(n\in [129,150]\), and other similar instances such as

The fractional part of a real number *x* is denoted by \(\{x\}\) and its floor by \(\lfloor x\rfloor \).

### Theorem 1

### Theorem 2

Let \(e\ge 0\) and \(f\ge 1\) be the smallest integers such that \(2^e\ge n\), respectively \(3\cdot 2^f\ge n\). Then \({\mathcal D}_2(n)=\min \{2^e,3\cdot 2^f\}\).

Our second main result shows that the behavior of the discriminator \({\mathcal D}_k\) with \(k>2\) is very different from that of \({\mathcal D}_1\).

### Theorem 3

*n*, 3

*n*/ 2) contains an integer \(m\in {\mathcal A}_{k}\cup {\mathcal B}_{k}\). There are at most finitely many

*n*for which in (2) strict inequality holds. Furthermore, we have

The condition on the interval [*n*, 3*n* / 2) is sufficient, but not always necessary. The proof also works for \(k=2\) in which case the interval becomes [*n*, 5*n* / 3). However, we prefer to give a short proof from scratch of Theorem 2 (in Sect. 6.1).

Theorems 2 and 3 taken together have the following corollary.

### Corollary 1

Note that \({\mathcal A}_1=\{1\},~ {\mathcal B}_1=\{2^e:e\ge 1\}\) and that by Theorem 1 identity (4) holds true with \({\mathcal F}_1=\{2^a\cdot 5^m: a\ge 1 \text { and } m\in {\mathcal M}\}.\) In particular, \({\mathcal F}_1\) is not finite. In contrast to this, Theorem 2 says that \({\mathcal F}_2\) is empty and Theorem 3 says that \({\mathcal F}_k\) is finite for \(k>1\). In part II [5] the problem of explicitly computing \({\mathcal F}_k\) is considered.

Despite the progress made in this paper, for most second order recurrences (and the Fibonacci numbers belong to this class), the discriminator remains quite mysterious, even conjecturally. Thus in this paper we only reveal the tip of an iceberg.

## 2 Preliminaries

*U*(

*k*) valid for any \(k\ge 1\). The characteristic equation of this recurrence is

First we study the congruence Open image in new window in case *m* is an arbitrary integer. By the Chinese Remainder Theorem, it suffices to study this congruence only in the case where *m* is a prime power. In this section we will only deal with the easiest case where *m* is a power of two.

### Lemma 1

If Open image in new window , then Open image in new window .

### Proof

*a*. Assume that \(a>1\) and that the lemma has been proved for \(a-1\). Let \(i\le j\) be such that Open image in new window . In particular, Open image in new window and so Open image in new window . It is easy to check that putting \(V_n(k)\) for the sequence given by \(V_0(k)=2,~V_1(k)=4k+2\), we have

*n*using the fact that \(2\Vert V_0(k)\) and \(2\Vert V_1(k)\) and the recurrence for

*V*(

*k*), we conclude that if \(2\Vert V_n(k)\) and \(2\Vert V_{n+1}(k)\), thenso \(2\Vert V_{n+2}(k)\). Hence, since \(2^{a}\mid U_i(k)-U_j(k)=U_{(i-j)/2}(k)V_{(i+j)/2}(k)\), and \(2\Vert V_{(i+j)/2}(k)\), we get that \(2^{a-1}\mid U_{(i-j)/2}(k)\). Thus, Open image in new window and by the induction hypothesis we get that Open image in new window . Thus, Open image in new window and the induction is complete. \(\square \)

### Corollary 2

We have \({\mathcal D}_{k}(n)\le \min \{2^e:2^e\ge n\}\).

## 3 Index of appearance

We now need to study the congruence Open image in new window for odd primes *p* and integers \(b\ge 1\). We start with the easy case when \(j=0\). Given *m*, the smallest \(n\ge 1\) such that Open image in new window exists, cf. [2], and is called the *index of appearance of m in U(k)* and is denoted by *z*(*m*). (For notational convenience we suppress the dependence of *z*(*m*) on *k*.) The following result is well-known, cf. Bilu and Hanrot [2]. We write \(\nu _p(m)\) for the exponent of the prime *p* in the factorization of the positive integer *m*. For an odd prime *p* we write \((\frac{\bullet }{p})\) for the Legendre symbol with respect to *p*.

### Lemma 2

*z*of the sequence

*U*(

*k*) has the following properties.

- (i)
If \(p\mid \Delta (k)\), then \(z(p)=p\).

- (ii)
If \(p\not \mid \Delta (k)\), then \(z(p)\mid p-e\), where \(e=(\frac{\Delta (k)}{p})\).

- (iii)
Let \(c=\nu _p(U_{z(p)}(k))\). Then \(z(p^{b})=p^{\max \{b-c,0\}} z(p).\)

- (iv)
If \(p|U_m(k)\), then

*z*(*p*)|*m*. - (v)If \(n=m_1\ldots m_s\) with \(m_1,\ldots ,m_s\) pairwise coprime, then$$\begin{aligned} z(m_1\dots m_s)={\text { lcm}}[z(m_1),\ldots ,z(m_s)]. \end{aligned}$$

Part i says that \(z(p^b)=p^b\) in case \(p\mid \Delta (k)\) and \(b\ge 1\). The next result describes what happens for arbitrary *b* and \(p>2\).

### Lemma 3

*U*(

*k*).

- (i)
If \(p>3\), then \(\nu _p(U_p)=1\). In particular, \(z(p^b)=p^b\) holds for all \(b\ge 1\).

- (ii)If \(p=3\), thenIn particular, \(\nu _3(U_3)=c>1\) exactly when Open image in new window . In these cases, \(z(p^b)=p^{\max \{b-c,0\}}\). Hence, \(z(p^b)\mid p^{b-1}\) for all \(b\ge 2\).$$\begin{aligned} U_3=16k(k+1)+3. \end{aligned}$$

### Proof

### 3.1 Index of appearance in case \(k=1\)

For notational convenience we ignore where appropriate the index \(k=1\) in \(U(k),~\alpha (k),~\beta (k)\) and so we only write \(U,~\alpha ,~\beta \). We have \(\Delta (1)=8\) and the relevant quadratic field is \({\mathbb K}={\mathbb Q}[{\sqrt{2}}]\), which has \({\mathbb Z}[{\sqrt{2}}]\) as its ring of integers. If \(\gamma ,\delta \in \mathbb Z[\sqrt{2}]\), then we write Open image in new window if and only if \((\gamma -\delta )/p\in \mathbb Z[\sqrt{2}]\). If \(\rho =a+b\sqrt{2}\in {\mathbb K}\) with *a* and *b* rational numbers, then the norm \(N_{\mathbb K}(\rho )=\rho \cdot {\overline{\rho }}=a^2-2b^2,\) where \({\overline{\rho }}\) is the conjugate of \(\rho \) obtained by sending \(\sqrt{2}\) to \(-\sqrt{2}\).

For odd *p*, *z*(*p*) is a divisor of either \(p-1\) or \(p+1\) by Lemma 2 ii. The next lemma shows that even more is true. The result is an easy consequence of the fundamental work [4] by Carmichael. For the benefit of the reader we will also give a self-contained proof.

### Lemma 4

*p*be an odd prime. Then

### Proof

### Proof

(More self-contained)

(i) The case \(e=(\frac{2}{p})=1\).

*p*divides the difference \(\alpha ^{(p-1)/2}-\alpha ^{-(p-1)/2}\). On noting that

(ii) The case \(e=(\frac{2}{p})=-1\).

Let us recall the following well-known result.

### Lemma 5

Let *p* be odd such that \(e=(\frac{2}{p})=-1\) and let \(b\ge 1\) be an integer. Then \(z(p^b)\) is the minimal \(m\ge 1\) such that Open image in new window .

### Proof

Assume that \(m\ge 1\) is such that Open image in new window . Then Open image in new window . Subtracting both congruences we get that \(p^b\) divides \(\alpha ^m-\alpha ^{-m}\). Computing norms we see that \(p^{2b}\mid N_{\mathbb K}(\alpha ^m-\alpha ^{-m})\), and so \(p^{2b}\mid 32U_m^2,\) and therefore \(p^b|U_m\), showing that \(z(p^b)|m\). Next assume that \(p^b\mid U_m\) for some \(m\ge 1\). Then Open image in new window , so Open image in new window . Thus, \(p^b\mid (\alpha ^m-1)(\alpha ^m+1)\). The assumption on *e* implies that *p* is inert in \({\mathbb Z}[{\sqrt{2}}]\). Since, moreover, *p* cannot divide both \(\alpha ^m-1\) and \(\alpha ^m+1\), it follows that \(p^b\) must divide either \(\alpha ^m-1\) or \(\alpha ^m+1\). \(\square \)

## 4 Structure of the discriminator \({\mathcal D}_1\)

Now we are ready to restrict the number of values the discriminator can assume.

### Lemma 6

- (i)
*m*has at most one odd prime divisor. - (ii)
If

*m*is divisible by exactly one odd prime*p*, then \(e=(\frac{2}{p})=-1\) and \(z(p)=(p+1)/2\). - (iii)
If

*m*is not a power of 2, then*m*can be written as \(2^ap^{b}\) with \(a,b\ge 1\) and Open image in new window .

### Proof

*z*(

*m*), 2

*z*(

*m*)) contains a power of 2, say \(2^b< 2z(m)<m\). But then since \(2^b\ge z(m)\ge n\), it follows that \(U_0,\ldots ,U_{n-1}\) are already distinct modulo \(2^b\) and \(2^b<m\), which contradicts the definition of the discriminator. Thus, the only possibility is that \(r\in \{0,1\}\). If \(r=1\) and \(e_1=(\frac{2}{p_1})=1\), then

### Lemma 7

If \(n>1\), then \({\mathcal D}_{1}(n)\) is even.

### Proof

*m*/ 2. This gives

*m*by a power of two in the interval [

*m*/ 2,

*m*), and get a contradiction. \(\square \)

### Lemma 8

Assume that \(m=2^ap_1^{b_1}={\mathcal D}_1(n)\) for some \(n\ge 1\) and that \(b_1\ge 1\). If \(b_1>1\), then \(p_1\Vert U_{z(p_1)}\).

### Proof

### Lemma 9

Assume that \(m=2^ap_1^{b_1}\) is such that \(a\ge 1\), Open image in new window and \(z(p_1)=(p_1+1)/2\). Then Open image in new window holds if and only if Open image in new window .

### Proof

(i) \(p_1^{b_1}\mid (\alpha ^i-\alpha ^j)\).

Then Open image in new window . Since *i* and *j* are of the same parity, it follows that Open image in new window . By Lemma 5 we then infer that \(z(p_1^{b_1})|(i-j)/2\). By Lemma 4 we have \(z(p_1^{b_1})|p_1^{b_1-1}(p_1+1)/2\). Since by assumption Open image in new window it follows that \(z(p_1^{b_1})\) is odd and so divides \(i-j\). Since \(i-j\) is also divisible by \(2^a=z(2^a)\), it is divisible by \({\text { lcm}}[z(2^a), z(p_1^{b_1})]=z(m)\).

(ii) \(p_1^{b_1}\) does not divide \(\alpha ^i-\alpha ^j\).

*i*and

*j*are divisible by the odd number \(z(p_1)=(p_1+1)/2\). Also, Open image in new window . Since \(i=z(p_1)i_1\) and \(j=z(p_1)j_1\), where Open image in new window and Open image in new window , it follows that \(\alpha ^i\) and \(\alpha ^j\) are both congruent either to 1 (if \(i_1\) and \(j_1\) are even) or to \(-1\) (if \(i_1\) and \(j_1\) are odd) modulo \(p_1\). Thus, modulo \(p_1\) the expression (9) is in fact congruent to \(\pm 2\) modulo \(p_1\), which is certainly not zero. Thus, \(\lambda \ne 0\). ThenThe prime \(p_1\) is inert so we can conjugate the above relation to getMultiplying the second congruence by \(\alpha ^{i+j}\) and subtracting (11) from (10), we get \(4\). Thus, \(\alpha ^{i+j}\equiv -1\mod p_1\). But the smallest

*k*such that Open image in new window is \(k=z(p_1)=(p_1+1)/2\) which is odd. Hence, \(i+j\) is an odd multiple of \(z(p_1)\), therefore an odd number itself, which is a contradiction since Open image in new window . Thus, this case does not appear. This implies that Open image in new window if \(U_i\equiv U_j\pmod m\).

*a*factors from the

*V*sequence and each of them is a multiple of 2. Hence, \(2^a\mid (U_i-U_j)\). As for the divisibility by \(p_1^{b_1}\), note that since \(z(p_1^{b_1})\mid (i-j)\) and \(i-j\) is even, it follows that

## 5 The end of the proof or why 5 and not 37?

We need a few more results before we are prepared well enough to establish Theorem 1.

### Lemma 10

For \(n\ge 2^{24}\cdot 5^3\) the interval [5*n* / 3, 37*n* / 19) contains a number of the form \(2^a\cdot 5^{b}\) with \(a\ge 1\) and \(b\ge 0\).

### Proof

### Corollary 3

Suppose that \(m=2^a\cdot p^{b}\), \(p>5\), \(a,b\ge 1\). If \(m\ge \frac{37}{19}\cdot 2^{24}\cdot 5^{3}\), then *m* is not a discriminator value.

### Proof

*n*/ 3, 37

*n*/ 19) there is an integer of the form \(m=2^c\cdot 5^{d}\) with \(c\ge 1\). This integer discriminates the first

*n*terms of the sequence and is smaller than

*m*. This contradicts the definition of the discriminator. \(\square \)

Thus we see that in some sense there is an abundance of numbers of the form \(m=2^{a}\cdot 5^b\) that are in addition fairly regularly distributed. Since they discriminate the first *n* terms provided that \(m\ge 5n/3\), rather than the weaker \(m\ge 2np/(p+1)\) for \(p>5\), they remain as values, whereas numbers of the form \(m=2^{a}\cdot p^b\) with \(p>5\) do not.

### Lemma 11

If \(n>1,\) then \({\mathcal D}_1(n)=2^a\cdot 5^b\) for some \(a\ge 1\) and \(b\ge 0\).

### Proof

*A*be minimal with \(p_1^{b_1}<2^{A+8}\). Then \(A\ge 2\) by our calculation because we did not find any such \(p_1\) on calculating \({\mathcal D}_1(n)\) for \(n\le 2^{10}\) (cf. Sect. 1). Then

Since \(2^a\cdot p_1^{b_1}\) discriminates the first \(2^a\cdot p_1^{b_1-1}(p_1+1)/2\) terms of the sequence (but not more) and the same integers are discriminated by the smaller number \(2^{a+A+1}\cdot 5^3\), the number \(2^a\cdot p_1^{b_1}\) is not a discriminator value.

It remains to deal with \(p=37\). We will show that for \(k_i=2\cdot 37^i\) and \(1\le i\le 5\), there is a power of the form \(2^{e_i}<k_i\) that discriminates the same terms of the sequence as \(k_i\) does, thus showing that \(k_i\) cannot be a discriminator. By the same token, any potential value \(2^{\alpha }\cdot 37^i\), \(1\le i\le 6\), is outdone by \(2^{\alpha +e_i}\). Any remaining value of the form \(2^{\alpha }\cdot 37^i\) has \(i\ge 6\) and \(\alpha \ge 1\) and cannot be a value by Corollary 3.

### Lemma 12

*m*discriminates \(U_0,\ldots ,U_{n-1}\) if these integers are pairwise distinct modulo

*m*.

- (i)
The integer \(m=2^a\) discriminates \(U_0,\ldots ,U_{n-1}\) if and only if \(m\ge n\).

- (ii)
The integer \(m=2^a\cdot 5^b\) with \(a,b\ge 1\) discriminates \(U_0,\ldots ,U_{n-1}\) if and only if \(m\ge 5n/3\).

### Proof

Case i follows from Lemma 1. Now suppose that \(a,b\ge 1\). By Lemma 9 the integer *m* discriminates \(U_0,\ldots ,U_{z(m)-1}\), but not \(U_0,\ldots ,U_{z(m)}\). It follows that *m* discriminates \(U_0,\ldots ,U_{n-1}\) iff \(n\le z(m)\). As it is easily seen that \(z(m)=3m/5\), the result follows. \(\square \)

At long last we are ready to prove Theorem 1.

### Proof of Theorem 1

As the statement is correct for \(n=1\), we may assume that \(n>1\). By Lemma 11 it then follows that either \(m=2^a\) for some \(a\ge 1\) or \(m=2^a\cdot 5^b\) with \(a,b\ge 1\). On invoking Lemma 12 we infer that the first assertion holds true.

*m*occurs as value iff

## 6 General *k*

### 6.1 Introduction

What is happening for \(k>1\)? It turns out that the situation is quite different.

For \(k=2\) we have the following result.

### Theorem 4

Let \(e\ge 0\) be the smallest integer such that \(2^e\ge n\) and \(f\ge 1\) the smallest integer such that \(3\cdot 2^f\ge n\). Then \({\mathcal D}_2(n)=\min \{2^e,3\cdot 2^f\}\).

### Proof

If \(z(m)=m\), then *m* divides \(3\cdot 2^a\) for some \(a\ge 0\). For the other integers *m* we have \(z(m)\le 3m/5\) (actually even \(z(m)\le 7m/13\)). It follows that if *m* discriminates the first *n* values of the sequence *U*(2), then we must have \(m\ge 5n/3\). It is easy to check that for every \(n\ge 2\) there is a power of two or a number of the form \(3\cdot 2^a\) in the interval [*n*, 5*n* / 3). As \({\mathcal D}_2(1)=1\) we are done. \(\square \)

For \(k>2\) the situation is rather more complex and described in Theorem 3. In our proof of this result the rank of appearance plays a crucial role. Its most important properties are summarized in Lemma 14. After some further preparatory work we will finally present a proof of Theorem 3 in Sect. 6.6.

### 6.2 The index of appearance

#### 6.2.1 The case where \(p\mid k(k+1)\)

The index of appearance for primes *p* dividing \(k(k+1)\) is determined in Lemma 3 for \(p>2\). By Lemma 1 we have \(z(2^b)=2^b\). In general \(z(p^b)=p^b\) for these primes, but for a prime *p* which we call *special* a complication can arise giving rise to \(z(p^b)\mid p^{b-1}\) for \(b\ge 2\).

### Definition 1

A prime *p* is said to be special if \(p|k(k+1)\) and \(p^2|U_p\).

The special feature of a special prime *p* is that \(p^b\) with \(b\ge 2\) cannot divide a discriminator value. Recall that \(z(p^a)=p^{\max \{a-c,0\}} z(p)\), where \(c=\nu _p(U_{z(p)})\) by Lemma 2.

### Lemma 13

Let \(p\ge 3\) be an odd prime. If \(z(p^{b})|p^{b-1}\), then \(m=p^bm_1\) with \(p\not \mid m_1\) is not a discriminator value.

### Proof

Taking \(i=0\) and \(j=p^{b-1}z(m_1)\) we have Open image in new window It follows that \(n\le p^{b-1} z(m_1)\le m/p\) so any power of 2 in [*m* / 3, *m*) (and such a power exists) is a better discriminator than *m*. \(\square \)

By Lemma 3 only the prime 3 can be special.

#### 6.2.2 The case where \(p\not \mid k(k+1)\)

*p*such that \(p\not \mid k(k+1)\). These come in two types according to the sign of

*p*is inert in \({\mathbb K}\), we get that Open image in new window , from which we deduce that \(p\mid U_{(p+1)/4}\), Hence, \(z(p)\mid (p+1)/4\) in this case.

#### 6.2.3 General *m*

### Lemma 14

*m*we have

### Corollary 4

We have \(z(m)\le m\).

### Corollary 5

### Proof of Lemma 14

*m*with \(z(p_i^{b_i})=p_i^{b_i}\), then

*any*integer, then

*p*. \(\square \)

*p*with \(z(p)=(p+1)/2\), then

*q*is the smallest prime such that \(z(q)=(q+1)/2\).

### 6.3 The congruence \(U_i(k)\equiv U_j(k)\pmod m\)

In this subsection we study the congruence Open image in new window . By the Chinese Remainder Theorem it suffices to study it modulo prime powers \(p^b\). For powers of 2, this has been done at the beginning of Sect. 2. Recall that the discriminant \(\Delta (k)\) equals \(16k(k+1)\). It turns out that primes *p* dividing \(\Delta (k)\) are easier to understand than the others. From now on, we eliminate the index *k* from \(U_n(k),~\alpha (k),~\Delta (k)\) and so on. We treat the case when \(p\mid k(k+1)\). In case *m* is even, there are two subcases, one easy and one harder, according to whether \(p\mid k\) or \(p\mid (k+1)\).

### Lemma 15

Assume \(p\mid k\) is odd. Let \(b\ge 1\) be arbitrary. Then Open image in new window if and only if Open image in new window .

### Proof

*a*be such that \(p^a\Vert k\). We put \(k(k+1)=du^2\), and let \({\mathbb K}={\mathbb Q}[{\sqrt{d}}]\). We let \(\pi \) be any prime ideal diving

*p*and let

*e*be such that \(\pi ^e\Vert p\). For example, \(e=2\) if \(p\mid d\). Let \(\lambda \) be the residue class of the number \(U_i\) modulo \(p^b\). Then Open image in new window implies thatThe same holds for \(\alpha ^i\) replaced by \(\alpha ^j\). Hence, these numbers both satisfy the quadratic congruenceTaking their difference we getIn case \(p\mid k\), we have that Open image in new window . Thus, the second factor above is congruent to Open image in new window . In particular, \(\pi \) is coprime to that factor. Thus,This leads to Open image in new window . Changing \(\alpha \) to \(\alpha ^{-1}\) and taking the difference of the above expressions we arrive at Open image in new window . Thus,Clearly, the exponent of \(\pi \) in \(2{\sqrt{k(k+1)}}\) is exactly

*ae*/ 2. Thus, \(\pi ^{eb}\mid U_{i-j}\). Since this is true for all prime power ideals \(\pi ^e\) dividing

*p*, we get that \(p^b\mid U_{i-j}\). Thus, Open image in new window .

Now we treat the more delicate case \(p\mid (k+1)\). Here we have the following analogue of Lemma 15.

### Lemma 16

*p*is odd and \(p\mid (k+1)\). Let \(b\ge 1\) be arbitrary. Then Open image in new window is equivalent to one of the following:

- (i)
If Open image in new window , then Open image in new window .

- (ii)
If Open image in new window , then Open image in new window .

### Proof

In case Open image in new window , we have Open image in new window . Thus, Open image in new window . Arguing as in the proof of the preceding lemma yields Open image in new window and hence Open image in new window .

We now have to do the if parts. They are pretty similar to the previous analysis. We start with \(i\equiv j\pmod 2\). Then \(i-j\equiv 0\pmod {z(p^b)}\), so \(U_{i-j}\equiv 0\pmod {p^b}\). This gives as in the previous case \(\alpha ^{i-j}\equiv \alpha ^{-(i-j)}\pmod {\pi ^{eb+ae/2}}\), so \(\alpha ^{2(i-j)}\equiv 1\pmod {\pi ^{eb+ae/2}}\). Thus, \((\alpha ^{i-j}-1)(\alpha ^{i-j}+1) \equiv 0\pmod {\pi ^{be+ae/2}}\). Since \(i-j\) is even, \(\alpha ^{i-j}\equiv (-1)^{i-j}\pmod \pi \equiv 1\pmod {\pi }\), so the second factor is congruent to \(2\pmod {\pi }\), so it is coprime to \(\pi \). So, \(\alpha ^{i-j}-1\equiv 0\pmod {\pi ^{be+ae/2}}\). Now the argument continues as in the last part of the proof of the preceding lemma to get to the conclusion that \(U_i\equiv U_j\pmod {p^b}\).

A similar argument works when \(i\not \equiv j\pmod 2\). With the same argument we get from \(i+j\equiv 0\pmod {z(p^b)}\) to the relation \(U_{i+j}\equiv 0\pmod {p^b}\), which on its turn leads to \((\alpha ^{i+j}-1)(\alpha ^{i+j}+1)\equiv 0\pmod {\pi ^{be+ae/2}}\). Since \(i+j\) is odd, the factor \(\alpha ^{i+j}-1\) is congruent to is \(-2\pmod {\pi }\), so it is coprime to \(\pi \). So, \(\alpha ^{i+j}+1\equiv 0\pmod {\pi ^{eb+ae/2}}\) and multiplying with a suitable power of \(\alpha \) and rearranging we get \(\alpha ^i\equiv -\alpha ^{-j}\pmod {\pi ^{be+ae/2}}\), and also \(\alpha ^{-i}\equiv -\alpha ^j\pmod {\pi ^{be+ae/2}}\). Taking the difference of these last two congruences, we get \(\alpha ^i-\alpha ^{-i}-\alpha ^j+\alpha ^{-j}\equiv 0\pmod {\pi ^{be+ae/2}}\), which leads to the congruence \(2\sqrt{k(k+1)}(U_i-U_j)\equiv 0\pmod {\pi ^{be+ae/2}}\). Simplifying \(2\sqrt{k(k+1)}\), we get that \(\pi ^{be}\) divides \(U_i-U_j\), and since \(\pi \) is an arbitrary prime ideal of *p*, we conclude that \(U_i\equiv U_j\pmod {p^b}\). \(\square \)

### Definition 2

We write \({\mathcal P}(r)\) for the set of positive integers composed only of prime factors dividing *r*.

### Lemma 17

### Proof

Since \(0=U_0(k)\equiv U_{z(m)}(k)\pmod m\), we must have \(z(m)\ge m\). As \(z(m)\le m\) by Corollary 12 it follows that \(z(m)=m\).

First subcase: *m* is odd.

Since \(z(m)=m\) all prime divisors of *m* must divide \(k(k+1)\). Now suppose that *m* has an odd prime divisor *p* dividing \(k+1\). Thus \(m=p^am_1\) with \(m_1\) coprime to *p* and odd. Note that \(z(p^a)=p^a\). Consider \(i=(p^{a}-1)m_1/2\) and \(j=(p^{a}+1)m_1/2\). Then \(i\not \equiv j\pmod 2\) and \(p^{a}\mid (i+j)\). Thus, \(U_i\equiv U_j\pmod {p^{a}}\) by Lemma 16. Since \(m_1\mid i\) and \(m_1\mid j\) and \(m_1\) is composed of primes dividing \(\Delta (k)=16k(k+1)\), it follows that \(U_i\equiv U_j\equiv 0\pmod {m_1}\) and hence we have \(U_i\equiv U_j\pmod {m}\) with \(m\not \mid (j-i)\). It follows that (17) is not satisfied. Thus we conclude that if an odd integer *m* is to satisfy (17), then it has to be in \({\mathcal P}(k)\). For such an integer, by Lemma 15 and the Chinese remainder theorem, (17) is always satisfied. It follows that the solution set of odd *m* satisfying (17) is \(\{m~{\text { odd}}:z(m)=m\text { and } m\in {\mathcal P}(k)\},\) which by Corollary 5 equals \({\mathcal A}_k\).

Second subcase: *m* is even. Both the left and the right side of (17) imply that \(i\equiv j\pmod {2}\). On applying Lemmas 15 and 16 and the Chinese remainder theorem we see that in this case the solution set is \(\{m~\text { even}:z(m)=m\},\) which by Corollary 5 equals \({\mathcal B}_k\). \(\square \)

### 6.4 A Diophantine interlude

The prime 3 sometimes being special leads us to solve a very easy Diophantine problem (left to the reader).

### Lemma 18

If \(k>2\), then \(k(k+1)\) has an odd prime factor that is not special.

### Proof

*k*there are

*a*,

*b*for which the Diophantine equation

### 6.5 Bertrand’s postulate for S-units

Before we embark on the proof of our main result we make a small excursion in Diophantine approximation.

### Lemma 19

Let \(\alpha >1\) be a real number and *p* be an arbitrary odd prime. Then there exists a real number \(x(\alpha )\) such that for every \(n\ge x(\alpha )\) the interval \([n,n\alpha )\) contains an even integer of the form \(2^a\cdot p^b\).

### Proof

Along the lines of the proof of Lemma 10. If \(\beta \) is irrational, then the sequence of integers \(\{m\beta \}_{m=1}^{\infty }\) is uniformly distributed. This allows one to find quotients \(2^c/p^d\) and \(p^r/2^s\) that are in the interval \((1,\alpha )\). Then proceed as in the proof of Lemma 10. \(\square \)

The result also holds for S-units of the form \(\prod _{i=1}^s p_i^{b_i}\) with \(p_1<\ldots < p_s\) primes and \(s\ge 2\).

### 6.6 Proof of the main result for general *k*

Finally we are in the position to prove our main result for \(k>1\).

### Proof of Theorem 3

Let \(k>2\).

First case: \(m\in {\mathcal A}_k\cup {\mathcal B}_k.\) (Note that \(z(m)=m\) for these *m*.)

By Lemma 17 we infer that the inequality (2) holds true and moreover the equivalence (3). The “\(\Leftarrow \)” implication in (3) yields \({\mathcal A}_k\cup {\mathcal B}_k \subseteq {\mathcal D}_k\).

Second case: \(z(m)=m\) and \(m\not \in {\mathcal A}_k\cup {\mathcal B}_k\).

*m*has a odd prime divisor

*p*that also divides \(k+1\). Now write \(m=p^a\cdot m_1\) with \(p\not \mid m_1\) and \(m_1\) odd. Note that \(z(p^a)=p^a\). Consider \(i=(p^a-1)m_1/2\) and \(j=(p^a+1)m_1/2\). Then \(i\not \equiv j\pmod 2\) and \(p^{a}\mid (i+j)\). Thus, \(U_i\equiv U_j\pmod {p^{a}}\) by Lemma 16. Since \(m_1\mid i\) and \(m_1\mid j\) and \(m_1\) is composed of primes dividing \(\Delta (k)\), it follows that \(U_i\equiv U_j\equiv 0\pmod {m_1}\). This shows that if

*m*discriminates the numbers \(U_0(k),\ldots ,U_{n-1}(k),\) then

*m*is not a discriminator value.

Third case: \(z(m)<m\).

Here it follows by Lemma 14 that \(z(m)\le \alpha _k m\le 2m/3\). In order for *m* to discriminate the first *n* terms we must have \(n\le z(m)\le 2m/3\), that is \(m\ge 3n/2\). Now if in the interval [*n*, 3*n* / 2) there is an element from \({\mathcal A}_k\cup {\mathcal B}_k,\) this will discriminate the first *n* terms too and is a better discriminator than *m*. Thus in this case in (2) we have equality.

Since by assumption \(k>2\), by Lemma 18 there exists a non-special odd prime *p* dividing \(k(k+1)\) and hence if \(a,b\ge 0,\) then \(2^{1+a}\cdot p^b \in {\mathcal A}_k\cup {\mathcal B}_k.\) It now follows by Lemma 19 that for every *n* large enough the interval [*n*, 3*n* / 2) contains an element from \({\mathcal A}_k\cup {\mathcal B}_k\) and so there are at most finitely many *n* for which in (2) strict inequality holds. \(\square \)

### 6.7 The set \({\mathcal F}_k\)

### Lemma 20

There are infinitely many *k* for the finite set \({\mathcal F}_k\) is non-empty. It can have a cardinality larger than any given bound.

### Proof

Let *N* be large and \(k\equiv 1\pmod {N!}\). Then \(U(k)\pmod m\) is the same as \(U(1)\pmod m\) for all \(m\le N\). In particular, if \(N>2\cdot 5^{m_s}\), where \(m_s\) is the \(s^\text {th}\) element of the set \({\mathcal M}\), then certainly \({\mathcal D}_1\cap [1,N]\) will contain the numbers \(2\cdot 5^{m_i}\) for \(i=1,\ldots ,s\), and \(5\not \mid k(k+1)\) (in fact, \(k\equiv 1\pmod {5}\), so \(5\not \mid k(k+1)\)), therefore all such numbers are in the set \({\mathcal F}_k\) for such values of *k*. \(\square \)

Thus it is illusory to want to describe \({\mathcal F}_k\) completely for every \(k\ge 1\). Nevertheless, in part II [5] we will explore how far we can get in this respect.

## 7 Analogy with the polynomial discriminator

In our situation for \(k\ge 1\) on the one hand there are enough integers *m* with \(z(m)=m\) and \({\mathcal D}_k(m)=m\), on the other hand for the remaining *m* either \(z(m)=m\) and *m* is not a discriminator value or we have \(z(m)\le \alpha _km\) with \(\alpha _k<1,\) a constant not depending on *m*. Thus the distribution of \(\{z(m)/m:m\ge 1\}\) shows a gap directly below 1 (namely \((\alpha _k,1)\)).

For polynomial discriminators the analogue of *z*(*p*) is *V*(*p*), the number of values assumed by the polynomial modulo *p*. If on the one hand there are enough integers *m* such that *f* permutes \(\mathbb Z/m\mathbb Z\), and on the other hand *V*(*p*) / *p* with \(V(p)<p\) is bounded away from 1 (thus also shows a gap directly below 1), then the polynomial discriminator can be easily described for all *n* large enough. See Moree [9] and Zieve [16] for details.

## Notes

### Acknowledgements

Open access funding provided by Max Planck Society. Part of this paper was written during an one month internship in the autumn of 2016 of B.F. at the Max Planck Institute for Mathematics in Bonn. She thanks the people of this institution for their hospitality. She was partly supported by the government of Canada’s International Development Research Centre (IDRC) within the framework of the AIMS Research for Africa Project. Work on the paper was continued during a visit of F.L. to MPIM in the first half of 2017. The authors like to thank Alexandru Ciolan for help with computer experiments and proofreading earlier versions and, furthermore, Paul Voutier and Hugh Williams for sketching proofs of Lemma 4 based on early 20th century work by Carmichael [4] and Lehmer [8].

### References

- 1.Arnold, L.K., Benkoski, S.J., McCabe, B.J.: The discriminator (a simple application of Bertrand’s postulate). Am. Math. Monthly
**92**, 275–277 (1985)MathSciNetCrossRefMATHGoogle Scholar - 2.Bilu, Y., Hanrot, G., Voutier, P.M.: Existence of primitive divisors of Lucas and Lehmer numbers. With an appendix by M. Mignotte. J. Reine Angew. Math.
**539**, 75–122 (2001)MathSciNetMATHGoogle Scholar - 3.Bremser, P.S., Schumer, P.D., Washington, L.C.: A note on the incongruence of consecutive integers to a fixed power. J. Number Theory
**35**, 105–108 (1990)MathSciNetCrossRefMATHGoogle Scholar - 4.Carmichael, R.D.: On the numerical factors of the arithmetic forms \(\alpha ^n\pm \beta ^n\). Ann. Math. (2)
**15**, 30–48 (1913)Google Scholar - 5.Ciolan, A., Luca, F., Moree, P.: On the discriminator of Lucas sequences. II: Effective aspects. In preparationGoogle Scholar
- 6.Ciolan, A., Moree, P.: Browkin’s discriminator conjecture. Colloq. Math. (
**to appear**). arXiv:1707.02183 - 7.Everest, G., van der Poorten, A., Shparlinski, I., Ward, T.: Recurrent Sequences. Mathematical Surveys and Monographs, vol. 104, p. 318. American Mathematical Society, Providence, RI (2003)CrossRefMATHGoogle Scholar
- 8.Lehmer, D.H.: An extended theory of Lucas’ functions. Ann. Math. (2)
**31**, 419–448 (1930)MathSciNetCrossRefMATHGoogle Scholar - 9.Moree, P.: The incongruence of consecutive values of polynomials. Finite Fields Appl.
**2**, 321–335 (1996)MathSciNetCrossRefMATHGoogle Scholar - 10.Moree, P., Mullen, G.: Dickson polynomial discriminators. J. Number Theory
**59**, 88–105 (1996)MathSciNetCrossRefMATHGoogle Scholar - 11.Moree, P., Zumalacárregui, A.: Salajan’s conjecture on discriminating terms in an exponential sequence. J. Number Theory
**160**, 646–665 (2016)MathSciNetCrossRefMATHGoogle Scholar - 12.Ribenboim, P.: Catalan’s Conjecture. Are 8 and 9 the Only Consecutive Powers?. Academic Press, Inc., Boston, MA (1994)MATHGoogle Scholar
- 13.Ribenboim, P.: The New Book of Prime Number Records. Springer, New York (1996)CrossRefMATHGoogle Scholar
- 14.Shallit, J.: E-mail correspondence with the third author (2016)Google Scholar
- 15.Williams, H.C.: Édouard Lucas and Primality Testing. Canadian Mathematical Society Series of Monographs and Advanced Texts, vol. 22. Wiley, New York (1998)MATHGoogle Scholar
- 16.Zieve, M.: A note on the discriminator. J. Number Theory
**73**, 122–138 (1998)MathSciNetCrossRefMATHGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.