1 Introduction
Throughout this note, for positive integers a and b, we let $\{U_n\}_{n\ge 0}$ be the Lucas sequence of the first kind [6] defined by
The sequence $\{U_n\}_{n\ge 0}$ is periodic modulo any prime p with $\gcd (p,b)=1$ , and we denote by $\pi (p):=\pi _{(a,b)}(p)$ the length of the period of $\{U_n\}_{n\ge 0}$ modulo p.
We define an $(a,b)$ -Wall–Sun–Sun prime to be a prime p such that
An $(a,1)$ -Wall–Sun–Sun prime is also known in the literature as an a-Wall–Sun–Sun prime [10] or an a-Fibonacci–Wieferich prime. Note that when $(a,b)=(1,1)$ , the sequence $\{U_n\}_{n\ge 0}$ is the well-known Fibonacci sequence. In this case, such primes are referred to simply as Wall–Sun–Sun primes [Reference Crandall, Dilcher and Pomerance3, 10] or Fibonacci–Wieferich primes [11]. However, at the time this note was written, no Wall–Sun–Sun primes were known to exist. The existence of Wall–Sun–Sun primes was first investigated by Wall [Reference Wall9] in 1960, and subsequently studied by the Sun brothers [Reference Sun and Sun8], who showed that the first case of Fermat’s last theorem is false for exponent p only if p is a Wall–Sun–Sun prime.
For an a-Wall–Sun–Sun prime p, it can be shown [Reference Elsenhans and Jahnel4, Reference Jones5] that the following conditions are equivalent:
-
(1) $\pi (p^2)=\pi (p)$ ;
-
(2) $U_{\pi (p)}\equiv 0 \pmod {p^2}$ ;
-
(3) $U_{p-\delta _p}\equiv 0 \pmod {p^2}$ , where $\delta _p$ is the Legendre symbol $\big(\frac{a^2\, {+}\ 4}{p}\big)$ .
Because of this equivalence, various authors have chosen to use either item (2) or item (3) for the definition of an a-Wall–Sun–Sun prime. However, for the more general $(a,b)$ -Wall–Sun–Sun prime p, it turns out that, while item (1) implies the still-equivalent items (2) and (3), the converse is false in general. For example, with $(a,b)=(5,8)$ and $p=7$ , an easy calculation shows that items (2) and (3) are true, but item (1) is false since $\pi (49)=42$ and $\pi (7)=6$ . Because of this phenomenon, and the fact that Wall [Reference Wall9] was originally concerned with the impossibility of item (1) in the Wall–Sun–Sun situation, we have chosen to adopt (1.2) as our definition of an $(a,b)$ -Wall–Sun–Sun prime.
This note is motivated in part by recent results of Bouazzaoui [Reference Bouazzaoui1, Reference Bouazzaoui2] which show, under certain restrictions on a, b and p, that an odd prime p is an $(a,b)$ -Wall–Sun–Sun prime if and only if ${\mathbb Q}(\sqrt {a^2+4b})$ is not p-rational. We recall that a number field K is p-rational if the Galois group of the maximal pro-p-extension of K which is unramified outside p is a free pro-p-group of rank $r_2 + 1$ , where $r_2$ is the number of pairs of complex embeddings of K.
A second motivation for this note is recent work of the second author which, again under certain restrictions on a and p, establishes a connection between $(a,1)$ -Wall–Sun–Sun primes p and the monogenicity of certain power-compositional trinomials [Reference Jones5].
One restriction imposed on p in the work of these motivational articles is that $a^2+4b\not \equiv 0\pmod {p}$ . In this note, our focus is on primes p that divide $a^2+4b$ , and in this case, we provide necessary and sufficient conditions so that p is an $(a,b)$ -Wall–Sun–Sun prime. More precisely, we prove the following result.
Theorem 1.1. Let a and b be positive integers and let p be a prime divisor of $a^2+4b$ such that $\gcd (p,b)=1$ . Let $(a,b)_{m}:=(a \ \mathrm {mod}\ m,b \ \mathrm {mod}\ m)$ . Then
-
• $p=2$ is an $(a,b)$ -Wall–Sun–Sun prime if and only if $(a,b)_4=(0,1)$ ;
-
• $p=3$ is an $(a,b)$ -Wall–Sun–Sun prime if and only if
$$ \begin{align*}(a,b)_9\in \{(1,8),(2,5),(4,2),(5,2),(7,5),(8,8)\};\end{align*} $$ -
• $p\ge 5$ is never an $(a,b)$ -Wall–Sun–Sun prime.
2 Proof of Theorem 1.1
Note that the sequence $\{U_n\}_{n\ge 0}$ from (1.1) is explicitly
We let $\{U_n\}_p$ denote the sequence (2.1) modulo the prime p.
We first address the prime $p=2$ . Since $a^2+4b\equiv 0 \pmod {2}$ , it follows that ${a\equiv 0 \pmod {2}}$ . Then, since $\gcd (p,b)=1$ , we see from (2.1) that
Thus, $\pi (2)=2$ and $\pi (4)=2$ if and only if $(a,b)_4=(0,1)$ , which finishes the case ${p=2}$ .
Next, let $p=3$ . Since $a^2+4b\equiv 0 \pmod {3}$ , we see that $a^2\equiv -b \pmod {3}$ . Since $\gcd (3,b)=1$ , we deduce that $b\equiv 2 \pmod {3}$ and $a^2\equiv 1 \pmod {3}$ . Hence, from (2.1),
where $a\equiv 1,2 \pmod {3}$ . We conclude that
Observe that $\pi (9)=3$ if and only if
Since $b \ \mathrm {mod}\ 9\in \{2,5,8\}$ , it follows that
If $\pi (9)=6$ , then
which implies that $a^2+b\equiv 0\pmod {9}$ , since $a^2+b\equiv 0 \pmod {3}$ and $\gcd (3,b)=1$ . Hence, from (2.1), we have that
where $a^2b^2\equiv 1 \pmod {9}$ . Thus,
since we are assuming that $\pi (9)\ne 3$ . Consequently,
Recall that $b\equiv 2 \pmod {3}$ . Then, for each $b\ \mathrm {mod}\ 9\in \{2,5,8\}$ , solving (2.2) for a yields
which completes the proof when $p=3$ .
Finally, suppose that $p\ge 5$ . Since
we show that $U_{\pi (p)}\not \equiv 0 \pmod {p^2}$ to establish that p is not an $(a,b)$ -Wall–Sun–Sun prime.
We claim that, for $n\ge 0$ ,
The proof is by induction on n. The claim is easily verified when $n\in \{0,1,2\}$ . Since p divides $a^2+4b$ , we see that $p^2$ divides $(a^2+4b)^2=a^4+8a^2b+16b^2$ . It follows that
Suppose that the claim holds for all $n\leq t$ for some even integer t. Then, modulo $p^2$ ,
and
which establishes the claim.
For brevity of notation, we let $\lambda $ denote the order of $2^{-1}a$ modulo p. Then, since $\gcd (p,b)=1$ , it follows that $\pi (p)=p\lambda $ [Reference Renault7, Theorem 3(c)]. Since $\lambda $ divides $p-1$ , it follows that $\gcd (p,\lambda )=1$ . To finish the proof, we must show that $U_{\pi (p)}\not \equiv 0 \pmod {p^2}$ . We use (2.3).
If $\lambda \equiv 0 \pmod {2}$ , then modulo $p^2$ ,
Since $p\not \in \{2,3\}$ and does not divide a, b or $\lambda $ , if $U_{p\lambda }\equiv 0\pmod {p^2}$ , then p divides $a^2+10b$ . However, since p divides $a^2+4b$ , it follows that
completing the proof in this case.
Suppose now that $\lambda \equiv 1 \pmod {2}$ . Then, modulo $p^2$ ,
Reasoning as in the previous case, we see that $U_{p\lambda }\equiv 0 \pmod {p^2}$ if and only if ${a^2+28b\equiv 0 \pmod {p}}$ . However, since $a^2+4b\equiv 0\pmod {p}$ , it follows that
which completes the proof of the theorem.
Acknowledgement
The authors thank the anonymous referee for the suggestions that helped to improve the paper.