Math. J. Okayama Univ. 54 (2012), 1–32 SOME REMARKS ON LUCAS

Noriyuki Suwa

Abstract. We present a way of viewing Lucas pseudoprimes, Euler- Lucas pseudoprimes and strong Lucas pseudoprimes in the context of group schemes. This enables us to treat the Lucas pseudoprimalities in parallel to establish pseudoprimes, Euler pseudoprimes and strong pseudoprimes.

Introduction

Let p be a prime > 2. Then, as is well known, we have the following assertions: (1)(Fermat) If a is an prime to p, then ap 1 1 mod p; − ≡ p−1 a (2)(Euler) If a is an integer prime to p, then a 2 mod p; ≡ p (3) Put p 1 = 2sm with (m, 2) = 1. If a is an integer  prime to p, then − k either am 1 mod p or a2 m 1 mod p for some k

Mathematics Subject Classification. Primary 11Y11; Secondary 14L15. Key words and phrases. , group scheme. Partially supported by The Research on Security and Reliability in Electronic Society, Chuo University 21st Century COE Program.

1 2 NORIYUKI SUWA view these pseudoprimalities using the language of group schemes because the ideas then seem much clearer, to use a phrase at the beginning of [3, Ch.III, 6]: it is profitable to view this pseudoprime construct using the lan- guage of finite fields, not just to be fashionable, but because the ideas then seem less ad hoc. It would narrow a way to reject the language of group schemes though it is not so popular yet. We use here only elementary facts on affine group schemes, for example, the contents in the first two chapters of the introductory book [Waterhouse, 13]. The main result is stated as Theorem 3.4, and the following assertion is the key for our argument. Corollary 2.8. Let P , Q and D be non zero , and let n be an odd integer > 1 with (n,DQ) = 1 and P 2 4Q D mod n. Put − ≡ D + 2Q P ξ = , U(D)(Z/nZ). 2Q 2Q ∈   Then: n ε(n) (1) n is a with respect to (P,Q) if and only if ξ − = I in U(D)(Z/nZ); (2) n is an Euler-Lucas pseudoprime with respect to (P,Q) if and only if Q n−ε(n) Q n−ε(n) either = 1 and ξ 2 = I, or = 1 and ξ 2 = I in n n − − U(D)(Z/nZ);   (3) n is a strong Lucas pseudoprime with respect to (P,Q) if and only if k ξm = I or ξ2 m = I for some k

Section 6. For example, the following assertion would reveal a part of inter- esting relations among various pseudoprimalities, some of which Grantham investigated in [5]. Proposition 6.7. Let P , Q be integers = 0 with D = P 2 4Q not a square, and let n be an odd composite with6 (n,DQ) = 1. Assume− that n is a with respect to (P,Q). Then n is an Euler pseudoprime to base Q if and only if n is an Euler-Lucas pseudoprime with respect to (P,Q). It would be worth while to verify in our context the probable prime tests proposed by Kida [7], to examine the deterministic prime tests proposed by Gurevich-Kunyavskii [6] and to analyze the Frobenius pseudoprimalities defined by Grantham [4], [5]. We refer to original papers [1], [2], [4], [5], [15] and monographs [3], [11] for further topics on the Lucas pseudoprimalities, for example, the distribution of Lucas pseudoprimes and the accuracy of probable prime tests related with the Lucas pseudoprimalities. Notation a For a positive odd integer n and an integer a prime to n, denotes n the .  

Gm,Z: the multiplicative group scheme over Z GD, U(D): defined in 2.1 B˜ℓpsp(n, D), B˜eℓpsp(n, D), B˜sℓpsp(n, D): defined in 3.3 Bpsp(n), Bepsp(n), Bspsp(n): defined in [9] and recalled in 3.7 For a group scheme G and a commutative ring R, G(R) denotes the group of R-valued points of G. In particular, R× = Gm(R) stands for the multiplicative group of invertible elements of R.

1. Recall: Lucas pseudoprimalities

In the section, we fix non-zero integers P , Q with P 2 4Q = 0 and put D = P 2 4Q. − 6 − Definition 1.1. Let P , Q be integers = 0, and put D = P 2 4Q. We assume that D = 0. Let α, β denote the6 roots of the quadratic− equation 2 6 t Pt + Q = 0. We define sequences Un n 0 and Vn n 0 by − { } ≥ { } ≥ αn βn U = U (P,Q)= − ,V = V (P,Q)= αn + βn. n n α β n n − The sequence Un n 0, Vn n 0 are called Lucas sequences associated to (P,Q). { } ≥ { } ≥ The following assertions are verified immediately from the definition. 4 NORIYUKI SUWA

(1) U = 0, U = 1, U PU + QU = 0, V = 2, V = P , V 0 1 n+2 − n+1 n 0 1 n+2 − PVn+1 + QVn = 0. (2) V 2 DU 2 = 4Qn. n − n (3) 2Vn+m = VnVm + DUnUm, 2Un+m = UnVm + VnUm. In particular, 1 (4) V = (V 2 + DU 2)= V 2 2Qn = DU 2 + 2Qn, U = U V . 2n 2 n n n − n 2n n n Moreover, the following assertion is concluded readily from the recurrence relations (1): (5) Let p be a prime, and assume that p Q. If p P , then p U and p V | | | n | n for any n > 1. On the other hand, if p ∤ P , then p ∤ Un and p ∤ Vn for any n 1. ≥ Lemma 1.2. Let n be an odd integer > 1 with (n, D) = 1. If there exists k > 1 such that U 0 mod n, then n is prime to Q. k ≡ Proof. Assume that (n,Q) > 1. Let p be a prime of (n,Q). By 1.1(5), if p ∤ P , then p ∤ Uk for any k > 1, which is a contradiction to the assumption. On the other hand, if p P , then p D, which is a contradiction to (n, D) = 1. | | The following statement is well known. Theorem 1.3. Let p be a prime > 2 with p ∤ DQ. Then: D (1) If = 1, then Up 1 0 mod p and Vp 1 2 mod p. Furthermore, p − ≡ − ≡   Q U p−1 0 mod p if and only if = 1. Moreover, V p−1 0 mod p if 2 ≡ p 2 ≡ Q   and only if = 1. p − D   (2) If = 1, then U 0 mod p and V 2Q mod p. Fur- p − p+1 ≡ p+1 ≡   Q thermore, U p+1 0 mod p if and only if = 1. Moreover, V p+1 0 2 ≡ p 2 ≡ Q   mod p if and only if = 1. p −   Notation 1.4. For an odd integer n > 1 with (n, D) = 1, we put ε(n) = D . n Definition 1.5.([2, sec.1]) An odd composite n is called a Lucas pseudo- prime with respect to (P,Q) if (n, D)=1 and Un ε(n) 0 mod n. − ≡ LUCASPSEUDOPRIMES 5

By Lemma 1.2, if n is a Lucas pseudoprime with respect to (P,Q), then n is prime to Q. Definition 1.6.([2, sec.3]) An odd composite n is called an Euler-Lucas Q pseudoprime with respect to (P,Q) if (n,DQ) = 1 and either = 1, n Q   U n−ε(n) 0 mod n or = 1, V n−ε(n) 0 mod n. 2 ≡ n − 2 ≡ By the formula (4) in 1.1 and Lemma 1.2, we obtain the following asser- tion: Proposition 1.7. If n is an Euler-Lucas pseudoprime with respect to (P,Q), then n is a Lucas pseudoprime with respect to (P,Q). Lemma 1.8. Let p be a prime > 2 and p ∤ D. Let p ε(p) = 2sm with − (m, 2) = 1.Then U 0 mod p or V k 0 mod p for some k 1 with (n,Q) = 1. Assume that D is a square. Then there exists a Z such that βa α mod n. Fur- thermore, if n is a Lucas pseudoprime (resp.∈ an Euler-Lucas≡ pseudoprime, a strong Lucas pseudoprime) with respect to (P,Q), then n is a pseudoprime (resp. an Euler pseudoprime, a ) to base a. Proof. By the assumption, we have (α, n) = (β,n) = 1 since αβ = Q. To verify the last statement, it is sufficient to note that

U 0 mod n αk βk mod n ak 1 mod n; k ≡ ⇔ ≡ ⇔ ≡ V 0 mod n αk βk mod n ak 1 mod n. k ≡ ⇔ ≡− ⇔ ≡−

2. Group schemes GD, U(D) and G(D)

Throughout the sections hereafter, we fix a non-zero integer D. For an D odd integer n prime to D, we put ε(n)= . We adopt standard notations n in [13] concerning to affine group schemes.  6 NORIYUKI SUWA

Definition 2.1. Let D Z, and put ∈ A = Z[t]/(t2 D), D − 1 G = G = Spec Z[X,Y, ]. D m,AD X2 DY 2 AYD/Z − The group law of GD is given by ∆ : (X,Y ) (X X + DY Y, X Y + Y X), 7→ ⊗ ⊗ ⊗ ⊗ ε : (X,Y ) (1, 0), 7→ X Y S : (X,Y ) , − . 7→ X2 DY 2 X2 DY 2 − − Furthermore, a homomorphism of affine group schemes 1 1 Nr : G = Spec Z[X,Y, ] G = Spec Z[T, ] D X2 DY 2 → m,Z T − is defined by 1 1 T X2 DY 2 : Z[T, ] Z[X,Y, ]. 7→ − T → X2 DY 2 − Put now U(D) = Ker[Nr : G G ]. More precisely, D → m,Z U(D) = Spec Z[X,Y ]/(X2 DY 2 1), − − and the group law of U(D) is given by ∆ : (X,Y ) (X X + DY Y, X Y + Y X), 7→ ⊗ ⊗ ⊗ ⊗ ε : (X,Y ) (1, 0), 7→ X Y S : (X,Y ) , − . 7→ X2 DY 2 X2 DY 2 − − 1  The group scheme U(D) is a torus over Z[ ]. 2D 1 In fact, put A = Z[√D, ]. Then an isomorphism of group schemes 2D over A 1 U(D) = Spec A[X,Y ]/(X2 DY 2 1) ∼ G = Spec A[U, ] A − − → m,A U is given by 1 U X + √DY : A[U, ] A[X,Y ]/(X2 DY 2 1). 7→ U → − − Furthermore the sequence of group schemes 0 U(D) G Nr G 0 −→ −→ D −→ m,Z −→ LUCASPSEUDOPRIMES 7 1 is exact over Z[ ]. 2D For the convenience, here is given a more concrete description of 2.1. 2.2. Let R be a commutative ring. Then we have 2 2 2 2 G (R) = (R[t]/(t D))× = (a, b) R ; a Db is invertible in R , D − { ∈ − } and the multiplication of GD(R) is given by

(a, b)(a′, b′) = (aa′ + Dbb′, ab′ + a′b).

The unit of GD(R) is given by (1, 0), and we have

1 a b (a, b)− = , . a2 Db2 −a2 Db2 − − Furthermore, for η = (a, b) G (R), we have  ∈ D Nr(η)= a2 Db2, − and 2 2 2 U (R) = Ker[Nr : G (R) G (R)= R×]= (a, b) R ; a Db = 1 . D D → m { ∈ − } Notation 2.3. Let R be a commutative ring. We shall denote the unit (1, 0) U(D)(R) G (R) by I. For η = (a, b) G (R) and c R , we ∈ ⊂ D ∈ D ∈ × denote (ca, cb) GD(R) by cη. In particular, ( a, b) GD(R) is denoted by η. ∈ − − ∈ − Let ξ U(D)(R) and c R . Then cξ U(D)(R) if and only if c2 = 1. ∈ ∈ × ∈ 2.4. The correspondence c cI defines an embedding of multiplicative 27→ groups iR : R× (R[t]/(t D))×. The map iR is represented by the homomorphism of→ group schemes− 1 1 i : G = Spec Z[T, ] G = Spec Z[X,Y, ] m,Z T → D X2 DY 2 − defined by 1 1 (X,Y ) (T, 0) : Z[X,Y, ] Z[T, ]. 7→ X2 DY 2 → T − A homomorphism of group schemes 1 γ : G = Spec Z[X,Y, ] U(D) = Spec Z[X,Y ]/(X2 DY 2 1) D X2 DY 2 → − − − is defined by X2 + DY 2 2XY (X,Y ) , : 7→ X2 DY 2 X2 DY 2  − −  1 Z[X,Y ]/(X2 DY 2 1) Z[X,Y, ]. − − → X2 DY 2 − 8 NORIYUKI SUWA

The sequence of group schemes i γ 0 G G U(D) 0 −→ m,Z −→ D −→ −→ 1 is exact over Z[ ]. Furthermore the composite of the embedding U(D) 2D → GD and γ : GD U(D) is the square map. → 1 An endomorphism σ of group schemes G = Spec Z[X,Y, ] is D X2 DY 2 defined by − 1 1 (X,Y ) (X, Y ) : Z[X,Y, ] Z[X,Y, ]. 7→ − X2 DY 2 → X2 DY 2 − − Let R be a ring and η = (a, b) GD(R). Then we have σ(η) = (a, b). By convention we denote σ(η) also∈ byη ¯. It is readily seen that ηη¯ = Nr(η−) I. Furthermore, we have 2 2 a + Db 2ab 1 2 1 γ(η)= , = Nr(η)− η = ηη¯− . a2 Db2 a2 Db2  − −  Lemma 2.5. Let R be a commutative ring and η GD(R). Then: (1) γ(η)= I if and only if η¯ = η. ∈ (2) γ(η)= I if and only if η¯ = η. − − 1 Proof. The assertion is a direct consequence of the formula γ(η)= ηη¯− . Example 2.6. Let P , Q be integers = 0 with D = P 2 4Q = 0. Let 6 − 6 Un n 0, Vn n 0 denote the Lucas sequences associated to (P,Q). Then { } ≥ { } ≥ V U 1 k , k G (Z[ ]) 2 2 ∈ D 2Q   since V 2 DU 2 = 4Qk. Moreover, we have k − k V U V U V U k , k l , l = k+l , k+l 2 2 2 2 2 2 1      in G (Z[ ]). In particular, D 2Q V U V U k P 1 k k , k = 1 , 1 = , . 2 2 2 2 2 2 Furthermore, we have      V U V 2 + DU 2 2V U V U γ k , k = k k , k k = 2k , 2k , 2 2 4Qk 4Qk 2Qk 2Qk       and therefore, V U V U k D + 2Q P k 2k , 2k = 2 , 2 = , 2Qk 2Qk 2Q 2Q 2Q 2Q       LUCASPSEUDOPRIMES 9 1 in U(D)(Z[ ]). 2Q Lemma 2.7. Let P , Q and D be integers = 0, and let n be an odd integer > 1 with (n,Q) = 1 and P 2 4Q D mod6 n. Put − ≡ D + 2Q P ξ = , U(D)(Z/nZ). 2Q 2Q ∈   Then: (1) U 0 mod n if and only if ξk = I in U(D)(Z/nZ); k ≡ (2) V 0 mod n if and only if ξk = I in U(D)(Z/nZ). k ≡ − Proof. Put η = (P/2, 1/2) GD(Z/nZ). Then we have ξ = γ(η). Combin- ∈ k ing Lemma 2.5 and the equality η = (Vk/2,Uk/2) in GD(Z/nZ), we can obtain the result. Corollary 2.8. Under the notation above, we assume that (n,DQ) = 1. Then: n ε(n) (1) n is a Lucas pseudoprime with respect to (P,Q) if and only if ξ − = I in U(D)(Z/nZ); (2) n is an Euler-Lucas pseudoprime with respect to (P,Q) if and only if Q n−ε(n) Q n−ε(n) either = 1 and ξ 2 = I or = 1 and ξ 2 = I in n n − − U(D)(Z/nZ);   (3) n is a strong Lucas pseudoprime with respect to (P,Q) if and only if either k ξm = I or ξ2 m = I for some k