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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn1.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn2.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn3.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu3.png?pub-status=live)
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),
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu4.png?pub-status=live)
where
$a\equiv 1,2 \pmod {3}$
. We conclude that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu5.png?pub-status=live)
Observe that
$\pi (9)=3$
if and only if
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu6.png?pub-status=live)
Since
$b \ \mathrm {mod}\ 9\in \{2,5,8\}$
, it follows that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu7.png?pub-status=live)
If
$\pi (9)=6$
, then
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu8.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu9.png?pub-status=live)
where
$a^2b^2\equiv 1 \pmod {9}$
. Thus,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn4.png?pub-status=live)
since we are assuming that
$\pi (9)\ne 3$
. Consequently,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu10.png?pub-status=live)
Recall that
$b\equiv 2 \pmod {3}$
. Then, for each
$b\ \mathrm {mod}\ 9\in \{2,5,8\}$
, solving (2.2) for a yields
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu11.png?pub-status=live)
which completes the proof when
$p=3$
.
Finally, suppose that
$p\ge 5$
. Since
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu12.png?pub-status=live)
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$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn5.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqn6.png?pub-status=live)
Suppose that the claim holds for all
$n\leq t$
for some even integer t. Then, modulo
$p^2$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu13.png?pub-status=live)
and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu14.png?pub-status=live)
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$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu15.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu16.png?pub-status=live)
completing the proof in this case.
Suppose now that
$\lambda \equiv 1 \pmod {2}$
. Then, modulo
$p^2$
,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu17.png?pub-status=live)
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
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20231106145747981-0309:S0004972723000138:S0004972723000138_eqnu18.png?pub-status=live)
which completes the proof of the theorem.
Acknowledgement
The authors thank the anonymous referee for the suggestions that helped to improve the paper.