Greatest common divisors of shifted primes and Fibonacci numbers

Let $(F_n)$ be the sequence of Fibonacci numbers and, for each positive integer $k$, let $\mathcal{P}_k$ be the set of primes $p$ such that $\gcd(p - 1, F_{p - 1}) = k$. We prove that the relative density $\text{r}(\mathcal{P}_k)$ of $\mathcal{P}_k$ exists, and we give a formula for $\text{r}(\mathcal{P}_k)$ in terms of an absolutely convergent series. Furthermore, we give an effective criterion to establish if a given $k$ satisfies $\text{r}(\mathcal{P}_k)>0$, and we provide upper and lower bounds for the counting function of the set of such $k$'s. As an application of our results, we give a new proof of a lower bound for the counting function of the set of integers of the form $\gcd(n, F_n)$, for some positive integer $n$. Our proof is more elementary than the previous one given by Leonetti and Sanna, which relies on a result of Cubre and Rouse.


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, Luca, Pomerance, and Shparlinski [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 A k := {n ≥ 1 : gcd(n, F n ) = k}, Recall that the natural density d(S) of a set of positive integers S is defined as the limit of the ratio # S ∩ [1, x] /x as x → +∞, whenever this limit exists. Sanna and Tron [18] proved that each 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 ≡ ±1 (mod 5). For each integer k ≥ 1, define the following set of prime numbers Recall that the relative density r(P) of a set of prime numbers P is defined as the limit of the ratio #(P ∩ [1, x])/π(x) as x → +∞, whenever this limit exists, where π(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 ℓ(m) = lcm m, z(m) .
Our first result establishes the existence of the relative density of 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 P k exists. Moreover, if gcd ℓ(k), F ℓ(k) = k, or if 2 ∤ ℓ(k) and ℓ(pk) = 2 ℓ(k) for some prime number p with p ∤ k, then P k ⊆ {2}. Otherwise, we have that r(P k ) > 0.
Our second result gives an explicit expression for the relative density of P k in terms of an absolutely convergent series. Theorem 1.2. For each positive integer k, the relative density of P k is where µ is the Möbius function, ϕ 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 A := {gcd(n, F n ) : n ≥ 1}.
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 K be the set of positive integers k such that r(P k ) > 0. We have the following upper and lower bounds for the counting function of K.
We remark that both Theorem 1.1 and Theorem 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 ≥ 2, where a 1 , a 2 are nonzero 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 P (s) k := {p : gcd(p + s, F p+s ) = k}, for integers k ≥ 1 and s. CrypTO, the group of Cryptography and Number Theory of Politecnico di Torino.

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 ≤ y, let x, y := [x, y] ∩ N. For vectors x = (x 1 , . . . , x d ) and y = (y 1 , . . . , y d ) in N d , let x := x 1 · · · x d , x, y := x 1 , y 1 × · · · × x d , y d , xy := (x 1 y 1 , . . . , x d y d ), and x/y := (x 1 /y 1 , . . . , x d /y d ). Let 0, respectively 1, be the vector of N d with all components equal to 0, respectively 1. For every For all positive integers a 0 , . . . , a k , let Q(a 0 , . . . , a k ) be the set of primes p such that p ≡ 1 (mod a 0 ) and p ≡ 1 (mod a i ) for every i ∈ 1, k .
Theorem 2.2. Let a 0 , . . . , a k be positive integers with a 0 | a i for each i ∈ 1, k . Then the relative density of Q := Q(a 0 , . . . , a k ) exists and satisfies Proof. We generalize the proof of [10, Theorem 1.2], which corresponds to the special case a 0 = 1. Let L := lcm(a 0 , . . . , a k ) = p e 1 1 · · · p e d d where p 1 < · · · < p d are primes and e 1 , . . . , e d are positive integers. Also, let S be the set of integers n ∈ [1, L] such that: gcd(n, L) = 1, n ≡ 1 (mod a 0 ), and n ≡ 1 (mod a i ) for every i ∈ 1, k . By Dirichlet's theorem on primes in arithmetic progressions, we have that Hence, the relative density of Q exists. Let us give a lower bound on #S. First, assume that 8 ∤ L. Let g j be a primitive root modulo p e j j , for each j ∈ 1, d . Note that g 1 exists when . By the Chinese remainder theorem, each n ∈ 1, ℓ with gcd(n, L) = 1 is uniquely determined by a vector y(n) = (y 1 (n), . . . , y d (n)) ∈ 1, b such that n ≡ g and let X be defined as in Lemma 2.1. At this point, it follows easily that n ∈ S if and only if y(n) ≡ 0 (mod a 0 ) and y(n) ≡ 0 (mod a i ) for each i ∈ 1, k . Therefore, the map n → y(n)/a 0 is a bijection S → X and, consequently, #S = #X . Since d = ϕ(L)/ϕ(a 0 ), c i = ϕ(a i )/ϕ(a 0 ), c 1 · · · c k ≡ 0 (mod d), and d ≡ 0 (mod c i ) for each i ∈ 1, k , we can apply Lemma 2.1, which gives a lower bound on #X , that is, on #S. Then (3) and the lower bound on #S yield (2). Now let us consider the case in which 8 | L. This is a bit more involved since there are no primitive roots modulo 2 e , for every integer e ≥ 3. However, the previous arguments still work by changing a i and b with . Then each n ∈ 1, ℓ with gcd(n, L) = 1 is uniquely determined by a vector y(n) = (y 0 (n), . . . , y d (n)) ∈ 1, b such that n ≡ (−1) y 0 (n) 5 y 1 (n) (mod 2 e 1 ) and n ≡ g  Proof. If there exists an integer i ≥ 1 such that a i = a 0 , or a i = 2a 0 and a 0 is odd, then it follows easily that Q ⊆ {2} and, consequently, r(Q) = 0. Hence, assume that no such integer i exists. In particular, we have that ϕ(a 0 ) < ϕ(a i ) for every integer i ≥ 1. From Theorem 2.2 we know that, for every integer k ≥ 1, the relative density of Q k := Q(a 0 , . . . , a k ) exists and where the infinite product converges to a positive number since i ≥ 1 1/ϕ(a i ) converges and ϕ(a 0 )/ϕ(a i ) < 1 for every integer i ≥ 1. Furthermore, for each ε > 0 and for every sufficiently large positive integer k = k(ε), we have that lim sup Therefore, the relative density of Q exists and, in fact, r(Q) = r > 0.

Proof. From Lemma 3.4 it follows that
for all t ≫ δ 1. By partial summation, we obtain that n ≥ y log log n ℓ(n) = S(y) log log y + +∞ y S(t) t log t dt Then, since ϕ(n) ≫ n/log log n (see, e.g., [22,Chapter I.5,Theorem 4]) and ℓ(n) ≤ 2n 2 (Lemma 3.1(viii)) for all positive integers n, we have that The claim follows.
For every x > 0 and for all integers a and b, let π(x; b, a) be the number of primes p ≤ x such that p ≡ a (mod b), and put also ∆(x; b, a) := π(x; b, a) − π(x) ϕ(b) .
We need the following bounds for ∆(x; b, a).
Theorem 3.6 (Siegel-Walfisz). For every A > 0, we have, for all x ≫ A 1 and for all relatively prime positive integers a, b with b ≤ (log x) for all x ≥ 2 and for all relatively prime positive integers a, b with b ≤ x 1−ε .
Proof. From the Brun-Titchmarsh theorem [22,Theorem 9] we know that for all b < x. Hence, the condition b ≤ x 1−ε and the upper bound π(x) ≪ x/ log x yield that as desired.

Proof of Theorem 1.1
Let k be a positive integer. If P k = ∅ then, obviously, the relative density of P k exists and is equal to zero. Hence, suppose that P k = ∅. In particular, A k = ∅, since p − 1 ∈ A k for every p ∈ P k . Therefore, by Lemma 3.2, we have that gcd ℓ(k), F ℓ(k) = k. Recall the definition of Q(a 0 , a 1 , . . . ) given before Corollary 2.3. Define the sequence M k = m 0 , m 1 , . . . where m 0 < m 1 < . . . are all the elements of ℓ(k) ∪ p ℓ(k) : p | k ∪ ℓ(pk) : p ∤ k .
Then, from Lemma 3.3 and the definition of Q(M k ), it follows that P k = Q(M k ). Furthermore, by Lemma 3.5, we have that Hence, thanks to Corollary 2.3, we get that the relative density of P k exists and, in particular, r(P k ) = 0 if and only if P k ⊆ {2} if and only if there exists an integer i ≥ 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 M k is increasing. The second case is equivalent to 2 ∤ ℓ(k) and either p ℓ(k) = 2 ℓ(k), for some prime number p with p | k, or ℓ(pk) = 2 ℓ(k), for some prime number p with p ∤ k. In turn, since k | ℓ(k), this is equivalent to 2 ∤ ℓ(k) and ℓ(pk) = 2 ℓ(k) for some prime number p with p ∤ k. The proof is complete.
for all x > 0. Furthermore, by Lemma 3.1(iii), given a positive integer d that is relatively prime with k, we have that ̺(p, d) = 1 and lcm(d, ℓ(k)) | p − 1 if and only if lcm(z(d), d, ℓ(k)) | p − 1, which in turn is equivalent to p − 1 being divisible by where we used Lemma 3.1(vi) and the fact that d and k are relatively prime. Hence, we get that for all x > 0. Therefore, from (5) and (6), it follows that for all x > 0. Pick any A > 2. Also, set y := x 1/4 / √ 2k and z := (log for all x > 0, where, by Lemma 3.5, the infinite series converges absolutely, while It remains only to prove that E 1 (x), E 2 (x), E 3 (x), E 4 (x) go to zero as x → +∞. From Lemma 3.5 it follows that as x → +∞. Note that, thanks to Lemma 3.1(viii), if d ≤ z then ℓ(dk) ≤ (log x) A . Hence, from Theorem 3.6, we get that (1), as x → +∞. Observe that due to Lemma 3.1(viii), if d ≤ y then ℓ(dk) ≤ x 1/2 . Hence, applying Lemma 3.7 and Lemma 3.5, we get that as x → +∞. Finally, using the trivial bound π(x; b, 1) ≤ x/b and Lemma 3.5, we get that ≪ log x log log y exp(δ(log y) 1/2 (log log y) 1/2 ) = o (1), The proof is complete.
By the definition of R k and by the inclusion-exclusion principle, it follows easily that for all x > 0. Therefore, by Lemma 5.1, we get that since every squarefree integer f can be written uniquely as f = de, where d and e are squarefree integers such that d | 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 We need the following lemma.
Lemma 6.1. Let k be a positive integer such that 10 | k and r(P k ) > 0, and let p ∈ P k . Then we have that kp ∈ K.
Let us prove the lower bound of Proposition 1.4. Note that ℓ(10) = 30 and gcd(ℓ(10), F ℓ(10) ) = 10 so that, by Theorem 1.1, we have that r(P 10 ) > 0. Hence, applying Lemma 6.1 with k = 10, we get that which proves the lower bound. If k ∈ K then, by Theorem 1.1, we have that gcd ℓ(k), F ℓ(k) = k. Hence, from [11, Lemma 2.2(iii)], it follows that k belongs to A. Therefore K ⊆ A. Consequently, on the one hand, by (8), we get that for all x ≥ 2, which is the lower bound of (1). On the other hand, by Theorem 1.3, we get that # K ∩ [1, x] ≤ # A ∩ [1, x] = o(x), as x → +∞, which is the upper bound of Proposition 1.4. The proofs are complete.