1 Introduction

Let \((u_n)\) be a non-degenerate linear recurrence with integral values. Several authors studied the arithmetic relations between \(u_n\) and n. For instance, under the mild hypothesis that the characteristic polynomial of \((u_n)\) has only simple roots, Alba González et al. [1] studied the set of positive integers n such that \(u_n\) is divisible by n. The same set was also studied by André-Jeannin [2], Luca and Tron [12], Sanna [16], and Somer [20], in the special case in which \((u_n)\) is a Lucas sequence. Furthermore, Sanna [17] studied the set of natural numbers n such that \(\gcd (n, u_n) = 1\) (see [14] for a generalization, and [23] for a survey on g.c.d.’s of linear recurrences). Similar problems, with \((u_n)\) replaced by an elliptic divisibility sequence or by the orbit of a polynomial map, were also studied [3, 5, 6, 8, 9, 19].

Let \((F_n)\) be the linear recurrence of Fibonacci numbers, which is defined as usual by \(F_1 = F_2 = 1\) and \(F_{n+2} = F_{n+1} + F_n\) for all positive integers n. For every positive integer k, define the following set of natural numbers

$$\begin{aligned} {\mathcal {A}}_k := \{n \ge 1 : \gcd (n, F_n) = k\} , \end{aligned}$$

Recall that the natural density \(\varvec{d}({\mathcal {S}})\) of a set of positive integers \({\mathcal {S}}\) is defined as the limit of the ratio \(\#\big ({\mathcal {S}} \cap [1, x]\big ) / x\) as \(x \rightarrow +\infty \), whenever this limit exists. Sanna and Tron [18] proved that each \({\mathcal {A}}_k\) has a natural density, which can be written as an infinite series, and they provided an effective criterion to determine if such density is positive.

We consider similar results but for the set of shifted primes \(p - 1\). (Throughout, we reserve the letter p for prime numbers.) Shifted primes already make their appearance in relation to Fibonacci numbers. For instance, it is well known that p divides \(F_{p - 1}\) for every prime number \(p \equiv \pm 1 \pmod 5\). For each integer \(k \ge 1\), define the following set of prime numbers

$$\begin{aligned} {\mathcal {P}}_k := \{p : \gcd (p-1, F_{p-1}) = k\}. \end{aligned}$$

Recall that the relative density \({\textbf{r}}({\mathcal {P}})\) of a set of prime numbers \({\mathcal {P}}\) is defined as the limit of the ratio \(\#({\mathcal {P}} \cap [1, x]) / \pi (x)\) as \(x \rightarrow +\infty \), whenever this limit exists, where \(\pi (x)\) denotes the number of primes not exceeding x. Let z(m) denote the rank of appearance, or entry point, of a positive integer m in the sequence of Fibonacci numbers, that is, the smallest positive integer n such that m divides \(F_{n}\). It is well known that z(m) exists. Also, let \(\ell (m)=\mathop {\textrm{lcm}}\limits \!\big (m,z(m)\big )\).

Our first result establishes the existence of the relative density of \({\mathcal {P}}_k\) and provides a criterion to check if such a density is positive.

Theorem 1.1

For each positive integer k, the relative density of \({\mathcal {P}}_k\) exists. Moreover, if \(\gcd \!\big (\ell (k),F_{\ell (k)}\big ) \ne k\), or if \(2 \not \mid \ell (k)\) and \(\ell (pk) = 2\,\ell (k)\) for some prime number p with \(p \not \mid k\), then \({\mathcal {P}}_k \subseteq \{2\}\). Otherwise, we have that \(\varvec{r}({\mathcal {P}}_k) > 0\).

For instance, \(k = 17\) is the smallest positive integer such that \(\varvec{d}({\mathcal {A}}_k) > 0\), since \(\gcd \!\big (\ell (k),F_{\ell (k)}\big ) = k\) (see Lemma 3.3 below) but \(\varvec{r}({\mathcal {P}}_k) = 0\), since \(\ell (k) = 153\) is odd and \(\ell (pk) = 2\,\ell (k)\) for \(p = 2\).

Our second result gives an explicit expression for the relative density of \({\mathcal {P}}_k\) in terms of an absolutely convergent series.

Theorem 1.2

For each positive integer k, the relative density of \({\mathcal {P}}_k\) is

$$\begin{aligned} {\textbf{r}}({\mathcal {P}}_k) = \sum _{d \,=\, 1}^\infty \frac{\mu (d)}{\varphi (\ell (dk))} , \end{aligned}$$

where \(\mu \) is the Möbius function, \(\varphi \) is the Euler totient function, and the series converges absolutely.

Leonetti and Sanna [11] proved the following upper and lower bounds for the counting function of the set \({\mathcal {A}} := \{\gcd (n, F_n) : n \ge 1\}\).

Theorem 1.3

We have

$$\begin{aligned} \frac{x}{\log x} \ll \#\big ({\mathcal {A}} \cap [1, x] \big ) = o(x) , \end{aligned}$$
(1)

as \(x \rightarrow +\infty \).

As an application of Theorem 1.1, we provide an alternative proof of the lower bound in (1). We remark that our proof uses quite elementary methods, while Leonetti and Sanna’s proof relies on a result of Cubre and Rouse [4], which in turn is proved by Galois theory and Chebotarev’s density theorem.

Let \({\mathcal {K}}\) be the set of positive integers k such that \(\varvec{r}({\mathcal {P}}_k) > 0\). We have the following upper and lower bounds for the counting function of \({\mathcal {K}}\).

Proposition 1.4

We have

$$\begin{aligned} \frac{x}{\log x} \ll \#\big ({\mathcal {K}} \cap [1,x]\big ) = o(x) , \end{aligned}$$

as \(x \rightarrow +\infty \).

We remark that both Theorems 1.1 and 1.2 can be generalized to non-degenerate Lucas sequences, that is, integer sequences \((u_n)\) such that \(u_1 = 1\), \(u_2 = a_1\), and \(u_n = a_1 u_{n - 1} + a_2 u_{n - 2}\), for every integer \(n \ge 2\), where \(a_1, a_2\) are non-zero relatively prime integers such that the ratio of the roots of \(X^2 - a_1 X - a_2\) is not a root of unity. We decided to focus on the sequence of Fibonacci numbers in order to simplify the exposition.

A generalization in another direction could be studying the sets of primes

$$\begin{aligned} {\mathcal {P}}_k^{(s)} := \{p : \gcd (p + s, F_{p + s}) = k\} , \end{aligned}$$

for integers \(k \ge 1\) and s.

2 Preliminaries on primes in certain residue classes

We shall need a mild generalization (Theorem 2.2 below) of a result of Leonetti and Sanna [10] on primes in certain residue classes. First, we have to introduce some notation. For all \(x \le y\), let \(\llbracket x, y \rrbracket := [x, y] \cap {\mathbb {N}}\). For vectors \(\varvec{x} = (x_1, \dots , x_d)\) and \(\varvec{y} = (y_1, \dots , y_d)\) in \({\mathbb {N}}^d\), let \(\Vert \varvec{x}\Vert := x_1 \cdots x_d\), \(\llbracket \varvec{x}, \varvec{y} \rrbracket := \llbracket x_1, y_1 \rrbracket \times \cdots \times \llbracket x_d, y_d \rrbracket \), \(\varvec{x}\varvec{y} := (x_1 y_1, \dots , x_d y_d)\), and \(\varvec{x}/\varvec{y} := (x_1 / y_1, \dots , x_d / y_d)\). Let \(\varvec{0}\), respectively \(\varvec{1}\), be the vector of \({\mathbb {N}}^d\) with all components equal to 0, respectively 1. For every \(\varvec{m} = (m_1, \dots , m_d) \in {\mathbb {N}}^d\), write \(\varvec{x} \equiv \varvec{y} \pmod {\varvec{m}}\) if and only if \(x_i \equiv y_i \pmod {m_i}\) for each \(i \in \llbracket 1, d \rrbracket \), and write instead \(\varvec{x} \not \equiv \varvec{y} \pmod {\varvec{m}}\) if and only if \(x_i \not \equiv y_i \pmod {m}\) for at least one \(i \in \llbracket 1, d \rrbracket \).

Lemma 2.1

Let d be a positive integer and let \(\varvec{c}_1, \dots , \varvec{c}_k, \varvec{d} \in {\mathbb {N}}^d\) be vectors such that \(\varvec{c}_1 \cdots \varvec{c}_k \equiv \varvec{0} \pmod {\varvec{d}}\) and \(\varvec{d} \equiv \varvec{0} \pmod {\varvec{c}_i}\) for each \(i \in \llbracket 1, k \rrbracket \). Then the set \({\mathcal {X}}\) of all \(\varvec{x} \in \llbracket \varvec{1}, \varvec{d} \rrbracket \) such that \(\varvec{x} \not \equiv \varvec{0} \pmod {\varvec{c}_i}\) for each \(i \in \llbracket 1, k \rrbracket \) satisfies

$$\begin{aligned} \#{\mathcal {X}} \ge \Vert \varvec{d}\Vert \cdot \prod _{i \,=\, 1}^k \left( 1 - \frac{1}{\Vert \varvec{c}_i\Vert }\right) . \end{aligned}$$

Proof

See [10, Lemma 2.1]. \(\square \)

For all positive integers \(a_0, \dots , a_k\), let \({\mathcal {Q}}(a_0, \dots , a_k)\) be the set of primes p such that \(p \equiv 1 \pmod {a_0}\) and \(p\not \equiv 1 \pmod {a_i}\) for every \(i \in \llbracket 1, k \rrbracket \).

Theorem 2.2

Let \(a_0,\dots ,a_k\) be positive integers with \(a_0 \mid a_i\) for each \(i \in \llbracket 1, k \rrbracket \). Then the relative density of \({\mathcal {Q}} := {\mathcal {Q}}(a_0, \dots , a_k)\) exists and satisfies

$$\begin{aligned} \varvec{r}({\mathcal {Q}}) \ge \frac{1}{\varphi (a_0)} \prod _{i \,=\, 1}^k \left( 1-\frac{\varphi (a_0)}{\varphi (a_i)}\right) . \end{aligned}$$
(2)

Proof

We generalize the proof of [10, Theorem 1.2], which corresponds to the special case \(a_0 = 1\). In fact, we proceed almost exactly as in the proof of [10, Theorem 1.2]. We decided to include everything (and not just the small variations) for the sake of completeness. Let \(L := \mathop {\textrm{lcm}}\limits (a_0, \dots , a_k) = p_1^{e_1} \cdots p_d^{e_d}\) where \(p_1< \cdots < p_d\) are primes and \(e_1, \dots , e_d\) are positive integers. Also, let \({\mathcal {S}}\) be the set of integers \(n \in [1, L]\) such that: \(\gcd (n, L) = 1\), \(n \equiv 1 \pmod {a_0}\), and \(n \not \equiv 1 \pmod {a_i}\) for every \(i \in \llbracket 1,k \rrbracket \). By Dirichlet’s theorem on primes in arithmetic progressions, we have that

$$\begin{aligned} \varvec{r}({\mathcal {Q}})&= \lim _{x \,\rightarrow \, +\infty } \frac{\#({\mathcal {Q}} \cap [1, x])}{\pi (x)} \nonumber \\&= \lim _{x \,\rightarrow \, +\infty } \sum _{n \,\in \, {\mathcal {S}}} \frac{\#\{p \le x : p \equiv n \!\!\!\!\pmod L\}}{\pi (x)} = \frac{\#{\mathcal {S}}}{\varphi (L)} . \end{aligned}$$
(3)

Hence, the relative density of \({\mathcal {Q}}\) exists. Let us give a lower bound on \(\#{\mathcal {S}}\).

First, assume that \(8 \not \mid L\). Let \(g_j\) be a primitive root modulo \(p_j^{e_j}\), for each \(j \in \llbracket 1,d \rrbracket \). Note that \(g_1\) exists when \(p_1 = 2\) since \(e_1 \le 2\). Put \(\varvec{b} := \big (\varphi (p_1^{e_1}), \dots , \varphi (p_d^{e_d})\big )\). By the Chinese remainder theorem, each \(n \in \llbracket 1, \ell \rrbracket \) with \(\gcd (n, L) = 1\) is uniquely determined by a vector \(\varvec{y}(n) = (y_1(n), \dots , y_d(n)) \in \llbracket \varvec{1}, \varvec{b} \rrbracket \) such that \(n \equiv g_j^{y_j(n)} \pmod {p_j^{e_j}}\) for each \(j \in \llbracket 1,d \rrbracket \). Write \(a_i = p_1^{\alpha _{i,1}} \cdots p_d^{\alpha _{i,d}}\), where \(\alpha _{i,1}, \dots ,\alpha _{i,d} \ge 0\) are integers, and define \(\varvec{a}_i := \big (\varphi (p_1^{\alpha _{i,1}}), \dots , \varphi (p_d^{\alpha _{i,d}})\big )\) for each \(i \in \llbracket 0,k \rrbracket \). Also, put \(\varvec{c}_i = \varvec{a}_i / \varvec{a}_0\) for every \(i \in \llbracket 0,k \rrbracket \), \(\varvec{d} := \varvec{b} / \varvec{a}_0\), and let \({\mathcal {X}}\) be defined as in Lemma 2.1. At this point, it follows easily that \(n \in {\mathcal {S}}\) if and only if \(\varvec{y}(n) \equiv \varvec{0} \pmod {\varvec{a}_0}\) and \(\varvec{y}(n) \not \equiv \varvec{0} \pmod {\varvec{a}_i}\) for each \(i \in \llbracket 1, k\rrbracket \). Therefore, the map \(n \mapsto \varvec{y}(n) / \varvec{a}_0\) is a bijection \({\mathcal {S}} \rightarrow {\mathcal {X}}\) and, consequently, \(\#{\mathcal {S}} = \#{\mathcal {X}}\). Since \(\Vert \varvec{d}\Vert = \varphi (L) / \varphi (a_0)\), \(\Vert \varvec{c}_i\Vert = \varphi (a_i) / \varphi (a_0)\), \(\varvec{c}_1\cdots \varvec{c}_k \equiv \varvec{0} \pmod {\varvec{d}}\), and \(\varvec{d} \equiv \varvec{0} \pmod {\varvec{c}_i}\) for each \(i \in \llbracket 1,k \rrbracket \), we can apply Lemma 2.1, which gives a lower bound on \(\#{\mathcal {X}}\), that is, on \(\#{\mathcal {S}}\). Then (3) and the lower bound on \(\#{\mathcal {S}}\) yield (2).

Now let us consider the case in which \(8 \mid L\). This is a bit more involved since there are no primitive roots modulo \(2^e\), for every integer \(e \ge 3\). However, the previous arguments still work by changing \(\varvec{a}_i\) and \(\varvec{b}\) with

$$\begin{aligned} \varvec{a}_i := \big (2^{\max (0,\,\alpha _{i,1} - 1) - \max (0,\, \alpha _{i,1} - 2)}, 2^{\max (0,\, \alpha _{i,1} - 2)}, \varphi (p^{\alpha _{i,2}}), \ldots , \varphi (p^{\alpha _{i,d}})\big ) \end{aligned}$$

and

$$\begin{aligned} \varvec{b} = \big (2, 2^{e_1 - 2}, \varphi (p_2^{e_2}), \dots , \varphi (p_d^{e_d})\big ) . \end{aligned}$$

Then each \(n \in \llbracket 1, \ell \rrbracket \) with \(\gcd (n, L) = 1\) is uniquely determined by a vector \(\varvec{y}(n) = (y_0(n), \dots , y_d(n)) \in \llbracket \varvec{1}, \varvec{b} \rrbracket \) such that \(n \equiv (-1)^{y_0(n)} 5^{y_1(n)} \pmod {2^{e_1}}\) and \(n \equiv g_j^{y_j(n)} \pmod {p_j^{e_j}}\) for each \(j \in \llbracket 2, d \rrbracket \). The rest of the proof proceeds similarly to the previous case. \(\square \)

For all positive integers \(a_0, a_1, \dots \), let \({\mathcal {Q}}(a_0, a_1, \dots ) := \bigcap _{k \,\ge \, 1} {\mathcal {Q}}(a_0, \dots , a_k)\).

Corollary 2.3

If \(a_0,a_1,\dots \) is a sequence of positive integers such that \(a_0 \mid a_i\) for each integer \(i \ge 1\) and the series \(\sum _{i \,\ge \, 1} 1 / \varphi (a_i)\) converges, then the relative density of \({\mathcal {Q}} := {\mathcal {Q}}(a_0, a_1, \dots )\) exists. Moreover, \(\varvec{r}({\mathcal {Q}}) = 0\) if and only if there exists an integer \(i \ge 1\) such that \(a_i = a_0\), or \(a_i = 2a_0\) and \(a_0\) is odd. In such a case, we have that \({\mathcal {Q}} \subseteq \{2\}\).

Proof

If there exists an integer \(i \ge 1\) such that \(a_i = a_0\), or \(a_i = 2a_0\) and \(a_0\) is odd, then it follows easily that \({\mathcal {Q}} \subseteq \{2\}\) and, consequently, \(\varvec{r}({\mathcal {Q}}) = 0\). Hence, assume that no such integer i exists. In particular, we have that \(\varphi (a_0) < \varphi (a_i)\) for every integer \(i \ge 1\). From Theorem 2.2 we know that, for every integer \(k \ge 1\), the relative density of \({\mathcal {Q}}_k := {\mathcal {Q}}(a_0, \dots , a_k)\) exists and

$$\begin{aligned} r := \lim _{k \,\rightarrow \, +\infty } \varvec{r}({\mathcal {Q}}_k) \ge \frac{1}{\varphi (a_0)} \prod _{i \,=\, 1}^\infty \left( 1 - \frac{\varphi (a_0)}{\varphi (a_i)}\right) > 0 , \end{aligned}$$

where the infinite product converges to a positive number since \(\sum _{i \,\ge \, 1} 1 / \varphi (a_i)\) converges and \(\varphi (a_0) / \varphi (a_i) < 1\) for every integer \(i \ge 1\). Furthermore, for each \(\varepsilon > 0\) and for every sufficiently large positive integer \(k = k(\varepsilon )\), we have that

$$\begin{aligned}&\limsup _{x \,\rightarrow \, +\infty } \left| r - \frac{\#({\mathcal {Q}} \cap [1,x])}{\pi (x)}\right|< \varepsilon + \limsup _{x \,\rightarrow \, +\infty } \frac{\#\big (({\mathcal {Q}}_k \setminus {\mathcal {Q}})\cap [1, x]\big )}{\pi (x)} \\&\quad \le \varepsilon + \limsup _{x \,\rightarrow \, +\infty } \frac{\#\{p \le x : \exists j> k \text { s.t. } p \equiv 1 \!\!\!\pmod {a_j}\}}{\pi (x)} \le \varepsilon + \sum _{j \,>\, k} \frac{1}{\varphi (a_j)} < 2 \varepsilon . \end{aligned}$$

Therefore, the relative density of \({\mathcal {Q}}\) exists and, in fact, \(\varvec{r}({\mathcal {Q}}) = r > 0\). \(\square \)

3 Further preliminaries

The next lemma summarizes some basic properties of the Fibonacci numbers and the arithmetic functions \(\ell \) and z.

Lemma 3.1

For all positive integers m, n and all prime numbers p, we have:

  1. 1.

    labelite:basic:fibdiv \(F_m \mid F_n\) whenever \(m \mid n\).

  2. 2.

    \(\gcd (F_m / F_n, F_n) \mid m / n\) whenever \(n\mid m\).

  3. 3.

    \(m \mid F_n\) if and only if \(z(m) \mid n\).

  4. 4.

    \(z(p) \mid p - \left( \displaystyle \frac{p}{5}\right) \) where \(\left( \displaystyle \frac{p}{5}\right) \) is the Legendre symbol.

  5. 5.

    \(m \mid \gcd (n, F_n)\) if and only if \(\ell (m) \mid n\).

  6. 6.

    \(\ell (\mathop {\textrm{lcm}}\limits (m, n)) = \mathop {\textrm{lcm}}\limits (\ell (m), \ell (n))\).

  7. 7.

    \(\ell (p) = z(p) p\) for \(p \ne 5\), and \(\ell (5) = 5\).

  8. 8.

    \(\ell (n) \le 2n^2\).

Proof

Facts (i)–(iv) are well known (for (ii), see [21, Lemma 2]). Facts (v)–(vii) follow easily from (iii) and (iv) and the definition of \(\ell \) (cf. [18, Lemma 2.1]). Finally, fact (viii) follows easily from the well-known inequality \(z(n) \le 2 n\) (see, e.g., [15]). \(\square \)

Now we state a result to establish if \({\mathcal {A}}_k \ne \varnothing \) and \(\varvec{d}({\mathcal {A}}_k) > 0\).

Lemma 3.2

\({\mathcal {A}}_k \ne \varnothing \) if and only if \(\varvec{d}({\mathcal {A}}_k) > 0\) if and only if \(\gcd \!\big (\ell (k),F_{\ell (k)}\big )=k\), for all integers \(k \ge 1\).

Proof

See [18, Theorem 1.3]. \(\square \)

Lemma 3.3

Let k and n be positive integers. Suppose that \({\mathcal {A}}_k \ne \varnothing \). Then \(n \in {\mathcal {A}}_k\) if and only if \(\ell (k) \mid n\) and \(m \not \mid n\) for every

$$\begin{aligned} m \in \big \{p\,\ell (k) : p \mid k\big \} \cup \{\ell (pk) : p \not \mid k\} . \end{aligned}$$

Proof

See [18, Lemma 3.1]. \(\square \)

We need some upper bounds for series involving \(\ell (n)\).

Lemma 3.4

We have

$$\begin{aligned} \sum _{n \,>\, y} \frac{1}{\ell (n)} < \exp \!\left( -\delta (\log y)^{1/2} (\log \log y)^{1/2} \right) , \end{aligned}$$

for all \(\delta \in \big (0, 1/\!\sqrt{6}\;\!\big )\) and \(y \gg _\delta 1\).

Proof

See [13, Proposition 1.4]. \(\square \)

Lemma 3.5

We have

$$\begin{aligned} \sum _{n \,>\, y}\frac{1}{\varphi \big (\ell (n)\big )} \ll \frac{\log \log y}{\exp \!\left( \delta (\log y)^{1/2} (\log \log y)^{1/2} \right) } , \end{aligned}$$

for all \(\delta \in \big (0, 1/\!\sqrt{6}\;\!\big )\) and \(y \gg _\delta 1\).

Proof

From Lemma 3.4 it follows that

$$\begin{aligned} S(t) := \sum _{n \,\ge \, t} \frac{1}{\ell (n)} < f(t) := \exp \!\left( -\delta (\log t)^{1/2} (\log \log t)^{1/2} \right) , \end{aligned}$$

for all \(t \gg _\delta 1\). By partial summation, we obtain that

$$\begin{aligned} \sum _{n \,\ge \, y}\frac{\log {\log {n}}}{\ell (n)}&= S(y)\log \log y +\int \limits _{y}^{+\infty } \frac{S(t)}{t \log t}\,\textrm{d} t \\&< f(y)\log \log y + \int \limits _y^{+\infty } \frac{f(t)}{t \log t}\,\textrm{d} t \\&\ll _\delta f(y)\log \log y - \int \limits _y^{+\infty } f^\prime (t)\,\textrm{d} t \\&\ll f(y)\log \log y . \end{aligned}$$

Then, since \(\varphi (n)\gg n/\!\log {\log {n}}\) (see, e.g., [22, Chapter I.5, Theorem 4]) and \(\ell (n)\le 2n^2\) (Lemma 3.1(viii)) for all positive integers n, we have that

$$\begin{aligned} \sum _{n \,>\, y}\frac{1}{\varphi \big (\ell (n)\big )} \ll \sum _{n \,>\, y}\frac{\log {\log {n}}}{\ell (n)} \ll f(y) \log \log y . \end{aligned}$$

The claim follows. \(\square \)

For every \(x > 0\) and for all integers a and b, let \(\pi (x;b,a)\) be the number of primes \(p \le x\) such that \(p \equiv a \pmod b\), and put also

$$\begin{aligned} \Delta (x; b, a) := \pi (x;b,a) - \frac{\pi (x)}{\varphi (b)} . \end{aligned}$$

We need the following bounds for \(\Delta (x;b,a)\).

Theorem 3.6

(Siegel–Walfisz) For every \(A > 0\), we have,

$$\begin{aligned} \Delta (x; b, a) \ll \frac{x}{(\log x)^{A}} , \end{aligned}$$

for all \(x \gg _A 1\) and for all relatively prime positive integers ab with \(b \le (\log x)^A\).

Proof

See [7, Corollary 5.29]. \(\square \)

Lemma 3.7

Let \(\varepsilon > 0\). Then we have that

$$\begin{aligned} \Delta (x; b, a) \ll _\varepsilon \frac{x}{\varphi (b) \log x} , \end{aligned}$$

for all \(x \ge 2\) and for all relatively prime positive integers ab with \(b \le x^{1-\varepsilon }\).

Proof

From the Brun–Titchmarsh theorem [22, Theorem 9] we know that

$$\begin{aligned} \pi (x;b,a) \ll \frac{x}{\varphi (b) \log (x/b)} , \end{aligned}$$

for all \(b < x\). Hence, the condition \(b \le x^{1-\varepsilon }\) and the upper bound \(\pi (x) \ll x / \log x\) yield that

$$\begin{aligned} \Delta (x; b, a) \ll \pi (x;b,a) + \frac{\pi (x)}{\varphi (b)} \ll \frac{x}{\varphi (b)\log (x / b)} + \frac{x}{\varphi (b) \log x} \ll _\varepsilon \frac{x}{\varphi (b) \log x} , \end{aligned}$$

as desired. \(\square \)

4 Proof of Theorem 1.1

Let k be a positive integer. If \({\mathcal {P}}_k = \varnothing \) then, obviously, the relative density of \({\mathcal {P}}_k\) exists and is equal to zero. Hence, suppose that \({\mathcal {P}}_k \ne \varnothing \). In particular, \({\mathcal {A}}_k \ne \varnothing \), since \(p - 1 \in {\mathcal {A}}_k\) for every \(p \in {\mathcal {P}}_k\). Therefore, by Lemma 3.2, we have that \(\gcd \!\big (\ell (k), F_{\ell (k)}\big ) = k\). Recall the definition of \({\mathcal {Q}}(a_0, a_1, \dots )\) given before Corollary 2.3. Define the sequence \({\mathcal {M}}_k = m_0, m_1, \dots \) where \(m_0< m_1 < \dots \) are all the elements of

$$\begin{aligned} \big \{\ell (k)\big \} \cup \big \{p\,\ell (k) : p \mid k \big \} \cup \big \{\ell (pk) : p \not \mid k \big \} . \end{aligned}$$

Then, from Lemma 3.3 and the definition of \({\mathcal {Q}}({\mathcal {M}}_k)\), it follows that \({\mathcal {P}}_k = {\mathcal {Q}}({\mathcal {M}}_k)\). Furthermore, by Lemma 3.5, we have that

$$\begin{aligned} \sum _{i \,\ge \, 0} \frac{1}{\varphi (m_i)} \ll _k \sum _{p} \frac{1}{\varphi \big (\ell (pk)\big )} \ll _k \sum _{p} \frac{1}{\varphi \big (\ell (p)\big )} < +\infty . \end{aligned}$$

Hence, thanks to Corollary 2.3, we get that the relative density of \({\mathcal {P}}_k\) exists and, in particular, \(\varvec{r}({\mathcal {P}}_k) = 0\) if and only if \({\mathcal {P}}_k \subseteq \{2\}\) if and only if there exists an integer \(i \ge 1\) such that \(m_i = m_0\), or \(m_i = 2m_0\) and \(m_0\) is odd. The first case is impossible, since the sequence \({\mathcal {M}}_k\) is increasing. The second case is equivalent to \(2 \not \mid \ell (k)\) and either \(p\, \ell (k) = 2\,\ell (k)\), for some prime number p with \(p \mid k\), or \(\ell (pk) = 2\,\ell (k)\), for some prime number p with \(p \not \mid k\). In turn, since \(k \mid \ell (k)\), this is equivalent to \(2 \not \mid \ell (k)\) and \(\ell (pk) = 2\,\ell (k)\) for some prime number p with \(p \not \mid k\). The proof is complete.

Remark 4.1

We remark that the convergence of the series

$$\begin{aligned} \sum _{p} \frac{1}{\varphi \big (\ell (p)\big )} \end{aligned}$$

admits a simpler proof than invoking Lemma 3.5 which we highlight below. Note that \(\ell (p) \gg p\,z(p) \gg p \log p\) due to Lemma 3.1(vii). Thus, we have that

$$\begin{aligned}\sum _{p} \frac{1}{\varphi \big (\ell (p)\big )}\ll \sum _{p}\frac{\log \log p}{p\,z(p)}\ll \sum _{p}\frac{\log \log p}{p\log p} < +\infty \end{aligned}$$

since \(\varphi (n)\gg n/\!\log {\log {n}}\) and \(\ell (n)\le 2n^2\) for all positive integers n, and the convergence of last sum is standard .

5 Proof of Theorem 1.2

For each positive integer k, let \({\mathcal {R}}_k\) be the set of prime numbers p such that:

  1. (i)

    \(k \mid \gcd (p-1, F_{p-1})\);

  2. (ii)

    if \(q \mid \gcd (p-1, F_{p-1})\) for some prime number q, then \(q \mid k\).

The essential part of the proof of Theorem 1.2 is the following formula for the relative density of \({\mathcal {R}}_k\).

Lemma 5.1

For all positive integers k, the relative density of \({\mathcal {R}}_k\) exists and

$$\begin{aligned} {\textbf{r}}({\mathcal {R}}_k) = \sum _{(d,\,k) \,=\, 1} \frac{\mu (d)}{\varphi \big (\ell (dk)\big )} , \end{aligned}$$
(4)

where the series is absolutely convergent.

Proof

For every prime p and for every positive integer d, let us define

$$\begin{aligned} \varrho (p, d) := {\left\{ \begin{array}{ll} 1 &{} \text { if } d \mid F_{p-1}, \\ 0 &{} \text { if } d \not \mid F_{p-1} .\end{array}\right. } \end{aligned}$$

Note that \(\varrho \) is multiplicative in its second argument, that is,

$$\begin{aligned} \varrho (p, de) = \varrho (p, d) \, \varrho (p, e) \end{aligned}$$

for all primes p and for all coprime positive integers d and e.

From Lemma 3.1(v), it follows easily that \(p \in {\mathcal {R}}_k\) if and only if \(p\equiv 1\pmod {\ell (k)}\) and \(\varrho (p, q) = 0\) for all prime numbers q dividing \(p-1\) but not dividing k. Therefore,

$$\begin{aligned} \#\big ({\mathcal {R}}_k \cap [1, x]\big )&= \sum _{\begin{array}{c} p \,\le \, x \\ \ell (k) \,\mid \, p-1 \end{array}} \prod _{\begin{array}{c} q \,\mid \, p-1 \\ q \,\not \mid \, k \end{array}} \big (1 - \varrho (p, q)\big ) = \sum _{\begin{array}{c} p \,\le \, x \\ \ell (k) \,\mid \, p-1 \end{array}} \sum _{\begin{array}{c} d \,\mid \, p-1 \\ (d,\, k) \,=\, 1 \end{array}} \mu (d)\, \varrho (p, d) \nonumber \\&= \sum _{\begin{array}{c} d \,\le \, x \\ (d,\, k) \,=\, 1 \end{array}} \mu (d) \sum _{\begin{array}{c} p \,\le \, x \\ \mathop {\textrm{lcm}}\limits (\ell (k),\,d) \,\mid \, p-1 \end{array}} \varrho (p, d) , \end{aligned}$$
(5)

for all \(x > 0\). Furthermore, by Lemma 3.1(iii), given a positive integer d that is relatively prime with k, we have that \(\varrho (p, d) = 1\) and \(\mathop {\textrm{lcm}}\limits (d,\ell (k)) \mid p-1\) if and only if \(\mathop {\textrm{lcm}}\limits (z(d),d, \ell (k)) \mid p-1\), which in turn is equivalent to \(p-1\) being divisible by

$$\begin{aligned} \mathop {\textrm{lcm}}\limits \!\big (\!\mathop {\textrm{lcm}}\limits \!\big (z(d), d\big ), \ell (k)\big ) = \mathop {\textrm{lcm}}\limits \!\big (\ell (d), \ell (k)\big ) = \ell (dk) , \end{aligned}$$

where we used Lemma 3.1(vi) and the fact that d and k are relatively prime. Hence, we get that

$$\begin{aligned} \sum _{\begin{array}{c} p \,\le \, x \\[1pt] \mathop {\textrm{lcm}}\limits (\ell (k),d) \,\mid \, p-1 \end{array}} \varrho (p, d) = \!\sum _{\begin{array}{c} p \,\le \, x \\[1pt] p \,\equiv \, 1 \!\!\!\!\pmod {\ell (dk)} \end{array}} 1 = \pi \big (x;\ell (dk),1\big ) , \end{aligned}$$
(6)

for all \(x > 0\). Therefore, from (5) and (6), it follows that

$$\begin{aligned} \#\big ({\mathcal {R}}_k \cap [1, x]\big ) = \sum _{\begin{array}{c} d \,\le \, x \\[1pt] (d,\, k) \,=\, 1 \end{array}} \mu (d) \, \pi \big (x;\ell (dk),1\big ) , \end{aligned}$$

for all \(x > 0\). Pick any \(A > 2\). Also, set \(y := x^{1/4} / \big (\!\sqrt{2} k\big )\) and \(z := (\log x)^{A/2} / \big (\!\sqrt{2} k\big )\). Then we have that

$$\begin{aligned} \frac{\#\big ({\mathcal {R}}_k \cap [1, x]\big )}{\pi (x)} = \sum _{(d,\, k) \,=\, 1} \frac{\mu (d)}{\varphi \big (\ell (dk)\big )} - E_1(x) + E_2(x) + E_3(x)+E_4(x) \end{aligned}$$

for all \(x > 0\), where, by Lemma 3.5, the infinite series converges absolutely, while

$$\begin{aligned}{} & {} E_1(x) := \sum _{\begin{array}{c} d \,>\, x \\ (d,\, k) \,=\, 1 \end{array}} \frac{\mu (d)}{\varphi \big (\ell (dk)\big )} , \\{} & {} E_2(x) := \frac{1}{\pi (x)}\sum _{\begin{array}{c} d \,\le \, z \\ (d,\, k) \,=\, 1 \end{array}} \mu (d)\,\Delta \big (x;\ell (dk),1\big ) , \\{} & {} E_3(x) := \frac{1}{\pi (x)}\sum _{\begin{array}{c} z \,<\, d \,\le \, y \\ (d,\, k) \,=\, 1 \end{array}} \mu (d) \, \Delta \big (x;\ell (dk),1\big ) , \end{aligned}$$

and

$$\begin{aligned} E_4(x)=\frac{1}{\pi (x)}\sum _{\begin{array}{c} y \,<\, d \,\le \, x \\ (d,\, k) \,=\, 1 \end{array}} \mu (d) \, \Delta \big (x;\ell (dk),1\big ) , \end{aligned}$$

It remains only to prove that \(E_1(x)\), \(E_2(x)\), \(E_3(x)\), \(E_4(x)\) go to zero as \(x \rightarrow +\infty \). From Lemma 3.5 it follows that

$$\begin{aligned} E_1(x) \ll \sum _{d \,>\, y} \frac{1}{\varphi \big (\ell (d)\big )} = o(1) , \end{aligned}$$

as \(x \rightarrow +\infty \). Note that, thanks to Lemma 3.1(viii), if \(d \le z\) then \(\ell (dk) \le (\log x)^A\). Hence, from Theorem 3.6, we get that

$$\begin{aligned} E_2(x) \ll \frac{1}{\pi (x)} \cdot \frac{x}{(\log x)^{A}} \cdot z \ll \frac{1}{(\log x)^{A/2 - 1}}= o(1) , \end{aligned}$$

as \(x \rightarrow +\infty \). Observe that due to Lemma 3.1(viii), if \(d \le y\) then \(\ell (dk) \le x^{1/2}\). Hence, applying Lemma 3.7 and Lemma 3.5, we get that

$$\begin{aligned} E_3(x) \ll \frac{1}{\pi (x)} \cdot \frac{x}{\log x} \cdot \sum _{d \,>\, z} \frac{1}{\varphi \big (\ell (dk)\big )} = o(1) , \end{aligned}$$

as \(x \rightarrow +\infty \). Finally, using the trivial bound \(\pi (x;b,1)\le x/b\) and Lemma 3.5, we get that

$$\begin{aligned} E_4(x)&\ll \frac{1}{\pi (x)} \sum _{d \,>\, y} \left( \frac{x}{\ell (dk)} + \frac{\pi (x)}{\varphi \big (\ell (dk)\big )}\right) \ll \frac{x}{\pi (x)} \sum _{d \,>\, y} \frac{1}{\varphi \big (\ell (dk)\big )} \\&\ll \frac{\log x \log \log y}{\exp \!\left( \delta (\log y)^{1/2} (\log \log y)^{1/2} \right) } = o(1) , \end{aligned}$$

as \(x \rightarrow +\infty \). The proof is complete. \(\square \)

By the definition of \({\mathcal {R}}_k\) and by the inclusion-exclusion principle, it follows easily that

$$\begin{aligned} \#\big ({\mathcal {P}}_k \cap [1, x]\big ) = \sum _{d \,\mid \, k} \mu (d) \, \#\big ({\mathcal {R}}_{dk}(x) \cap [1,x]\big ) \end{aligned}$$

for all \(x > 0\). Therefore, by Lemma 5.1, we get that

$$\begin{aligned} {\textbf{r}}({\mathcal {P}}_k)&= \sum _{d \,\mid \, k} \mu (d) \, {\textbf{r}}({\mathcal {R}}_{dk}) = \sum _{d \,\mid \, k} \mu (d) \sum _{(e, \,dk) \,=\, 1} \frac{\mu (e)}{\varphi \big (\ell (dek)\big )} \nonumber \\&= \sum _{d \,\mid \, k} \sum _{(e,\, k) \,=\, 1} \frac{\mu (de)}{\varphi \big (\ell (dek)\big )} = \sum _{f \,=\, 1}^\infty \frac{\mu (f)}{\varphi \big (\ell (fk)\big )} , \end{aligned}$$
(7)

since every squarefree integer f can be written uniquely as \(f=de,\) where d and e are squarefree integers such that \(d\mid k\) and \(\gcd (e,k)=1\). The rearrangement of series in (7) is justified by the absolute convergence of the series of Lemma 5.1. The proof is complete.

6 Proof of the lower bound in (1) and Proposition 1.4

Recall that \({\mathcal {K}}\) is defined as the set of positive integers k such that \(\varvec{r}({\mathcal {P}}_k) > 0\). We need the following lemma.

Lemma 6.1

Let k be a positive integer such that \(10 \mid k\) and \(\varvec{r}({\mathcal {P}}_k) > 0\), and let \(p \in {\mathcal {P}}_k\). Then we have that \(kp \in {\mathcal {K}}\).

Proof

Since \(p \in {\mathcal {P}}_k\), we have that \(\gcd (p - 1, F_{p - 1}) = k\). Furthermore, since \(5 \mid k\), we have that \(p \equiv 1 \pmod 5\), and so \(z(p)\mid p-1\) and \(p \mid F_{p(p-1)}\) due to Lemma 3.1(iv) and (iii) . In particular, \(\gcd (p, F_{p(p-1)}) = p\). For the sake of brevity, put \(g := \gcd (p - 1, F_{p(p-1)})\). We shall proved that \(g = k\). First, in light of Lemma 3.1(i), we have that \(k \mid g\). Suppose that q is a prime factor of g/k. Then \(q \ne p\) and \(q \mid F_{p(p-1)} / F_{p-1}\). Furthermore, by Lemma 3.1(iii), we have that \(z(q) \mid p(p-1)\). If \(p \mid z(q)\) then, by Lemma 3.1(iv), \(p \mid q - 1\), which is impossible since \(q \le p - 1\). Thus \(p \not \mid z(q)\) and so \(z(q)\mid p-1\). In particular, by Lemma 3.1(iii), we get that \(q \mid F_{p-1}\). Hence, Lemma 3.1(ii), yields that \(q = p\), which is impossible. Therefore, we have that \(g = k\). Consequently, we get that

$$\begin{aligned} \gcd \!\big (p(p-1),F_{p(p-1)}\big ) = \gcd (p-1,F_{p(p-1)}) \, \gcd (p,F_{p(p-1)}) = kp . \end{aligned}$$

Thus \({\mathcal {A}}_{kp} \ne \varnothing \) and, by Lemma 3.2, we have that \(\gcd \!\big (\ell (kp),F_{\ell (kp)}\big )=kp\). Also, since \(2 \mid k\), we have that \(2 \mid \ell (kp)\). Hence, from Theorem 1.1 it follows that \(kp \in {\mathcal {K}}\), as desired. \(\square \)

Let us prove the lower bound of Proposition 1.4. Note that \(\ell (10)=30\) and \(\gcd (\ell (10),F_{\ell (10)})=10\) so that, by Theorem 1.1, we have that \({\textbf{r}}({\mathcal {P}}_{10})>0\). Hence, applying Lemma 6.1 with \(k = 10\), we get that

$$\begin{aligned} \#\big ({\mathcal {K}} \cap [1, x]\big ) \gg \#\big \{kp : p \in {\mathcal {P}}_k \cap [1, x/k]\big \} \gg \frac{x}{\log x} , \end{aligned}$$
(8)

which proves the lower bound.

If \(k \in {\mathcal {K}}\) then, by Theorem 1.1, we have that \(\gcd \!\big (\ell (k),F_{\ell (k)}\big ) = k\). Hence, from [11, Lemma 2.2(iii)], it follows that k belongs to \({\mathcal {A}}\). Therefore \({\mathcal {K}} \subseteq {\mathcal {A}}\). Consequently, on the one hand, by (8), we get that

$$\begin{aligned} \#\big ({\mathcal {A}} \cap [1, x]\big ) \ge \#\big ({\mathcal {K}} \cap [1, x]\big ) \gg \frac{x}{\log x} , \end{aligned}$$

for all \(x \ge 2\), which is the lower bound of (1). On the other hand, by Theorem 1.3, we get that

$$\begin{aligned} \#\big ({\mathcal {K}} \cap [1, x]\big ) \le \#\big ({\mathcal {A}} \cap [1, x]\big ) = o(x) , \end{aligned}$$

as \(x \rightarrow +\infty \), which is the upper bound of Proposition 1.4. The proofs are complete.