Union College Union | Digital Works

Honors Theses Student Work

6-2016 Primality Proving Based on Eisenstein Miaoqing Jia Union College - Schenectady, NY

Follow this and additional works at: https://digitalworks.union.edu/theses Part of the Applied Mathematics Commons, Logic and Foundations of Mathematics Commons, and the Mathematics Commons

Recommended Citation Jia, Miaoqing, "Primality Proving Based on Eisenstein Integers" (2016). Honors Theses. 162. https://digitalworks.union.edu/theses/162

This Open Access is brought to you for free and open access by the Student Work at Union | Digital Works. It has been accepted for inclusion in Honors Theses by an authorized administrator of Union | Digital Works. For more information, please contact [email protected]. Primality Proving Based on Eisenstein Integers

By Miaoqing Jia

********* Submitted in partial fulfillment of the requirements for Honors in the Department of Mathematics

UNION COLLEGE June 2016 Miaoqing Jia

Abstract

Jia, Miaoqing Primality Proving Based on Eisenstein Integers. Department of Mathematics, June 2016 Advisor: Kathryn Lesh

According to the Berrizbeitia theorem, a highly ecient method for certifying the pri- mality of an N 1 mod 3 can be created based on pseudocubes in the ordinary ” p q integers Z. In 2010, Williams and Wooding moved this method into the Eisenstein integers

Z ! and defined a new term, Eisenstein pseudocubes. By using a precomputed table of r s Eisenstein pseudocubes, they created a new algorithm in this context to prove primality of integers N 1 mod 3 in a shorter period of time. We will look at the Eisenstein ” p q pseudocubes and analyze how this new algorithm works with the Berrizbeitia theorem.

i CONTENTS Miaoqing Jia

Contents

1 Introduction 1

2 Unique 3

3 The Eisenstein Integers 7

4CubicReciprocity 12

5 Congruence Criteria for Eisenstein Pseudocubes 21

6 Eisenstein Pseudocubes and Primality Testing 30

ii Miaoqing Jia

1 Introduction

This paper introduces an improved primality test with Eisenstein Pseudocubes created by Wooding and Williams [10]. A primality test is an algorithm that is used to determine whether or not an integer N is prime. In this paper, we focus on integers N that are congruent to 1 mod 3. The subject of primality testing is important because public key cryptosystems, in par- ticular the RSA cryptosystem, depend heavily on the use of prime numbers in their keys. The RSA cryptosystem, designed by Ron Rivest, Adi Shamir, and Leonard Adleman [6], is one of the first practical public-key cryptosystems and is still widely used for secure data transmission. The RSA algorithm involves a public key and a private key for encrypting and decrypting messages. As indicated in the meaning of the words, the public key is known by everyone and is used for encrypting messages. An encrypted message can only be decrypted in a reasonable amount of time using the private key. In the RSA cryptosystem, the public key consists of the modulus n,whichistheproduct of two distinct secret primes p and q, and the public exponent e. The private key consists of the same modulus n and the private exponent d,whichisdeterminedusingthesecret values of p and q. Suppose there are two people, Alice and Bob. Bob would like to send a message to Alice by using the public key provided by Alice, n and e.Ifp and q are easily- guessed primes, then someone else will be able to figure out the values of p and q and thus decrypt the message. Therefore, in order to ensure the security of the RSA cryptosystem, it is necessary for Alice to use large, randomly-chosen prime numbers p and q. Instead of choosing a from a list of all prime numbers, cryptographers generate a random integer N and apply primality testing to determine whether or not N is prime. Thus, primality testing plays a significant role in the creation of the encryption and decryption keys. The most common used primality tests are probabilistic tests, which can determine that a random integer is definitely not prime, or estimate the probability that it is. The Miller- Rabin [5] and the Solovay-Strassen [7] tests are two typical probabilistic primality tests. The algorithm for the Miller-Rabin primality test proceeds as follows. Suppose N 2rs 1is an odd integer where r and s are both positive integers and s is odd. Pick a random“ integer` a where 1 a n 1. If as 1 mod N ,thenN could be prime. If as 1 mod N r but a2 i § 1 §mod´N holds” forp some i q s,thenN could be prime. Otherwise,ı p N isq composite.”´ Thep runningq time of the Miller-Rabin† primality test is O k log N 3 where k is the number of di↵erent values of a we test. Furthermore, the probabilityp p anq integerq N is 1 prime in this primality test is 1 4k . The Solovay-Strassen primality´ test, developed by Robert M. Solovay and Volker Strassen, determines whether an integer n is composite or probably prime. The algorithm for Solovay- Strassen primality test depends on the Jacobi symbol and Euler’s Criterion. Specifically, it N 1 2 a proceeds as follows: given an odd number N,ifap ´ q{ mod N holds for some a, ı N p q N 1 a then N is composite. If for a randomly chosen value of a we´ have¯ a 2´ mod N , ” N p q then there is 50% chance that N is prime. The running time of the Solovay-Strassen´ ¯ primal- ity test is still O k log N 3 ,wherek is the number of di↵erent values of a we test. However, p p q q 1 the probability an integer N is prime in this primality test is 1 2k , smaller than that of the Miller-Rabin primality test. ´ Instead of proving that N is a prime number, the probabilistic primality test only deter- mines a probability that an integer N is prime. Thus, some cryptographers use deterministic

1 Miaoqing Jia primality proving algorithms to actually prove whether an integer N is prime. The AKS primality test [1], known as the Agrawal-Kayal-Saxena primality test, is an example of de- terministic primality proving. Based on the theorem that an integer N 2 is prime if and only if the polynomial congruence relation x a N xN a mod N• holds for some a coprime to N, the running time for this algorithmp ` q is”pO log`N qp6 . q Although deterministic primality proving proves thepp primalityq q of an integer N directly, its algorithms spend relatively longer times than those of probabilistic primality testing. Instead of computing the primality of an integer N directly, some cryptographers came up with strategies that involve some precomputations in order to save more time. For example, in 1996, Lukes [4] created a primality test that used a precomputed table of pseudosquares. In particular, based on the precomputed table, the running time of this primality proving 3 o 1 6 is O log N ` p q , far less than O log N . Severalpp yearsq later,q Berrizbeitiapp [2] introducedq q a more ecient primality test that relied on a precomputed table of pseudocubes. However, because this the size of this precom- puted table is relatively large, this method cannot be used practically. Thus, Wooding and Williams [10] proposed an alternate definition of pseudocube, the Eisenstein pseudocube, based on Eisenstein integers. According to their conjecture, they believed that the size of the precomputed table of Eisenstein pseudocubes is relatively smaller than that of the precomputed table of ordinary pseudocubes. Therefore, the primality test based on this precomputed table has an even shorter running time than the one proposed by Berrizbeitia. Thus, this paper focuses on deterministic primality proving based on Eisenstein psedocubes and explains how this primality test works with the Berrizbeitia theorem. Before introduc- ing the algorithm of this primality test, we will first introduce the Berrizbeitia theorem.

Berrizbeitia Theorem. [2] Let ⌫ a b! be a primary element of Z ! ,where “ ` r s gcd a, b 1, ⌫ is not a , prime, or perfect power in Z ! , and N ⌫ N µp . Supposep q“ integer N 1 mod 3 . Then there must exist a rationalr s prime q p qp †suchp thatq ” p q § q N 1 q 3´ mod ⌫ . ⌫ ı p q ˆ ˙3 With a precomputed table of Eisenstein pseudocubes, this algorithm operates in the following way to test the primality of an integer N congruent to 1 mod 3: 1. Test that N is not a perfect power.

2. Find a primary ⌫ Z ! , such that N ⌫ N. If this step fails, then N is composite. P r s p q“ 3. From a precomputed table of Eisenstein pseudocubes, choose µp Z ! of minimal norm such that N N µ . P r s † p pq q N 1 4. For each prime q p,if q 3´ mod ⌫ for all q,thenN is prime. § ⌫ ” p q ˆ ˙3 q N 1 As indicated in (4), we know that if N is prime, then for all q p,wehave q 3´ mod ⌫ . † ⌫ 3 ” p q This contradicts the Berrizbeitia theorem. Therefore, ⌫ is either a unit, prime,ˆ ˙ or prefect power. In particular, since N is neither a perfect power nor a unit as reflected in the algorithm, it has to be prime. Consequently, if ⌫ is prime, then N is prime. This paper first recalls background information on theory, particularly, Euclidean domains and unique factorization domains in Section 2. Then we introduce and study the

2 Miaoqing Jia ring of Eisenstein integers and its properties in Section 3. Section 4 describes quadratic and cubic residues, and quadratic and cubic reciprocity. In Section 5, we discuss the congruence sieving method to compute the table for Eisenstein pseudocubes. Finally, in Section 6,we describe and analyze the algorithm proposed by Williams and Wooding of primality proving for an integer N 1 mod 3 based on a precomputed table of Eisenstein pseudocubes. ” p q 2 Unique Factorization

This section recalls definitions and properties about integral domains, Euclidean do- mains, and the . Our goal is to show that every is a unique factorization domain (UFD). In order to achieve this, we first prove that every Euclidean domain is a (PID). Then, we give a separate proof that every PID is a UFD. We begin by defining basic ring theoretic terminology.

Definition 2.1. 1. Let R be a that has a multiplicative identity. A unit of R is an element u such that uv 1 for some v R. In particular, the set U of all units is called the group of units“of R. P

2. Given a, b R,wesaya and b are associates and write a b if a ub for some u U. P „ “ P 3. An ideal I of R is a non-empty subset such that: (a) if a, b I,thena b I; P ´ P (b) if a I and r R,thenra I. P P P A proper ideal is an ideal such that I 0 and I R. ‰t u ‰ 4. An integral domain is a ring that has a multiplicative identity and has no zero divisors. 5. Let D be an integral domain and suppose a, b D with a 0. If there exists z D such that az b,thenwesaya divides b,writtenP a b. ‰ P “ | 6. A principal ideal domain (PID) is an integral domain in which every proper ideal can be generated by a single element. Definition 2.2. An integral domain D is said to be a Euclidean domain if there is a function: : D 0 N zt uÑ such that for all a D and all nonzero b D,thereexistq, r D such that: P P P a qb r with r 0 or r b . “ ` “ p q† p q In this case, we also say that D has a division algorithm.

Example 2.3. Integers, Z, with the function x x , is a Euclidean domain. p q“| | The function allows us to mimic the proof that the integers are a PID in order to prove that every Euclidean domain is a PID.

3 Miaoqing Jia

Theorem 2.4. Every Euclidean domain is a principal ideal domain. Proof. Let I be an ideal of a Euclidean domain. If I 0, then I 0 is a principal ideal. If I 0, then we consider “ “x y ‰ S a a I 0 N. “t p q| P zt uu Ñ Since I 0, there exists a I, such that a 0. Thus, a I 0 and a S. As a result, ‰ P ‰ P zt u p qP S ?. Therefore, we can assume S has a least element b where b I 0 .Sinceb I, then‰ b I. p q P zt u P Tox concludeyÑ that b I, we must also show I b . We suppose a I. Because we have a Euclidean domain,x wey“ can write a qb r whereÑx 0y r b .P Because r b and b is the least element in S, we“ know` that r §S. Hence,p q† p weq know that pr q†I 0p q. Since pI qis an ideal, r a qb I.Thus,r has to bep 0qR in order to fulfill the requirementR zt thatu r I 0 . As a result,“ we´ haveP a qb r qb 0 qb, and a b . Therefore, we have R zt u “ ` “ ` “ Pxy shown that I b . We conclude that I b ,soI is a principal ideal, as required. ⌅ Ñx y “x y Since integers have an ordering, we can define the greatest common divisor (GCD) in integers by understanding both of the following terms: “greates” and “common divisor”. First, “greatest” means that the GCD is the greatest number in the sequence. Second, “common divisor” means that the GCD divides both given integers. In general, the GCD in integers is the greatest number that can be divided by both given integers. On the other hand, a Euclidean domain is (in general) not ordered. Thus, we can only define GCD in Euclidean domain terms by testing whether or not it satisfies the following properties. Definition 2.5. Let D be an integral domain. For any a, b, d D, we argue d is a greatest common divisor of a and b if the following conditions hold: P GCD1 d a and d b. | | GCD2 if d1 a and d1 b,thend1 d. | | | Proposition 2.6. Suppose D is a PID. Then, for any non-zero a, b D,thereexists gcd a, b and a, b d . P p q x y“x y Proof. Consider the ideal a, b sa tb s, t D . Because D is a PID, there exists d D, such that a, b dx .Sincey“td `a, b |,thereexistP u s, t D such that d sa tb.We needP to verify thatx d y“xsatisfiesy GCD1 andPx GCD2.y P “ ` For GCD1, since a d ,weknowthereexistsk D, such that a dk. Therefore, we have d a. Similarly, wePx havey d b. P “ | | For GCD2, we assume d1 a and d1 b.Thenthereexistm, n D such that a d1m | | P “ and b d1n. Therefore, we have d sa tb s d1m t d1n d1 ms tn .Sincem, s, t, n “ “ ` “ p q` p q“ p ` q are all in D,thenms tn D as well. We then have d1 d. ` P | Therefore, we have gcd a, b d and a, b d . ⌅ p q“ x y“x y Two elements a and b are said to be relatively prime if the only common divisors are units.

Corollary 2.7. if D is a PID and a, b D are relatively prime, then a, b D. P x y“ Proof. Suppose 1 is the unit in D. According to Proposition 2.6, we have shown that a, b 1 . Since 1 is a unit, for any ↵ D,wehave↵ ↵ 1. Thus, ↵ D. Therefore, x y“x y P “ ¨ P 1 D, as desired. ⌅ x y“

4 Miaoqing Jia

We now introduce the Euclidean Algorithm, which computes the GCD in the Euclidean domain. Definition 2.8. Suppose a, b 0 in a Euclidean domain D. Then we can define elements ‰ r1,r2,... in D by the recursive formula that contains the function :

rk 2 qkrk 1 rk with rk 0 or rk rk 1 . ´ “ ´ ` “ p q† p ´ q Thus, we have:

a q b r ,r b “ 1 ` 1 p 1q† p q b q r r ,r r “ 2 1 ` 2 p 2q† p 1q r q r r ,r r 1 “ 3 2 ` 3 p 3q† p 2q ......

The process must end because b r1 r2 ... and takes nonnegative values. We suppose the last two steps are: p q° p q° p q

rk 3 qk 1rk 2 rk 1,rk 1 rk 2 ´ “ ´ ´ ` ´ p ´ q† p ´ q rk 2 qkrk 1. ´ “ ´

Lemma 2.9. gcd a, b rk 1. p q“ ´ Proof. We sketch the verification that rk 1 fulfills GCD1 and GCD2. ´ GCD1: (work up) If rk 1 rk 2 and rk 2 rk 3,thenrk 1 rk 3 due to rk 3 qk 1rk 2 rk 1. ´ | ´ ´ | ´ ´ | ´ ´ “ ´ ´ ` ´ By upward induction, we get rk 1 a and rk 1 b. ´ | ´ | GCD2: (work down) We suppose d1 a and d1 b.Sincer a q b,wehaved1 r . | | 1 “ ´ 1 | 1 By downward induction, we get d1 rk 1. ⌅ | ´ Example 2.10. Determine the greatest common divisor of 615 and 345, and verify whether or not it fulfills both GCD1 and GCD2. Proof.

615 1 345 270 “ ˆ ` 345 1 270 75 “ ˆ ` 270 1 45 30 “ ˆ ` 45 1 30 15 “ ˆ ` 30 2 15 0. “ ˆ ` As indicated in these equations, the greatest common divisor of 615 and 345 is 15, the last non-zero remainder. We now test whether or not 15 fulfills both GCD1 and GCD2. For GCD1: We have 615 15 41 and 345 15 23. “ ˆ “ ˆ

5 Miaoqing Jia

For GCD2: We suppose there exists d1 such that d1 615 and d1 345. Thus, we have | |

d1 615 345 270 |p ´ q“ d1 345 270 75 |p ´ q“ d1 270 75 3 45 |p ´ ˆ q“ d1 75 45 30 |p ´ q“ d1 45 30 15. |p ´ q“

Therefore, any integer d1 that divides both 615 and 345 must divide 15. Thus, we have shown that 15 fulfills both GCD1 and GCD2. Hence, 15 is the greatest common divisor of 615 and 345. ⌅ The remainder of this section is devoted to proving that every PID is a UFD. Assume D is a PID. We first show that every non-unit a in D can be written as a product of irreducibles. Then we prove that every factorization of a into irreducibles is unique. Definition 2.11. Suppose D is an integral domain.

1. Suppose p 0inD.Thenp is irreducible if p is a non-unit and if p ab,theneither a is a unit,‰ or b is a unit. “

2. We say that d has a factorization into irreducibles if there exist irreducibles p1,p2...pk in D such that d p p ...p . “ 1 2 k 3. The factorization for d is essentially unique. That is, if given d p1p2...pk and d q q ...q into irreducibles, it follows that k l and there exists a permutation“ “ 1 2 l “ ⌧ of 1, 2,..,k such that pl q⌧ l . t u „ p q 4. We say D is a unique factorization domain (UFD) when every non-unit a 0 has an essentially unique factorization. ‰

5. A non-unit p 0inD is said to be prime if for any a, b D,wehavep ab p a or p b. ‰ P | ñ | | 6. In D, every prime element is irreducible. In general, the converse is not true; it is only true when D is a UFD.

Lemma 2.12. If D is a PID, then D has no infinite ascending chains of ideals.

Proof. Suppose a1 a2 a3 ... is an infinite chain of ideals. Let I Ui8 1 ai ,the union of ideals. First,x yÑ wex assertyÑx thaty I is an ideal. To prove this, suppose m“is an“ arbitraryx y element in I, and r is an arbitrary element in D, not in I.Thereexistsi N such that P m ai . Becasue ai is an ideal in D,wehavemr ai and rm ai . Therefore, we havePx bothy mr and rmx y I. I is an ideal in D. Px y Px y P Because D is a PID, there exists a D such that I a .Thenthereexistsk N such P “x y P that a ak . Because a I,soa I. As a result, we have a ak ak 1 ... I a . Px y x y“ P x yÑx yÑx ` yÑ Ñ “xy Therefore, all ai for i N are equal and the chain is finite. ⌅ x y P Corollary 2.13. Let D be a PID and a 0, a non-unit in D.Thenthereexistsz D such that z is irreducible and z a. ‰ P |

6 Miaoqing Jia

Proof. If a is irreducible, we are finished. If not, a must have a proper (non-unit, non-zero) divisor a1, such that a1 a. Similarly, either a1 is irreducible or there exists a proper divisor a , such that a a . Continuing| this process, we have a sequence a ,a ,a ...a where a is 2 2 | 1 1 2 3 k i a proper divisor of ai 1 for 1 i k. Therefore, we have ai 1 ai . By Lemma 2.12, ´ § § x ´ yàx y the sequence terminates at ak,whichmustbeirreducible. ⌅ Lemma 2.14. Let D be a PID. If p D is irreducible, then p is prime. P Proof. Let a, b D with p ab. Based on the definition of prime in Definition 2.11, we want to show that eitherP p a or |p b.Sincep ab,thereexistsm D, such that pm ab.Ifp a, | | | P “ | we are finished. If p - a, because p is prime, we have gcd p, a 1. By Bezout’s identity, there exist t, s D such that tp sa 1. Thus, we have btpp bsaq“ btp ba s btp pms p bt ms b. P ` “ ` “ `p q “ ` “ p ` q“ Hence, p b and p is prime. ⌅ | Theorem 2.15. Every PID is a UFD. Proof. Assume D to be a PID, and let a 0 be a non-unit in D. Based on the Corollary 2.13, there exists an irreducible p D such‰ that p a.Saya p b for some b D,where 1 P 1 | “ 1 1 i P i N.Ifb1 is irreducible, then a is a product of irreducibles. Otherwise, b1 p2b2 where P “ p2 is irreducible. Continuing this process, we notice that b1 b2 ... bk must terminate by Lemma 2.12. We assume it will terminate at bx whereyÑxb yÑp isÑ irreducible.x y k k “ k Then we have a p1p2p3...pk. To show uniqueness,“ we suppose a p p p ...p and a q q q ...q where q ...q are “ 1 2 3 k “ 1 2 3 l 1 l irreducible. Without the loss of generality, we assume k l.Sincep1 is irreducible, we have p q q ...q . Based on the Lemma 2.14, we know that§p is prime. By Definition 2.11, 1 | 1 2 l 1 there exists i N such that p1 qi. That is, there exists a unit ui in D such that qi uip1. After reordering,P we have q | u p . As a result, we get p p ...p p u q q ...q “. Both 1 “ 1 1 1 2 k “ 1 1 2 3 l sides divide p1p2...pk and we will get 1 u1u2...ukqk 1...ql. This contradicts the claim that “ ` ql is not a unit. Therefore, k l and p1 qi for i 1, 2....k. Hence, D is a UFD. ⌅ “ „ “ 3 The Eisenstein Integers

This section introduces the Eisenstein integers, Z ! , a subset of C obtained by adjoining r2⇡si 3 a primitive cube , ! 1 2 1 i?3 e { , to the rational integers. Elements “ { p´ ` q“ of Z ! are complex numbers of the form z a b!,wherea and b are rational integers. We r s “ ` discuss the norm function on Z ! , and we use the norm of Z ! as the function to prove r s r s that Z ! is a Euclidean domain, and therefore is a UFD. We also use the norm function r s to classify the di↵erent types of primes in Z ! . Finally, we compute the units in Z ! and discuss the choice of a preferred (“primary”)r associates of an Eisenstein integer. r s Consider the set Z ! a b! a, b Z . It is clear that Z ! is closed under r s“t ` | P u r s addition and subtraction. In addition, since !2 1 !, we have that Z ! is closed under “´ ´ r s multiplication and is a ring. Since Z ! is a subset of the complex numbers, we can see that r s Z ! is an integral domain. We also assert that Z ! is closed under complex conjugation. r s r s Let i ? 1. Since ? 3 ?3i ?3i ? 3, we see that ! !2. Thus, for any “ ´ ´ “ “´ “´ ´ “ ↵ a b! Z ! , the complex conjugate ↵ a b! a b!2 a b b! is also in “ ` P r s “ ` “ ` “p ´ q´ Z ! . r s We define a norm function on Z ! by N ↵ ↵↵,where↵ denotes the complex con- 2 r2 s p1 q“2 3 2 jugate of ↵.Since↵↵ a ab b a b b , it is clear that N ↵ Z` for all “ ´ ` “p ´ 2 q ` 4 p qP

7 Miaoqing Jia

↵ Z ! . In particular, if N ↵ 0, then ↵ 0. The norm function is multiplicative: for P r s p q“ “ any ↵, Z ! ,wehave P r s N ↵ N a2 ab b2 c2 cd d2 p q p q“p ´ ` qp ´ ` q ac bd 2 ac bd ad bc bd ac bc bd 2 “p ´ q ´p ´ qp ` ´ q`p ` ´ q N ↵ . “ p q In addition, we have N 1 1 1 1. p q“ ¨ “ Lemma 3.1. Let ↵ Z ! ,thenwehave↵ is a unit if and only if N ↵ 1. P r s p q“ Proof. Let ↵ be a unit in Z ! .Thenwehave↵ 1 for some in Z ! .Thus, N 1 N ↵ N ↵ N r s 1. Since both N ↵“and N are rationalr s integers, p q“ p q“ p q p q“ p q p q they must both equal 1. Hence, N ↵ N 1. Therefore, for any ↵ Z ! ,itisaunit p q“ p q“ P r s if and only if N ↵ 1. ⌅ p q“ Corollary 3.2. For any non unit ↵ Z ! ,wehaveN ↵ 1. P r s p q° Proof. From the norm function, we notice that for any non-zero ↵ Z ! , its norm is larger than or equal to 1. In addition, we conclude that ↵ is a unit ifP andr s only if N ↵ 1 according to Lemma 3.1.Thus,if↵ is not a unit, its norm should lager than 1. p q“ ⌅ We now find units in Z ! . r s Lemma 3.3. The units in Z ! 1, 1,!, !,!2, !2 . r s“t ´ ´ ´ u Proof. Now we suppose ↵ a b! Z ! . According to Lemma 3.1, we have con- “ ` P r s cluded that if ↵ is a unit in Z ! ,thenN ↵ a2 ab b2 1. Furthermore, we 2 2 r 1s 2 3 2 p q“ ´ ` “ 3 2 have 1 a ab b a 2 b 4 b .Sincea and b are integers and 4 b 1, we conclude“ that´b can` only be“p 0 or´ 1.q Now` consider the following cases: § ˘ 1. When b 0, we have 1 a2, indicating that a 1. “ “ “˘ 1 2 1 1 1 2. When b 1, we have a 2 4 , indicating that a 2 2 . Therefore, a 1 or a 0 correspondingly.“ p ´ q “ p ´ q“˘ “ “ 1 2 1 1 1 3. When b 1, we have a 2 4 , indicating that a 2 2 . Therefore, a 0 or a “´1 correspondingly.p ` q “ p ` q“˘ “ “´ Thus, the units in Z ! are 1, 1,!, !, 1 !, 1 !.Since!2 ! 1 0, the last two r s 2 ´ 2 ´ ` ´ ´ ` ` “ units can be written as ! and ! . ⌅ ´ Since Z ! is an integral domain, we now use the norm function on Z ! to serve as the function inr s Definition 2.2 to show that D is a Euclidean domain. r s

Proposition 3.4. Z ! is a Euclidean domain. r s Proof. For any ↵ a b! Z ! ,wedefine ↵ N ↵ ↵↵ a2 ab b2. Now we “ ` P r s p q“ p q“ “ ´ ` assume ↵, Z ! and suppose that 0. We must show that we can find ⇢, z Z ! such that ↵ P zr s ⇢,whereeither⇢ 0‰ or N ⇢ N . P r s In order“ to achieve` this, we extend“ our attentionp q† top qQ ! ,whichhelpsustoproduce r s z. Consider ↵ ↵ ↵ N .SinceN N and ↵, Z ! ,wehave { “ { “ { p q p qP P r s

8 Miaoqing Jia

↵ N ↵ Q ! ,say↵ c d! where c, d Q. Now we seek an approxi- { p q“ { P r s { “ ` P mation to ↵ in Z ! .Thereexistc, d Q such that ↵ c d!. We can find r, s Z, { r1 s 1 P { “ ` P such that c r 2 and d s 2 , and we set z r s!. We now| calculate´ |§ how| “close”´ |§z is to ↵ and z“by` using the norm function. We assert the norm of ↵ z is smaller than 1. To{ show this, we have { ´ N ↵ z N c d! r s! p { ´ q“ p ` ´p ` qq N c r d s ! “ p ´ `p ´ q q c r 2 c r d s d s 2 “p ´ q ´p ´ qp ´ q`p ´ q 1 1 1 1. § 4 ` 4 ` 4 † Since z is a close integer approximate to ↵ , we expect that the remainder ⇢ ↵ z Z ! to be small. Then we use the norm function{ to serve as the in Definition 2.11“ ´to compareP r s N and N ⇢ . Observe that: p q p q N ⇢ N ↵ z N ↵ z N N ↵ z N 1 N . p q“ p ´ q“ p p { ´ qq “ p q p { ´ q† p q¨ “ p q Thus, given ↵, Z ! , we have found ⇢, z D such that ↵ z ⇢,whereN ⇢ N . P r s P “ ` p q† p q Hence, Z ! is a Euclidean domain, as desired. ⌅ r s Corollary 3.5. Z ! is a PID and a UFD. r s Proof. From Proposition 3.4, we know that Z ! is a Euclidean domain. But in Theorem r s 2.4, we proved that every Euclidean domain is a PID. It follows that Z ! is a UFD by r s Theorem 2.15, as desired. ⌅ We now use this norm function to classify primes in Z ! . r s Proposition 3.6. If ⇡ is prime in Z ! , then there is a rational prime p such that N ⇡ p or p2. In the former case, ⇡ is notr associates to a rational prime; in the latter case,p q“⇡ is associate to p.

Proof. We assume ⇡ is prime in Z ! and that we have N ⇡ ⇡⇡ n Z.Sincen is a product of rational primes, therer s exists a rational primep q“p such“ that P⇡ p.Thus, | there exists Z ! , such that p ⇡. Because the norm is multiplicative, we have N p N ⇡ P Nr s⇡ N .Since“p is a rational prime, then we have N p pp p2. Thus,p q“N ⇡p Nq“ Np qp p qp2.Sincep is a rational prime and N ⇡ is anp q“ integer,“ then either Np⇡q ppq“or N ⇡p q“p2. p q If N p⇡ q“ p,we proceedp q“ by contrapositive. Assume that ⇡ is associate to a ratio- nal prime,p q“ say ⇡ µq where µ is a unit and q is a rational prime. Then we have p N ⇡ N µ“N q q2, which contradicts that p is a rational prime. Thus, ⇡ is not“ associatep q“ top a rationalq p q“ prime. On the other hand, if N ⇡ p2 N ⇡ N ,then p q“ “ p q p q N 1. Therefore, is a unit by Lemma 3.1 and ⇡ is associate to p. ⌅ p q“ Besides detecting the associates of a prime number in Z ! , the norm function can also r s help to detect primes in Z ! . r s Proposition 3.7. If ⇡ Z ! is such that N ⇡ is a rational prime, then ⇡ is prime in P r s p q Z ! . r s

9 Miaoqing Jia

Proof. We prove this by contrapositive. Assume that ⇡ is not prime in Z ! and write r s ⇡ ↵ where ↵, Z ! . We want to show that N ⇡ is not a rational prime. Since ⇡ “ ↵ ,wehaveNP⇡ r sN ↵ N ↵ N . Becausep q both ↵ and are not units, we “ p q“ p q“ p q p q have N ↵ , N Z` by Corollary 3.2.Thus,N ⇡ N ↵ N is not a rational prime. p q p qP p q“ p q p q Therefore, ⇡ is prime in Z ! , as desired. ⌅ r s Based on this sections’s discussion of primes in Z ! , we are now able to classify primes r s in Z ! into three di↵erent types. In fact, based on Proposition 3.7, we can infer that some r s rational primes remain prime in Z ! , while others do not. Hence, the congruence class of r s a rational prime mod 3 tells us precisely whether or not it remains prime in Z ! . r s Proposition 3.8. Suppose that p is a rational prime. If p 2 mod 3 ,thenp is prime in ” p q Z ! .Ifp 1 mod 3 ,thenp ⇡⇡ where ⇡ is prime in Z ! with N ⇡ N ⇡ . Finally, r s ” p q “ r s p q“ p q if p 3, we have p !2 1 ! 2, and 1 ! is prime in Z ! . “ “´ p ´ q ´ r s Proof. First, we want to show that if p 2 mod 3 ,thenp is prime in Z ! . Suppose p is not ” p q r s prime. There exist non-units ↵, Z ! such that p ↵ with N ↵ 1 and N 1. Because p is a rational prime and NP pr s N ↵ N “ p2 where Np↵q,°N 1,p weq have° p q“ p q p q“ p q p q° N ↵ p.Since↵ Z ! ,thereexistm, n Z such that ↵ m n!. By the definition of norm,p q“ we have N ↵P rms2 mn n2 p.P Now we consider“ di↵`erent pairs of m and n. p q“ ´ ` “ m mod 3 n mod 3 m2 mn n2 p q p q ´ ` 0 0 0 0 1 1 0 2 1 1 0 1 1 1 1 1 2 0 2 0 1 2 1 0 2 2 0

Based on above table, it is clear that in any case, if p N ↵ , p cannot congruent to 2 modulo 3. Therefore, if p 2 mod 3 ,wehavep “N ↵p andq this contradicts that ” p q ‰ p q p N ↵ . Hence, if p 2 mod 3 , p is prime in Z ! . “Secondly,p q suppose that” p 1 modq 3 , in which caser s we want to show that p ⇡⇡ where ” p q “ ⇡ is prime in Z ! . By Euler’s Critertion and we have: r s 3 1 3 ´ ´ p “ p p ˆ ˙ ˆ ˙ˆ ˙ p 1 ´ 3 1 p 2 q “p´ q p ˆ ˙ p 1 p 1 3 1 ´ p ´ ´ 1 p 2 q 1 p 2 qp 2 q “p´ q 3 p´ q p 1 p 1 ´ ´ ¯´ p 1 pp 2 q`p 2 qq “p´ q 3 p 1 p ´ ¯ 1 p ´ q “p´ q 3 ´ ¯

10 Miaoqing Jia

p 1 Since p is a rational prime and p 2, we have 1 p ´ q 1. Thus, we have: ‰ p´ q “

3 p 1 p p 1 ´ 1 p ´ q 1. p “p´ q p3q“p3q“p3q“ ˆ ˙ Hence, there exists a Z such that a2 3 mod p and p a2 3 .Since a2 3 P ”´ p q |p ` q p ` q“ a ? 3 a ? 3 ,ifp is prime in Z ! ,thenp a2 3 implies that p divides one ofp ` the factors´ qp ´ of a´2 q 3. In fact, since ther s conjugate|p of `a q? 3 is a ? 3 , it has to divide both of them` if it divides one of them. To provep ` this,´ supposeq p ´a ´?q 3 z p ` ´ q“ and p z.Thenthereexits Z ! such that z p. Therefore, z p p. Hence, we have| p z. Therefore, p hasP tor s divide both of“ them and the sum“ of them.“ That is | p a ? 3 a ? 3 2a. The fact that p - 2 indicates p a. Certainly, p a indicates that|p p` a´2 andq`pa2´ 0´ modq“ p , contradicting that a2 3 |mod p . Therefore,| p is not | ” p q ”´ p q prime in Z ! and there must exist a prime number ⇡ Z ! such that p ⇡ with a non-unit. Sincer s N p N ⇡ N p2 and is a non-unit,P r wes have N ⇡ “p ⇡⇡ where ⇡ is prime. p q“ p q p q“ p q“ “ Lastly, we show that p 3 is an associate of 1 ! and that 1 ! is a prime number “ p ´ q ´ in Z ! .SinceN 1 ! 3 is a rational prime number, then we have 1 ! is prime in r s p ´ q“ p ´ q Z ! according to Proposition 3.7. ⌅ r s After analyzing whether a rational prime remains prime in Z ! with the help of the congruence class of the rational prime mod 3, we are now readyr tos classify primes in the Eisenstein integers. There are three types: Proposition 3.9 (Primes in Eisenstein Integers). Type 1 The rational primes p 2 mod 3 , which have norm p2. ” p q Type 2 Non-rational Eisenstein integers ⇡ such that N ⇡ is a rational prime p satisfying p 1 mod 3 . p q ” p q Type 3 p 3 is an associate of 1 ! where 1 ! is prime. “ ´ ´ According to Lemma 3.3, there are six units in Z ! . We are now use these units to help us find associate for each Eisenstein integer and definer s the term primary to choose the preferred associate.

Definition 3.10. A primary element ↵ in Z ! is an element congruent to 2 modulo 3. In r s other words, the element ↵ a b! Z ! is primary if and only if a 2 mod 3 and b 0 mod 3 . “ ` P r s ” p q ” p q Theorem 3.11. Suppose that N ⇡ p aprimenumberinZ, and p 1 mod 3 .Then among the associates of ⇡, exactlyp oneq“ is primary. ” p q Proof. Since ⇡ a b!,thenwehaveN ⇡ a2 ab b2 p 1 mod 3 .Thesix “ ` p q“ ´ ` “ ” p q

11 Miaoqing Jia

associates of ⇡ can be found by multiplying ⇡ by each of the six units in Z ! : r s ⇡ 1 ⇡ a b! p q¨p q“ “ ` ⇡ 1 ⇡ a b! p q¨p´ q“´ “´ ´ ⇡ ! !⇡ a! b!2 b a b ! p q¨p q“ “ ` “´ `p ´ q ⇡ ! !⇡ a! b!2 b b a ! p q¨p´ q“´ “´ ´ “ `p ´ q ⇡ !2 !2⇡ a!2 b b a a! p q¨p q“ “ ` “p ´ q´ ⇡ !2 !2⇡ a!2 b a b a!. p q¨p´ q“´ “´ ´ “p ´ q` We may now restrict the congruence possibilities for a and b in to six cases: a mod 3 b mod 3 primary p q p q 0 1 !2⇡ ´ 0 2 !2⇡ 1 0 ⇡ ´ 1 1 !⇡ 2 0 ⇡ 2 2 !⇡ ´ ⌅

4 Cubic Reciprocity

Throughout this section, we use D to represent the Eisenstein integers, Z ! .Wewill establish a parallel between square roots in rational integers modulo an ordinaryr s prime number and cube roots in Eisenstein integers modulo an Eisenstein prime number. In rational integers, given a prime number p Z,thenZ pZ is a finite field with p P { elements. The multiplicative group Z pZ˚ is a with p 1 elements. Similarly, we prove that in the Eisenstein integers,{ given a prime number ⇡ D´,thenD ⇡D is a finite P { field. In particular, this means that the multiplicative group D ⇡D˚ is a cyclic group, and { we show that D ⇡D˚ has N ⇡ 1elements. If ↵,, D{ and 0p isq´ a non-unit, we say that ↵ mod if divides ↵ . The congruenceP classes of‰ D modulo may be made into” the residuep q class ring modulo´ , denoted D D. { Proposition 4.1. Suppose is a non zero element of D.ThenD D is finite. { Proof. We must show that a finite number of elements of D suce to represent the cosets of D D. Consider an arbitrary ↵ D.SinceD is a Euclidean domain and 0, there exist{, D such that ↵ Pand N N . Hence, every coset in D ‰D can be representedP by an element“ whose` norm is strictlyp q† lessp q than N . { p q However, we claim that for any m Z`, only finitely many values of D satisfy P 2 P 2 1 2 3 2 N m. For if a b! with a, b Z, then we conclude that N a ab b a 2 b 4 b m. p q† “ 3`2 P p q“ ´ ` “p´ q ` † Because this requires 4 b m, there are only finitely many choices for b. For a given b, † 1 2 3 2 there are only finitely many integers a satisfying a 2 b m 4 b . Therefore, there are finitely many D with N N . All cosetsp ´ in Dq D† can´ be represented by such a ,soD D is finite,P as desired.p q† p q { { ⌅

12 Miaoqing Jia

Now we consider the quotient of D by a prime number ⇡.ToshowD ⇡D is a finite field, we need to show that it has no zero divisors and every nonzero element{ is invertible. For arbitrary ↵ D,weuse↵ to denote ↵ ⇡D in D ⇡D. P ` { Proposition 4.2. Let ⇡ D be prime. Then D ⇡D is a field. P { Proof. To show D ⇡D has no zero divisors, we suppose ↵ D ⇡D and D ⇡D multiply to 0 in D ⇡D. Therefore,{ we have ⇡ ↵. By Definition 2.11P ,since{ ⇡ is a primeP { and ⇡ ↵, then we have{ ⇡ ↵ or ⇡ , indicating| that either ↵ or is zero in D ⇡D. | To show elements| of |D ⇡D are invertible, suppose a non-zero ↵ {D ⇡D.SinceD ⇡D is finite, there must be some{ repetition in the list ↵0,↵1,↵2..... HenceP there{ exist exponents{ i j i j i j i i j with ↵ ↵ ,so↵ ↵ ´ 1 0. Since D ⇡D has no zero divisors, we get ↵ ´ 1 0 † j i 1“ p ´ q“ { j i 1 ´ “ and ↵ ↵ ´ ´ 1. Since i j,wehavej i 1 0, indicating that ↵ ´ ´ D and ↵ is ¨ “ † ´ ´ • P invertible. Therefore, D ⇡D is a field. ⌅ { Now we establish the cardinality of D ⇡D. { Proposition 4.3. Let ⇡ D be prime. Then D ⇡D is a finite field with N ⇡ elements. P { p q Proof. By Proposition 4.1 and Proposition 4.2, D ⇡D is a finite field. To show that it has N ⇡ elements, we consider the following two cases,{ according to whether or not ⇡ is a rationalp q prime (Proposition 3.9).

First Case We first consider rational primes in D. Suppose ⇡ p where p 2 mod 3 is a rational prime. From Proposition 3.6,weknowN “⇡ N p ” p2p,soweq want to show that D ⇡D has p2 elements. We claim thatp q“ a completep q“ set of coset representatives for D {⇡D is given by the set S i j! 0 i p and 0 j p . Let µ m n! be{ an arbitrary element in D“t. Apply` the| § Division† Algorithm§ † foru “ ` dividing p into m and n, respectively, to obtain s, t, i, j Z such that m ps i and n pt j where 0 i, j p.Thus,i j! S, andP we then conclude“ that` µ m “ n! ` p s t! § i j†! i j! mod` pP. “ ` “ p ` q`p ` q” ` p q We have proved D ⇡D has at most p2 elements, but we still need to show that the 2 { p elements of S represent distinct cosets. Suppose that a b! and a1 b1! are ` ` in S, and a b! a1 b1! mod p .Thenp a a1 b b1 ! ,sowehave ` ” ` p q |rp ´ q`p ´ q s a a1 p b b1 p ! D. Since both a a1 p and b b1 p must be in Z pp ´ q{ q`pp ´ q{ q P p ´ q{ p ´ q{ and since 0 a, b, a1,b1 p, we conclude that a a1 and b b1.Thus,elementsinS represent distinct§ elements† of D ⇡D, and D ⇡D“has p2 elements,“ as desired. { { Second Case Now we consider non-rational primes in D. Suppose that ⇡ D where N ⇡ is a rational prime p satisfying p 1 mod 3 . We claim that aP complete setp ofq coset representatives for D ⇡D is given” p by theq set T 0, 1,...,p 1 . We want to show that an arbitrary ↵ { m n! D is congruent“t modulo ⇡ to´ anu element in T . “ ` P Suppose ⇡ a b! where a, b Z. We know that there exists an integer c such that cb n mod“ p `. Therefore, m P n! m cb! mod p .SinceN ⇡ ⇡⇡ p,then m ” n!p m q cb! mod ⇡ .Werewrite` ” `↵ throughp aq sequence ofp congruencesq“ “ mod ⇡: ` ” ` p q

13 Miaoqing Jia

↵ m n! “ ` m cb! ” ` m cb! ca ca ” ` ` ´ c a b! m ca ” p ` q` ´ c⇡ m ca ” ` ´ m ca mod ⇡ . ” ´ p q

This indicates that every element of D is congruent to a rational integer mod ⇡.But every rational integer is congruent to an integer in T modulo p, and hence also modulo ⇡. We have proved that D ⇡D has at most p elements, but we still need to show that { di↵erent elements in T represent distinct cosets. Suppose t t1 mod ⇡ with t, t1 Z ” p q P and 0 t, t1 p.Thenthereexists D such that t t1 ⇡. Taking the norm of both sides,§ we† have: P ´ “

2 t t1 N t t1 N ⇡ N pN . p ´ q “ p ´ q“ p q p q“ p q

Thus p t t1 , and since 0 t, t1 p,wethenhavet t1.Thus,ift, t1 T represent |p ´ q § † “ P the same element of D ⇡D,thent t1, as desired. { “ ⌅

Now we introduce Fermat’s Little Theorem and square roots in Z pZ˚ and then state { the corresponding results in D ⇡D˚. { Theorem 4.4 (Fermat’s Little Theorem). Suppose p Z is an odd prime. Then for any p 1 P a Z where p - a,wehavea ´ 1 mod p . P ” p q p 1 2 p 1 ´2 When p is an odd prime, ´2 Z and a 1 mod p by Theorem 4.4. Hence, p 1 P ” p q p 1 a ´2 is a square root of 1. Now we want to´ determine¯ all possible values of a ´2 .

Lemma 4.5. Suppose p is an odd prime and a Z.Ifp - a,thenx2 a mod p either has no solutions or two solutions. P ” p q Proof. If x2 a mod p has any solutions, it has at least two solutions: if x2 a mod p , ” p q ” p q then x 2 a mod p also, and x and x are distinct in Z pZ when p 2. We want to showp´ thatq x”2 pa modqp has no more than´ two solutions. Suppose{ b2 °x2 a mod p ” p q ” ” p q where b Z.Thenb2 x2 b x b x 0 mod p , indicating p b x b x .By DefinitionP 2.11, p b ´x or”pp ´b qpx`. Consequently,q” p q we have b x |por b´ qpx `modq p . 2 |p ´ q |p ` q ” ”´ p q Thus, if x a mod p has any solutions, it must have exactly two solutions. ⌅ ” p q In Eisenstein integers, we have an analog of Fermat’s Little Theorem.

Proposition 4.6. Suppose ⇡ - ↵ where ↵ D and ⇡ is prime in D.Then: P N ⇡ 1 ↵ p q´ 1 mod ⇡ . ” p q

14 Miaoqing Jia

Proof. By Proposition 4.3, D ⇡D is a finite field with N ⇡ elements. It follows that the { p q multiplicative group D ⇡D˚ has N ⇡ 1 elements. By Lagrange’s Theorem, any element N{ ⇡ 1 p q´ ↵ D ⇡D˚ satisfies ↵ p q´ 1 mod ⇡ , as desired. ⌅ P { ” p q Just as a rational prime p in Z is assumed to be odd, we determine several analogous “pre-requirements” about ⇡ in Eisenstein integers in order to introduce Euler’s Criterion for Eisenstein integers. In particular, the reason that we let prime p in Z to be odd is that we want to ensure that the square roots of 1 (1 and 1) are distinct mod p in Z. Similarly, we construct “pre-requirements” on ⇡ in Eisenstein´ integers in order to ensure that the cube roots of 1 (1, !, and !2) are distinct mod ⇡ in D. Proposition 4.7. Suppose ⇡ is prime in D such that N ⇡ 3. The residue classes of 1, ! and !2 are distinct in D ⇡D. p q‰ { Proof. Suppose 1 and ! are not distinct in D ⇡D.Then! 1 mod ⇡ , indicating that ⇡ 1 ! . Because 1 ! is prime, ⇡ and{ 1 ! must be” associatep toq each other. Thus, N|p⇡ ´ qN 1 ! ´3, a contradiction. We´ can show that ! !2 mod ⇡ and 2 p q“ p ´ q“ ı p q 1 ! mod ⇡ by the same method. ⌅ ı p q By Proposition 4.7,whenN ⇡ 3, the residue classes of 1, ! and !2 are distinct mod ⇡ in D. Thus, the “pre-requirement”p q‰ for prime ⇡ in D is that N ⇡ 3. In the remainder of this section, we suppose ⇡ is prime in D such that N ⇡ 3. p q‰ p q‰ Lemma 4.8. Suppose D and suppose ⇡ is prime in D such that N ⇡ 3 and ⇡ - . If 3 1 mod ⇡ ,thenP 1, !, or !2 mod ⇡ . p q‰ ” p q ” p q Proof. Since 3 1 13 mod ⇡ , indicating that 3 13 0 mod ⇡ .Thus,wehave 3 13 1” 2” p 1 q 1 ! !2´ 0”modp ⇡ .Sinceq ⇡ is prime in D,´ it must”p divide´ qp one` of the` factorsq”p ´ of qp ´1 qp ´! q”!2p. Therefore,q we have 1, 2 p ´ qp ´ qp ´ q ” !, ! mod ⇡ . ⌅ p q Corollary 4.9. Suppose ⇡ is prime in D such that N ⇡ 3. Then we have 3 N ⇡ 1. p q‰ | p q´ Proof. Since 1, !, and !2 are distinct in D ⇡D when N ⇡ 3 by Proposition 4.7,wehave 1,!,!2 is a cyclic group of order 3. By{ Lagrange Theorem,p q‰ we have 3 divides the order t u of D ⇡D˚, indicating 3 N ⇡ 1. ⌅ { | p q´ N ⇡ 1 N ⇡ 1 p q´ Since a p q´ 1 mod p by Proposition 4.6, we assert that a 3 is a cube root of ” p q N ⇡ 1 1. Now we want to determine the possible values that a p 3q´ can be.

Lemma 4.10. Suppose ⇡ is prime in D such that N ⇡ 3, and suppose ⇡ - ↵.Thenthe congruence x3 ↵ mod ⇡ has either no solutions orp exactlyq‰ three solutions. ” p q Proof. If x3 ↵ mod ⇡ has any solutions, we want to show that x3 ↵ mod ⇡ has exactly three” solutions.p Supposeq 3 x3 mod ⇡ where D. Then we have” thep following:q ” p q P 3 x3 x 2 x x2 x x! x!2 0 mod ⇡ . ´ ”p ´ qp ` ` q”p ´ qp ´ qp ´ q” p q Since ⇡ is prime in D, it must divide one of the factors of x x! x!2 . Therefore, we have x, x! or x!2 mod ⇡ . From Propositionp 4.7´,qp we´ haveqp shown´ thatq 1, !, !2 are distinct” in D ⇡D. It followsp thatq x, x!, and x!2 are distinct as well. Therefore, if 3 { x ↵ mod ⇡ has any solutions, it must have exactly three solutions. ⌅ ” p q

15 Miaoqing Jia

Corollary 4.11. Suppose ↵ D and suppose ⇡ is prime in D such that N ⇡ 3 and N ⇡ 1 P3 2 p q‰ ⇡ - ↵.Thenwehave↵p p q´ q{ 1, ! or ! mod ⇡ . ” p q Proof. By Lemma 4.8, we have shown that 1,!,!2 are the only cube roots of 1. Also, by N ⇡ 1 Proposition 4.6, we have shown that ↵ p q´ 1 mod ⇡ .Since3 N ⇡ 1, we get N ⇡ 1” 3 p q | p q´ N ⇡ 1 3 is an integer. Therefore, ↵p p q´ q{ is a cube root of 1 mod ⇡ and can only p p q´ q{ 2 be congruent to 1,!, or ! mod ⇡, as desired. ⌅ We introduce Euler’s Criterion in rational integers by applying Fermat’s Little Theorem in rational integers. With Euler’s Criterion, we are able to determine whether or not an arbitrary integer a can be written as the form of a perfect square of another integer x mod p. In particular, we introduce the term quadratic residue to classify whether or not a x2 mod p has solutions. ” p q Definition 4.12. Let p Z be an odd prime and let a Z be relatively prime to p.Then P P a is called a quadratic residue modulo p if there exists x Z such that a x2 mod p . Otherwise, a is called a quadratic nonresidue modulo p. P ” p q

Proposition 4.13 (Euler’s Criterion for Z). Let p Z be an odd prime and let a Z be p 1 P P relatively prime to p.Thena ´2 1 mod p if and only if a is a quadratic residue. ” p q Proof. We need to prove both directions. Suppose a is a quadratic residue. Then there exists x such that a x2 mod p . Therefore, we have ” p q p 1 p 1 ´ 2 ´ p 1 a 2 x 2 x ´ 1 mod p ”p q ” p q by Theorem 4.4, as desired. p 1 To prove the other direction, suppose a ´2 1 mod p . We want to show that there 2 “ p q exists x Z pZ˚ such that a x mod p . Let b be a generator of the cyclic group P { ” p q i Z pZ˚, so ord b p 1 .Thereexistsi Z such that a b mod p .Wenowhave p{ 1 p 1p q“pi p 1 ´ q P i p 1 ” p q ´2 i ´2 p 2´ q a b b 1 mod p . Thus, ord b p 2´ q , that is, there exists k Z such i”pp 1 q ” ” p q piq|p 1 P that p 2´ q k ord b . But ord b p 1 ,so p 2´ q k p 1 , indicating that i 2k. “ i p q2k k 2 p q“p ´ q “ p ´ q “ Hence, we have b b b and a is a quadratic residue. ⌅ “ “p q p 1 p 1 ´ By Fermat’s Little Theorem, a ´ 1 mod p ,soa 2 1 mod p . By Proposi- p 1 ” p q ”˘ p q tion 4.13, a ´2 1 mod p if and only if a is a quadratic residue. Thus, we are able to conclude the following:” p q Proposition 4.14. Let p be an odd prime and a is relatively prime to p.Then

p 1 1 mod p if a is a quadratic residue a ´2 ` p q ” 1 mod p if a is a quadratic nonresidue. #´ p q We can follow the discussion above to develop a parallel theory for cube roots in Eisen- stein integers. We first introduce the term cubic residue. Definition 4.15. Let ↵ D, and let ⇡ be prime in D.Then↵ is called a cubic residue modulo ⇡ if there exists P D such that ↵ 3 mod ⇡ .Otherwise,↵ is called a cubic nonresidue modulo ⇡. P ” p q

16 Miaoqing Jia

Proposition 4.16 (Euler’s Criterion for D). Let ↵ D, and let ⇡ be prime in D.Then N ⇡ 1 P ↵ p 3q´ 1 mod ⇡ if and only if ↵ is a cubic residue mod ⇡. ” p q Proof. We need to prove both directions. Suppose ↵ is a cubic residue. There exists x such N ⇡ 1 N ⇡ 1 3 p q´ 3 p q´ N ⇡ 1 that ↵ x mod ⇡ .Thus,↵ 3 x 3 x p q´ 1 mod ⇡ , where the last congruence” followsp fromq Proposition 4.6”p. q ” ” p q N ⇡ 1 To prove the other direction, suppose ↵ p 3q´ 1 mod ⇡ . We want to show that 3 ” p q there exists x D ⇡D˚ such that ↵ x mod ⇡ .SinceD ⇡D is a finite field, the P { ” p q { multiplicative group D ⇡D˚ is a cyclic group. Let ⇣ be a generator of D ⇡D˚,so { { ord ⇣ N ⇡ 1 by Proposition 4.2.Thereexistsi Z such that ↵ ⇣i mod ⇡ . p q“ p q´N ⇡ 1 N ⇡ 1 i N ⇡ 1 P i N”⇡ 1 p q p 3q´ i p 3q´ p p3q´ q We now have ↵ ⇣ ⇣ mod ⇡ . Thus, ord ⇣ p p3q´ q , that is, ”p q i N ⇡ ”1 p q p q| there exists k Z such that p p3qq´ k ord ⇣ . But ord ⇣ N ⇡ 1, indicating that P i 3k k “3 p q p q“ p q´ i 3k. Hence, we have ⇣ ⇣ ⇣ and ↵ is a cubic residue mod ⇡. ⌅ “ “ “p q N ⇡ 1 p q´ 2 By Corollary 4.11,wehave↵ 3 1, ! or ! . By Proposition 4.16, we know that N ⇡ 1 ” ↵ p 3q´ 1 mod ⇡ if and only if ↵ is a cubic residue. Thus, we are able to conclude the following.” p q

Proposition 4.17. Let ↵ D and ⇡ be prime in D.Then P

N ⇡ 1 3 1 mod ⇡ if ↵ is a cubic residue ↵ p q´ { p q “ ! or !2 mod ⇡ if ↵ is a cubic nonresidue # p q In the remainder of this section, we focus on how to calculate whether an integer a is a quadratic residue or quadratic nonresidue mod p. Similarly, we also focus on how to calculate whether an Eisenstein integer ↵ is a cubic residue or cubic nonresidue mod ⇡. We introduce the multiplicative function Legendre symbol in rational integers. In partic- a ular, the value of Legendre symbol, , can be defined by whether or not a is a quadratic p residue mod p. ˆ ˙ Definition 4.18. Let p be an odd prime number and a be an integer larger than 0. The a Legendre symbol is defined as: p ˆ ˙ 1ifa is a quadratic residue modulo p and a 0 mod p a ` ı p q 0ifa 0 mod p p “ $ ” p q ˆ ˙ &’ 1ifa is a quadratic nonresidue p ´ The Legendre%’ symbol can be generalized to the Jacobi symbol in rational integers. The Jacobi symbol obeys the same rule as the Legendre symbol. The di↵erence between the Legendre symbol and Jacobi symbol is that the “denominator” in the Legendre symbol must be a prime integer while the “denominator” in Jacobi symbol can be any odd integer. Definition 4.19. Let n be any positive odd integer and a 0 any integer. The Jacobi • a a k a ei symbol is defined as where n pe1 pe2 pe3 ...pek . n n “ p “ 1 2 3 k i 1 ˆ i ˙ ´ ¯ ´ ¯ π“

17 Miaoqing Jia

With the definition of Legendre symbol and Jacobi symbol in rational integers, we are able to deduce properties of Jacobi symbol, including the law of quadratic reciprocity and its corresponding supplements, in order to make it even easier to calculate. Proposition 4.20 (Properties of Jacobi symbol). Suppose m, n are odd integers and a, b Z.Wehave: P ab a b 1. n “ n n ˆ ˙ ´ ¯ˆ ˙ a a a 2. mn “ n m ´ ¯ ´ ¯´ ¯ a b 3. If a b mod n ,then ” p q n “ n ´ ¯ ˆ ˙ Theorem 4.21 (Quadratic Reciprocity). Let m, n be odd positive coprime integers. Then

m m 1 n 1 n 1 2´ ´2 . n “p´ q m ´ ¯ ´ ¯ Proposition 4.22 (Supplements of Quadratic Reciprocity). Let n be an odd integer. 1. 1 n 1 1ifn 1 mod 4 ´ 1 ´2 ” p q n “p´ q “ 1ifn 3 mod 4 ˆ ˙ #´ ” p q 2. 2 n2 1 1ifn 1 or 7 mod 8 1 8´ ” p q n “p´ q “ 1ifn 3 or 5 mod 8 ˆ ˙ #´ ” p q 1001 Example 4.23. Suppose a 1001 and p 9907. We calculate the value of .We “ “ 9907 first apply the quadratic reciprocity: ˆ ˙

1001 9907 . 9907 “ 1001 ˆ ˙ ˆ ˙ Since 9907 is larger than 1001, we use the Euclidean Algorithm as defined in Definition 2.8 9907 to simplify . Since 9907 1001 9 898, we have 1001 “ ¨ ` ˆ ˙ 9907 898 . 1001 “ 1001 ˆ ˙ ˆ ˙ By applying the properties of thr Jacobi symbol, we then get

898 2 449 . 1001 “ 1001 1001 ˆ ˙ ˆ ˙ˆ ˙

18 Miaoqing Jia

Continuing this simplifying process, we have

1001 2 449 449 1001 9907 “ 1001 1001 “ 1001 “ 449 ˆ ˙ ˆ ˙ˆ ˙ ˆ ˙ ˆ ˙ 1001 103 449 37 103 449 “ 449 “ 103 “ 103 “ 37 ˆ ˙ ˆ ˙ ˆ ˙ ˆ ˙ ˆ ˙ 103 29 37 8 2 3 1 37 “ 37 “ 29 “ 29 “ 29 “´ ˆ ˙ ˆ ˙ ˆ ˙ ˆ ˙ ˆ ˙ We now introduce the analog of Legendre symbol in the Eisenstein integers, cubic residue ↵ character, which is denoted . Its value is determined by whether or not ↵ is a cubic ⇡ 3 residue mod ⇡. ´ ¯ Definition 4.24. Let ↵ D and ⇡ be prime in D.IfN ⇡ 3, the cubic residue character ↵ P p q‰ is defined as: ⇡ 3 ´ ¯ ↵ 0if↵ 0 mod ⇡ N ⇡ ”1 3 p q ⇡ 3 “ #↵ p q´ { mod ⇡ otherwise. ´ ¯ p q By applying Proposition 4.16, we can observe that:

1if↵ is a cubic residue modulo ⇡ and ↵ 0 mod ⇡ ↵ ı p q 0if↵ 0 mod ⇡ ⇡ 3 “ $ ” p q ´ ¯ &’! or !2 if ↵ is a cubic nonresidue modulo ⇡

The cubic residue%’ character plays the same role in the theory of cubic residues as the Legendre symbol plays in the theory of quadratic residues. However, there is only one option for the answer of a when it is a quadratic nonresidue mod p while there are two options for the answer of ↵ when it is a cubic nonresidue mod ⇡. Thus, the definition of Legendre a symbol for integers is di↵erent from that of cubic residue character for Eisenstein p ↵ ˆ ˙ integers . ⇡ 3 We also´ generalize¯ the cubic residue character to a cubic Jacobi symbol in the Eisenstein integers. By using the cubic Jacobi symbol, determining whether or not an element in D ⇡D˚ is a cubic residue can be done computationally. In particular, the cubic Jacobi symbol{ obeys the same rule as the cubic character residue.

Definition 4.25. If ↵, D with 3 - N ,wedefine P p q ↵ k ↵ ei “ ⇡ ˆ ˙3 i 1 ˆ i ˙3 π“

e1 e2 e3 ek ↵ where ⇡1 ⇡2 ⇡3 ...⇡k . In particular, represents the cubic residue character. “ ⇡ 3 ´ ¯ With the definition of cubic residue character and cubic Jacobi symbol in Eisenstein in- tegers, we are able to state properties of cubic Jacobi symbol, including the cubic reciprocity and the supplements of cubic reciprocity.

19 Miaoqing Jia

Proposition 4.26 (Properties of Cubic Jacobi Symbol). ↵ ↵ 1. “ ˆ ˙3 ˆ ˙3ˆ ˙3 ⇡ ⇡ ⇡ 2. ↵ “ ↵ ˆ ˙3 ˆ ˙3ˆ ˙3 (1) and (2) are also called the Bimultiplicity of the Cubic Jacobi Symbol.

↵ 3. If ↵ mod ⇡ ,then ” p q ⇡ “ ⇡ ˆ ˙3 ˆ ˙3 ↵ ↵ 2 ↵2 4. ⇡ “ ⇡ “ ⇡ ˆ ˙3 ˆ ˙3 ˆ ˙3 ↵ ↵ 5. ⇡ “ ˆ ˙3 ˆ ⇡ ˙3

Theorem 4.27 (Cubic Reciprocity). Let ⇡1,⇡2 be primary in D. Suppose that N ⇡1 , N ⇡2 3 ⇡ ⇡ p q p q‰ and N ⇡ N ⇡ .Then 2 1 p 1q‰ p 2q ⇡ “ ⇡ ˆ 1 ˙3 ˆ 2 ˙3 Moreover, when ⇡ is primary in D ⇡D, we are able to state the supplements of cubic reciprocity. { Proposition 4.28 (Supplements of Cubic Reciprocity). Suppose that N ⇡ 3. Suppose ⇡ is a primary prime in D,say⇡ a b! where a 3m 1. Then we have:p q‰ “ ` “ ´ 1 ! ´ !2m ⇡ “ ˆ ˙3 and ! m b ! ` . ⇡ 3 “ ´ ¯ Proof. This can be proved by applying the fact that 1 ! 2 3! and using the properties p ´ q “´ of the cubic residue character and cubic reciprocity. ⌅ 10 Example 4.29. Suppose ↵ 10 and ⇡ 5 6!. We calculate the value of by “ “ ` 5 6! 3 applying properties of the cubic character residue, cubic reciprocity, and theˆ corresponding` ˙ supplements. 10 Since N 10 is larger than N 5 6! ,wefirstsimplify by reducing 10 modulo p q p ` q 5 6! 3 5 6!. In order to achieve this, we use the Euclidean algorithm,ˆ ` ˙ as described in Proposi- tion` 3.4, to compute 10 5 6! . We begin by rationalizing˜p ` theq denominator by multiplying by the complex conjugate of 5 6!,whichis 1 6!: ` ´ ´ 10 1 6! 10 60 p´ ´ q !. 5 6! ¨ 1 6! “´31 ´ 31 p ` q p´ ´ q

20 Miaoqing Jia

10 60 The closet rational integer to 31 and 31 are 0 and 2 respectively. Hence, as in Proposition 3.4, we take 0 2! as´ the integer´ quotient of 10´ , and observe we can write ´ 5 6! 10 2! 5 6! 2 2! . (Note that N 2 ! p `N 10q .) “p´ qp ` q`p´ ´ q p´ ´ q† p q 10 2 2! 2 1 ! ´ ´ p qp´ ´ q . 5 6! “ 5 6! “ 5 6! ˆ ` ˙3 ˆ ` ˙3 ˆ ` ˙3 By properties of cubic Jacobi symbol, we have:

2 1 ! 2 1 ! p qp´ ´ q ´ ´ . 5 6! “ 5 6! 5 6! ˆ ` ˙3 ˆ ` ˙3ˆ ` ˙3 By cubic reciprocity, we have:

2 5 6! N 2 1 3 ` 5 6! p p q´ q{ 1 mod 5 6! . 5 6! “ 2 “p ` q ” p ` q ˆ ` ˙3 ˆ ˙3 Since 1 ! !2 0, we have 1 ! !2, indicating that: ` ` “ ´ ´ “ 2 1 ! ! 2 N 5 6! 1 3 20 2 ´ ´ ! p p ` q´ q{ ! ! mod 5 6! . 5 6! “ 5 6! “p q “ “ p ` q ˆ ` ˙3 ˆ ` ˙3 Thus, we have: 10 1 !2 !2 mod 5 6! . 5 6! “ ¨ “ p ` q ˆ ` ˙3 10 Since 1, we conclude that 10 is a cubic nonresidue modulo 5 6!. 5 6! ‰ ` ˆ ` ˙3 5 Congruence Criteria for Eisenstein Pseudocubes

In this section, we use the technique of congruential sieving to compute a table of Eisen- stein pseudocubes. First, we introduce the definition of an Eisenstein pseudocube. Then, we describe the congruential sieving method that we will use to create the Eisenstein pseu- docubes table. Finally, we will construct the Eisenstein pseudocubes table based on the three types of primes in Eisenstein integers. Before introducing the definition of an Eisenstein pseoducbe, we first briefly explain the main idea behind the prefix “pseudo.” An element can be called “pseudo” if it seems to have some characteristics but it actually does not have such characteristics. Specifically, an “Eisenstein pseudocube” is an element in Z ! seems to fulfill the requirement of being a cube but in fact is not a cube. r s

Definition 5.1. Let p be a fixed rational prime. We say µp a b! Z ! is an Eisenstein pseudocube for p if the following conditions hold: “ ` P r s

1. µp is primary; 2. gcd a, b 1; p q“ q 3. 1 for all rational primes q Z that q p; µ “ P § ˆ p ˙3

21 Miaoqing Jia

4. µp not a cube in Z ! . r s In particular, we will call µp a minimal Eisenstein pseudocube for the prime p if the norm of µp is the smallest among all the norms of Eisenstein pseudocube for p.

We explain this sense in which µp resembles a cube in Z ! , suppose µp is actually a cube r s 3 q q in Z ! . We then can write µp ↵ for some ↵ Z ! , indicating that . r s “ P r s µ “ ↵3 ˆ p ˙3 ˆ ˙3 After applying the bimultiplicity of the cubic character as shown in Proposition 4.26,we q q q q q q have . Based on Lemma 4.10, we know that µ “ ↵3 “ ↵ ↵ ↵ ↵ ˆ p ˙3 ˆ ˙3 ˆ ˙3ˆ ˙3ˆ ˙3 ˆ ˙3 q q q equals to 1,!,!2, so we always have 1 whether or not q is a cubic ↵ ↵ ↵ “ ˆ ˙3ˆ ˙3ˆ ˙3 residue mod µp. Suppose µ x y , we then use a method called congruential sieving [9] to compute p “ p ` p a table of Eisenstein pseudocubes µp. The main idea behind the congruential sieving is to q delete all “impossible” pseudocubes µ for possible prime p by using the criterion 1 p µ ‰ ˆ p ˙3 in Eisenstein integers for some q p, then those are left are pseudocubes. We need only test starting from the smallest remaining† value to find the first one that is not an actual cube. As described by Williams and Wooding [10], we need to first find all possible values of µp by establishing a set of acceptable residue conditions Sq on µp for all primes q p before applying congruential sieving. Based on three types of primes in Eisenstein integers,§ we consider three cases of Eisenstein pseudocubes. Case 1: q 1 mod 3 ”´ p q In this case, q q 0! is primary based on the Definition 3.10.Sinceµp is also primary, we can invoke cubic“ reciprocity` from Theorem 4.27:

q µ 1 p . “ µ “ q ˆ p ˙3 ˆ ˙3 µ Since p 1, we conclude µ is a cubic residue mod q. We compute the total number q “ p ˆ ˙3 of cubic residues mod q to see how many possible values remain for µp mod q. As shown in Proposition 4.3, D ⇡D˚ is a finite field with N ⇡ 1elementswhereD represents { p q´ Z ! . In this case, since q 2 mod 3 ,wehaveq is prime in D and the number of r s 2 ” p q elements in D qD˚ is q 1 based on Proposition 3.9. there is a homomorphism, denoted 3 { ´ f ↵ ↵ , from D ⇡D˚ to D ⇡D˚.Since1istheidentityelementinD ⇡D˚ and there arep q“ 3 elements cubing{ to 1 based{ on Lemma 4.10, we conclude that the kernel{ of f consists of those three elements: 1,!,!2 . Therefore, by the first Homomorphism Theorem, the t q2 1u q2 1 image of f has cardinality ´ . That is, there are ´ residue classes µ in D ⇡D 3 3 p { µ satisfying p 1. q “ ˆ ˙ 3 Now we focus on specific solutions of µp by computing µp a b! mod q for all 0 a, b q.Sincea b! 3 a3 b! 3 3a2 b! ”p3a b`! 2,wethenhaveq p q a §b! 3 † a3 b3 p 3`ab2 q 3“a2b `p3ab2 q! ` x p yq`! afterp q replacing !3 1 p ` q “p ` ´ q`p ´ q “ p ` p “

22 Miaoqing Jia and !2 1 !. Thus, we conclude: “´ ´ x a3 3ab2 b3 mod q p ” ´ ` p q y 3ab a b mod q . p ” p ´ qp q Since 0 a, b q, there are a total of q2 1 di↵erent pairs a, b .Sinceµ is a primary, § † ´ p q p then xp 2 mod 3 and yp 0 mod 3 .Sinceq and 3 are relatively prime, we then ” p q 3 ”2 p 3 q conclude that xp 2 a 3ab b mod q and yp 0 3ab a b mod q .Wenow consider three di↵”erent” cases´ about` thep pair a,q b . ” ” p ´ qp q p q Case 1 a 0 mod 3 .Sincea3 3ab2 b3 2 mod q ,wethenhaveb 2 mod 3 . ” p q ´ ` ” p q q” 1 p q Based on the fact that 0 a, b q and q 1 mod 3 , there are ` di↵erent § † ”´ p q 3 q 2 possible values for a and ´ di↵erent possible values for b. Thus, there are in total 3 q 1 q 2 q2 q 2 ` ´ ´ ´ possibilities for the pair a, b . 3 3 “ 9 p q ˆ ˙ˆ ˙ Case 2 a 1 mod 3 .Sincea3 3ab2 b3 2 mod q ,wethenhaveb 1 mod 3 . ” p q ´ ` ” p q q” 1 p q Based on the fact that 0 a, b q and q 1 mod 3 , there are ` di↵erent § † ”´ p q 3 q 1 possible values for a and ` di↵erent possible values for b. Thus, there are in total 3 q 1 q 1 q2 2q 1 ` ` ` ` possibilities for the pair a, b . 3 3 “ 9 p q ˆ ˙ˆ ˙ Case 3 a 2 mod 3 .Sincea3 3ab2 b3 2 mod q ,wethenhaveb 0 mod 3 . ” p q ´ ` ” p q q” 2 p q Based on the fact that 0 a, b q and q 1 mod 3 , there are ´ di↵erent § † ”´ p q 3 q 1 possible values for a and ` di↵erent possible values for b. Thus, there are in total 3 q 2 q 1 q2 q 2 ´ ` ´ ´ possibilities for the pair a, b . 3 3 “ 9 p q ˆ ˙ˆ ˙ However, there are some repetitions in Case 1 and Case 3. Specifically, in Case 1, the pair a, b 0,x will produce exactly the same xp and yp as the pair a, b x, 0 in Casep 3 whereq“p 0 qx q. Therefore, we need to subtract the number of repetitions,p q“ p whichq q 2§ † equals to ´ . 3 On the other hand, we notice that when yp 0, xp can be any number smaller than q. Thus, we focus on how to calculate the “remaining”“ solutions. When one of the a, b equals 0 and the other one congruent to 0 mod 3, the pair a, b will produce a new xp and yp. q 2 p q Since there are ´ di↵erent numbers strictly smaller than and congruent to 0 mod 3, 3 q 2 indicating that there are ´ di↵erent new µ . After combining all these cases, there are 3 p

q2 q 2 q2 2q 1 q2 q 2 q 2 q 2 q2 1 ´ ´ ` ` ´ ´ ´ ´ ´ 9 ` 9 ` 9 ´ 3 ` 3 “ 3 such solutions modulo q.

23 Miaoqing Jia

Example 5.2. The set of acceptable residues for Eisenstein pseudocubes modulo 11 is given by

S 1 0! , 2 0! , 3 0! , 4 0! , 5 0! , 6 0! , 7 0! , 8 0! , 11 “tp ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 9 0! , 10 0! , 3 1! , 6 1! , 9 1! , 1 2! , 6 2! , 7 2! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 5 3! , 7 3! , 9 3! , 1 4! , 2 4! , 3 4! , 1 5! , 4 5! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 8 5! , 3 6! , 7 6! , 10 6! , 8 7! , 9 7! , 10 7! , 2 8! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 4 8! , 6 8! , 4 9! , 5 9! , 10 9! , 2 10! , 5 10! , 8 10! . p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` qu Case 2: q 3 In this case, we first observe that 3! 1 ! 2.Thenwehave: “ ´ “p ´ q 3! 1 ! 2 ´ p ´ q . µ “ µ ˆ p ˙3 ˆ p ˙3 !2 Multiplying both sides by ,wehave: µ ˆ p ˙3 !2 3! !2 1 ! 2 ´ p ´ q . µ µ “ µ µ ˆ p ˙3ˆ p ˙3 ˆ p ˙3ˆ p ˙3 By the properties of the cubic Jacobi symbol from Proposition 4.26, we get:

3! !2 1 ! 2 !2 ´ ¨ p ´ q ¨ . µ “ µ ˆ p ˙3 ˆ p ˙3 1 Then we multiply both sides by ´ , which equals to 1 no matter what value µ is. µ p ˆ p ˙3 Thus, we have: 3 1 ! 1 ! 2 ´ ´ p ´ q 1. µ µ “ µ ¨ ˆ p ˙3ˆ p ˙3 ˆ p ˙3 3 ! 1 ! 2 p ´ q µ “ µ ˆ p ˙3 ˆ p ˙3 k 1 k Since µp is primary, we can write µp xp yp! 1 ´ i 1 ↵i where ↵i ri si! are primary primes. From the supplement“ of the` cubic“p´ reciprocityq ´ as shown in Proposition“ ` 4.28, we know that: ± 2 r 1 1 ! p i` q ´ ! 3 ↵ “ ˆ i ˙3 and r 1 s ! i` ` i ! 3 . ↵ “ ˆ i ˙3 Then we have: k 2 r 1 k 1 ! p i` q 3 2 i 1 ri 1 3 ´ ! ! “ p ` q{ µ “ “ ˆ p ˙3 i 1 ∞ π“

24 Miaoqing Jia and k r 1 s k k ! i` ` i r 1 3 s 3 ! 3 ! i 1p i` q{ ` i 1 i{ . µ “ “ “ “ ˆ p ˙3 i 1 ∞ ∞ π“ After multiplying these two terms, we get:

! 1 ! k k k 2 i 1 ri 1 3 i 1 ri 1 3 i 1 si 3 p ´ q ! “ p ` q{ ! “ p ` q{ ` “ { µ “ ¨ ˆ p ˙3 ∞ ∞ ∞ k k k 2 i 1 ri 1 3 i 1 ri 1 3 i 1 si 3 ! “ p ` q{ ` “ p ` q{ ` “ { “ ∞ ∞ ∞ k 2 r 1 3 r 1 3 k s 3 ! i 1 p i` q{ `p i` q{ ` i 1 i{ “ “ “ ∞k k ∞ i 1 ri 1 i 1 si 3 ! “ p ` q` “ { “ ∞ ∞

Since ↵i is a primary, it needs to fulfill that ri 2 mod 3 and si 0 mod 3 . After considering !3 1, we get: ” p q ” p q “

! 1 ! k k k i 1 ri 1 i 1 si 3 i 1 si 3 p ´ q ! “ p ` q` “ { ! “ { . µ “ “ ˆ p ˙3 ∞ ∞ ∞ As a result, we have:

3 ! 1 ! 2 p ´ q µ “ µ ˆ p ˙3 ˆ p ˙3 k s 3 2 ! i 1 i{ “p “ q 2∞ k 3 i 1 si ! “ . “ ∞

! 1 ! k 3 2 k i 1 si 3 3 i 1 si In conclusion, we have p ´ q ! “ { and ! “ . µ “ µ “ ˆ p ˙3 ∞ ˆ p ˙3 ∞ n 1 n Lemma 5.3. Let µp xp yp! 1 ´ i 1 ↵i where ↵i ri si! are primary “n 1 `n “p´q “ n “ ` primes. Then xp 1 ´ i 1 ri mod 9 and yp i 1 si mod 9 . ”p´ q “ p q ± ” “ p q Proof. We prove by induction.± If n 1, we have µ ∞ x y ! ↵ r s !. “ p “ p ` p “ 1 “ 1 ` 1 This proves that xp r1 mod 9 and yp s1 mod 9 . Now we let aj rj sj! and a r s ! be primary.” p Accordingq to the” definitionsp q of primary, we can“ write` s 3S k “ k ` k i “ i and ri 1 3Ri for some Si,Ri Z.Thenwehave: “´ ` P r s ! r s ! r 3S ! r 3S ! ´p k ` k qp j ` j q“´p k ` k qp j ` j q r r 3 S r S r ! “´ k j ´ p j k ` k jq r r 3 S 1 3R S 1 3R ! “´ k j ´ p jp´ ` kq` kp´ ` jqq r r 3 S 3R S S 3R S ! “´ k j ´ p´ k ` j k ´ j ` k jq r r s s ! mod 9 “´ k j `p k ` jq p q which is still primary.

25 Miaoqing Jia

Therefore, we conclude that:

n n n n 1 n 1 1 ´ ri si! 1 ´ ri si! mod 9 . p´ q i 1p ` q”p´ q i 1 ` i 1 p q π“ π“ ÿ“ n 1 n Based on the assumption that µp xp yp! 1 ´ i 1 ri si!, we get: “ ` “p´ q “ ` n ± n 1 xp 1 ´ ri mod 9 ”p´ q i 1 p q π“ and n yp si mod 9 . ” i 1 p q ÿ“ ⌅ k k From Lemma 5.3,wehaveyp i 1 si mod 9 , indicating that yp 3 i 1 si 3 mod 3 . “ “ p q { ” “ { p q 3 2 k 2 3 2 y 3 i 1 si 3 yp 3 yp p Therefore, we obtain ! ∞ “ ! .Thus,if ! ∞ 1, then 3 3 µp 3 “ ∞ “ µp 3 “ “ | 3 ˆ ˙ ˆ ˙ based on the fact ! 1, which is equivalent to 9 yp. After considering the requirement “ 3 | that µ is primary, we conclude that if 1, then 9 y and x 1 mod 3 . p µ “ | p p ”´ p q ˆ p ˙3 Example 5.4. The set of acceptable residues for Eisenstein pseudocube modulo 9 is given by S 2 0! , 5 0! , 8 0! . 9 “tp ` q p ` q p ` qu Case 3: q 1 mod 3 In this case,” sincep q 1 q mod 3 , we can write q ⇡ ⇡ where ⇡ a b! is primary ” p q “ q q q “ ` based on Proposition 3.9. The conjugate of ⇡q, denoted ⇡q, equals a b b! and is also primary. p ´ q´

Lemma 5.5. Let q be a rational prime, q ⇡q⇡q with ⇡q Z ! prime and primary. Then q µ “ µ P r s we have 1 if and only if p p µ “ ⇡ “ ⇡ ˆ p ˙3 ˆ q ˙3 ˆ q ˙3 Proof. Since q, µp,⇡q, ⇡q are all primary, we can invoke the cubic reciprocity and the prop- erties of cubic Jacobi symbol to get:

q ⇡q⇡q ⇡q ⇡q µ “ µ “ µ µ ˆ p ˙3 ˆ p ˙3 ˆ p ˙3ˆ p ˙3 µp µp µp µp “ ⇡ ⇡ “ ⇡ ⇡ ˆ q ˙3ˆ q ˙3 ˆ q ˙3ˆ q ˙3 1 µp µp ´ “ ⇡ ⇡ ˆ q ˙3ˆ q ˙3

q µp µp Therefore, we conclude that 1 if and only if . ⌅ µ “ ⇡ “ ⇡ ˆ p ˙3 ˆ q ˙3 ˆ q ˙3

26 Miaoqing Jia

q µ µ If 1, then we have p p from Lemma 5.5. Based on the Defini- µp 3 “ ⇡q 3 “ ⇡q 3 ˆ ˙ q 1 ˆ ˙ ˆ ˙ q 1 µp ´3 µp ´3 tion 4.24,wehave µp mod ⇡q and µp mod ⇡q . Thus, we conclude ⇡q 3 ” p q ⇡q 3 ” p q q 1 q 1 ˆ ˙ ˆ ˙ ´3 ´3 µp µp that µp µp mod ⇡ . After taking complex conjugate of both and , ” p qq ⇡ ⇡ ˆ q ˙3 ˆ q ˙3 µp µp µp q 1 we get . Based on the Definition 4.24,wehave µ ´3 mod ⇡ ⇡ “ ⇡ ⇡ ” p p qq ˆ q ˙3 ˆ q ˙3 ˆ q ˙3 q 1 q 1 q 1 µp ´3 ´ ´3 and µp mod ⇡q . This indicates that µp 3 µp mod ⇡q . ⇡q 3 ” p q ” p q ˆ ˙ q 1 q 1 q 1 q 1 ´3 ´3 ´ ´3 After combining µp µp mod ⇡ and µ 3 µp mod ⇡ , we conclude that: ” p qq p ” p qq

q 1 q 1 q ´3 ´ 1 if and only if µp µ 3 mod ⇡ ⇡ . µ “ ” p p q qq ˆ p ˙3 Since ⇡ ⇡ q,wehave: q q “

q 1 q 1 q ´3 ´ 1 if and only if µp µ 3 mod q . (5.1) µ “ ” p p q ˆ p ˙3 As suggested by Williams and Wooding [10], Lucas sequence is able to help us to determine a set of congruence conditions on µp based on Equation 5.1. Now suppose q 1 q 1 ´3 ´ µ x y !. We then can rewrite µp µ 3 mod q to be: p “ p ` p ” p p q q 1 q 1 ´3 x y ! ´3 x y ! x y y ! mod q . (5.2) p p ` pq ” p p ` p q ”p p ´ pq´ p p q When q yp, Equation 5.2 becomes xp xp mod q where 1 xp q 1. Thus, q | ” p q § § ´ 1 holds whenever q y and 1 x q 1. µ “ | p § p § ´ ˆ p ˙3 Now we consider the remaining case that q - yp. Assume Sn x, y ,Tn x, y Z x, y are two recurring sequences where: p q p qP r s

S x, y x (5.3) 1p q“ T x, y y (5.4) 1p q“ S T ! S T ! n (5.5) n ` n “p 1 ` 1 q 2 with Sn,Tn Z. By taking complex conjugate, we have Sn Tn! Sn Tn! .Thus,we get: P ` “ ` S T !2 S T !2 n. (5.6) n ` n “p 1 ` 1 q After subtracting Equation 5.6 from Equation 5.5, we get:

! !2 T S T ! n S T !2 n. (5.7) p ´ q n “p 1 ` 1 q ´p 1 ` 1 q 2 Now we write ↵ µp xp yp! and µp xp yp! . We can represent Tn in a closed form: “ “ ` “ “ ` ↵n n T ´ . n “ ! !2 ´

27 Miaoqing Jia

↵0 0 ↵1 1 In particular, we see that T ´ 0 and T ´ y . Now suppose 0 “ ! !2 “ 1 “ ! !2 “ p G ↵ and H ↵.Thus,wehave´ T G, H is given by the´ second-order recurrence: “ ` “ np q Tn 2 GTn 1 HTn. Therefore, the Equation 5.1 can be rewrite as: ` “ ` ´

q q 1 q 1 1 if and only if q ↵ ´3 ´3 . (5.8) µp 3 “ | ´ ˆ ˙ ´ ¯ Hence, we have: q 1 if and only if q T q 1 G, H . (5.9) µ “ | ´3 p q ˆ p ˙3 1 Since q - yp,wenowdefineanewtermzp where zp xpyp´ mod q . According to q 1 q 1 ” q 1 p q 1 q Equation 5.8,wehaveq ↵ ´3 ´3 , indicating that ↵ ´3 ´3 mod q .Since ↵ µ x y ! and |pµ ´x y q!2,wethenhave ” p q “ p “ p ` p “ p “ p ` p q 1 q 1 ´ 2 ´ x y ! 3 x y ! 3 mod q . p p ` p q ”pp ` p q p q q 1 q 1 ´ 2 ´ This indicates that zq ! 3 zp ! 3 mod q . Now setting ↵1 zp !, and 2 p ` q ”p ` q p q “ ` 1 z ! , we obtain: “ p ` q 1 if and only if q T q 1 G1,H1 (5.10) µ “ | ´3 p q ˆ p ˙3 where

2 2 G1 ↵1 1 ↵1 1 ! ! 1 ↵1 ! 1 ! 1 2z 1 “ ` “ ` ´p ` ` q“p ´ q`p ´ q´ “ p ´ 2 2 2 2 H1 ↵11 z ! z ! z z ! ! 1 z z 1. “ “p p ` qp p ` q“ p ` pp ` q` “ p ´ p `

Furthermore, we define a polynomial Tn z that only contains one variable z Z such that: p q P T z 0 (5.11) 0p q“ T z 1 (5.12) 1p q“ 2 Tn 1 z G1Tn z H1Tn 1 z 2z 1 Tn z z z 1 Tn 1 z . (5.13) ` p q“ p q´ ´ p q“p ´ q p q´p ´ ` q ´ p q n n ↵1 1 Then we observe that Tn z Un G1,H1 where Un ´ is the Lucas function p q“ p q “ ↵1 1 such that ´

G1 ↵1 1 2z 1 (5.14) “ ` “ ´ 2 H1 ↵11 z z 1. (5.15) “ “ ´ ` 2 Hence, we conclude that ↵1 z ! and 1 z ! . As described by Wooding and Williams [10], the theory of Lucas“p sequences` q can“p be applied` q to obtain an ecient algorithm that both computes the acceptable congruence conditions on xp,yp mod q to achieve q p q 1 and calculates number of acceptable residues for q. µ “ ˆ p ˙3

28 Miaoqing Jia

Thus, by combining the cases when q - yp and q yp, we see that there are: | q 1 q 1 2 ´ 1 q 1 q 1 p ´ q 3 ´ p ´ q`p ´ q“ 3 ˆ ˙ ˆ ˙ acceptable residues for a prime number q 1 mod 3 . ” p q Example 5.6. Consider the case q 13. We can derive the acceptable residue conditions “ on µp as follows. If q yp,then x 0! is acceptable for x 1,..., q 1 . | p ` q 13 “ p ´ q If q - yp,thenwehave 1 if and only if 13 T 13 1 G1,H1 T4 G1,H1 . After µ “ | 3´ p q“ p q ˆ p ˙3 considering Equation 5.13, Equation 5.14, and Equation 5.15,wehave:

T G1,H1 G1T G1,H1 H1T G1,H1 2p q“ 1p q´ 0p q G1 1 H1 0 “ ¨ ´ ¨ G1 2z 1 “ “ p ´

T G1,H1 G1T G1,H1 H1T G1,H1 3p q“ 2p q´ 1p q G1 2z 1 H1 1 “ ¨p p ´ q´ ¨ 2z 12 z 2 z 1 “ p ´ ´p p ´ p ` q 3z2 3z 2 “ p ´ p `

T G1,H1 G1T G1,H1 H1T G1,H1 4p q“ 3p q´ 2p q 2 G1 G1 H1 H1 G1 “ ¨p ´ q´ ¨ 2 G1 3z 3z 2 H1 2z 1 “ p p ´ p ` q´ p p ´ q 2z 1 2z2 2z 1 . “p p ´ qp p ´ p ` q Therefore, we conclude that:

13 1 if and only if 13 2z 1 2z2 2z 1 . (5.16) µ “ |p p ´ qp p ´ p ` q ˆ p ˙3 2 Since 13 is prime, then either 13 2zp 1 or 13 2zp 2zp 1 based on Equation 5.16. Thus, we need to consider both cases.|p ´ q |p ´ ` q

Case 1: 13 2zp 1 In this case, we have 2zp 1 mod 13 , indicating that zp 7 mod 13 . |p ´ q ” p q 1 ” p q This indicates that x 7y mod 13 based on the fact that z x y´ . Now we ob- p ” p p q p “ p p tain solutions by running xp through all nonzero residue classes mod 13 and computing 1 y 7´ x 2x mod 13 : p ” p ” p p q

xp 1 2 3 4 5 6 7 8 9 10 11 12 y 2x mod 13 2 4 6 8 10 12 1 3 5 7 9 11 p ” p p q

29 Miaoqing Jia

2 Case 2: 13 2zp 2zp 1 In this case, we have 2zpzp 2zp 12 mod 13 , indicating that z |pz 1´ 6 `modq 13 . Subtracting 6 on both sides,´ we” thenp get z q3 z 2 0 mod 13 , pp p´ q” p q p p´ qp p` q” p q and so zp 3 0 mod 13 or zp 2 0 mod 13 . p ´ q” p q p ` q” p q 1 If z 3 0 mod 13 ,wehavez 3 mod 13 . Based on the fact that z x y´ , p p ´ q” p q p ” p q p “ p p we get xp 3yp mod 13 . Now we can obtain solutions by running xp through all ” p q 1 nonzero residue classes mod 13 and computing y 3´ x 9x mod 13 : p ” p ” p p q

xp 1 2 3 4 5 6 7 8 9 10 11 12 y 9x mod 13 9 5 1 10 6 2 11 7 3 12 8 4 p ” p p q 1 If z 2 0 mod 13 ,wehavez 11 mod 13 . Based on the fact that z x y´ , p p ` q” p q p ” p q p “ p p we get xp 11yp mod 13 . Now we can obtain solutions by running xp through all ” p q 1 nonzero residue classes mod 13 and computing y 11´ x 6x mod 13 : p ” p ” p p q xp 1 2 3 4 5 6 7 8 9 10 11 12 y 6x mod 13 6 12 5 11 4 10 3 9 2 8 1 7 p ” p p q Combining the solutions for both q yp and q - yp, the set of acceptable residues for Eisenstein pseudocube modulo 13 is given| by

S 1 0! , 2 0! , 3 0! , 4 0! , 5 0! , 6 0! , 7 0! , 8 0! , 13 “tp ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 9 0! , 10 0! , 11 0! , 12 0! , 2 1! , 6 1! , 9 1! , 4 2! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 5 2! , 12 2! , 1 3! , 5 3! , 6 3! , 8 4! , 10 4! , 11 4! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 4 5! , 6 5! , 10 5! , 2 6! , 4 6! , 12 6! , 1 7! , 3 7! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 11 7! , 3 8! , 7 8! , 9 8! , 2 9! , 3 9! , 5 9! , 6 10! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q p ` q 7 10! , 8 10! , 12 11! , 8 11! , 9 11! , 4 12! , 7 12! , p ` q p ` q p ` q p ` q p ` q p ` q p ` q 11 12! . p ` qu As described in Williams and Wooding [10], we are able to apply the method of con- gruential sieving to establish a precomputed table of Eisenstein pseudocubes after consid- ering all three cases. Specifically, Williams and Wooding used the Calgary Scalable Sieve (CASSIE) [9], a software toolkit for congruential sieving, to establish a table for Eisenstein pseudocubes for p 109. § 6 Eisenstein Pseudocubes and Primality Testing

Eisenstein pseudocubes may be used to prove primality for integers N satisfying N 1 mod 3 via the Berrizbeitia theorem. ” p q Theorem 6.1. [2] Let ⌫ a b! be a primary element of Z ! , where gcd a, b 1, ⌫ is not “ ` r s p q“ a unit, prime, or perfect power in Z ! , and N ⌫ N µp . Suppose integer N 1 mod 3 . r s p q† p q ” p q q N 1 Then there must exist a rational prime q p such that q 3´ mod ⌫ . § ⌫ ı p q ˆ ˙3 Recall that if N 1 mod 3 and N is prime in Z,thenN ⌫⌫,where⌫ is a primary ” p q “ prime in Z ! . Furthermore, if q is any rational prime, then: r s

q N 1 q 3´ mod ⌫ . ⌫ ” p q ˆ ˙3

30 Miaoqing Jia

Table 1: Eisenstein Pseudocubes p N µ µ p pq p 5 643 29 18! 7 5113 71 ` 72! 11 13507 23 `126! 13 39199 227` 90! 17 1 07803 181 `198! 19 3 60007 ´653 ` 126! 23 39 04969 443 `2160! 29 61 07191 1669 ` 1170! 31 103 18249 ´3617 ` 2520! 37 273 33067 6023 ` 3366! 41 991 79467 4973 `11466! 43 5329 97833 15451 ` 11088! 47 22785 22747 ´54017 ` 17514! 53 27417 02809 47477 ` 56160! 59 1 85007 66499 66887 `156510! 61, 67 4 15475 53813 235061 ` 107172! 71 11 94233 48797 139813 ` 253764! 73 82 46210 13649 ´267733 ` 744120! 79, 83 115 18103 60731 ´1227419 ` 761670! 89 2507 90827 69801 5052689 `4961880! 97 3393 26375 28481 2127709 ` 4462200! 101 9175 67688 29893 ´10322861 ` 8601732! 103, 107 21408 90619 32079 3056387 `15918570! 109 81221 66151 53761 27791551` 1366560! ´ `

If we have a table of Eisenstein pseudocubes available to us, then we will be able to certify primality for an integer N 1 mod 3 by the following algorithm. ” p q Step 1 Test that N is not a perfect power.

Step 2 Find a primary ⌫ Z ! , such that N ⌫ N. If this step fails, then N is composite. P r s p q“

Step 3 In a precomputed table of Eisenstein pseudocubes, find µp Z ! of minimal norm such that N N µ . P r s † p pq q N 1 Step 4 For each prime q p,checkif q 3´ mod ⌫ . § ⌫ ” p q ˆ ˙3 Proposition 6.2. If an integer N 1 passes all four steps in the algorithm, then N is prime. °

q N 1 Proof. As shown in the step 4, we have q 3´ mod ⌫ holds for each prime q p, ⌫ 3 ” p q § which contradicts the conclusion of Theoremˆ ˙ 6.1. Therefore, ⌫ is either a unit, prime, or

31 Miaoqing Jia prefect power. Since N 1, we assert that ⌫ is not a unit. To show this, if ⌫ were a unit, then we would have °N N ⌫ 1 by Lemma 3.1, contradicting the assumption that N 1. Thus, ⌫ is not a unit.“ p q“ °Since N is not a perfect power from the step 1, we assert that ⌫ is not a perfect power. For ⌫=↵k,where↵ D and k Z.SinceN ⌫ N,wethenhaveN N ⌫ N ↵k N ↵ k, indicating that PN is also aP perfect power.p q“ Thus, ⌫ is not a perfect“ power.p q“ p q“ p p qq So far, we have already shown that ⌫ is neither a perfect power, nor a unit, indicating that ⌫ must be prime. Now we want to show if ⌫ is prime, then N is prime. Assume N is not prime. say N mn. We want to show that either m 1 or n 1. Since N N ⌫ ⌫⌫, we have mn “⌫⌫.Since⌫ is prime, either ⌫ m or ⌫ “n. Suppose“ ⌫ m.Thenthereexists“ p q“ D such that“ m ⌫.Thus,wehavemn | ⌫n |⌫⌫, indicating that| n ⌫. However, sinceP ⌫ is prime, ⌫ is“ prime as well. Therefore,“ since“⌫ n,wehaveeither“is a unit or n is a unit. If is a unit, we have N m m2 N ⌫ “ 1 N ⌫ N. This indicates that N is a perfect power, contradictingp theq“ step“ 1. Onp theq“ other¨ p hand,q“ if n is a unit, we have n 1 and m N, as desired. Therefore, N has to be prime. ⌅ “˘ “˘ Example 6.3. Consider the case N 7. We apply the algorithm and the precomputed table of Eisenstein pseudocubes to show“ that 7 is prime.

Proof. In the step 1, it is clear that 7 is neither a perfect power nor a unit. In the step 2, we have 7 N 2 3! where 2 3! is a primary in Eisenstein integers. In the step “ p ` q ` 3, we choose µp 29 18! from the precomputed table of Eisenstein pseudocubes where N µ 643 7.“ In particular,` we get p 5 from this precomputed table as well. In the p pq“ ° “ q N 1 step 4, we need to test whether or not q 3´ mod v holds for all q p.Since v 3 ” p q § p 5, then q can only be 2 or 3. Thus, weˆ only˙ need to make two tests. “

2 7 1 1. Check if 2 ´3 mod 2 3! . 2 3! ” p ` q ˆ ` ˙3 Since both 2 3! and 2 are primary, we apply cubic reciprocity and get ` 2 2 3! ! N 2 1 ` ! p 3q´ ! mod 2 3! . 2 3! “ 2 “ 2 “ ” p ` q ˆ ` ˙3 ˆ ˙3 ˆ ˙3 On the other hand, we apply the Euclidean algorithm and get

7 1 2 ´3 4 2! 2 3! 2 2! 2 2! ! mod 2 3! . “ “p´ qp ` q`p´ ´ q”p´ ´ q” p ` q

2 7 1 We conclude that 2 ´3 mod 2 3! . 2 3! ” p ` q ˆ ` ˙3 3 7 1 2. Check if 3 ´3 mod 2 3! . 2 3! ” p ` q ˆ ` ˙3 We apply the Euclidean algorithm and get 3 ! 2 3! !.Thus,wehave “p´ qp ` q´

N 2 3! 1 3 ! p ` q´ 2 2 ´ ! 3 ! ! 1 ! mod 2 3! . 2 3! “ 2 3! “p´ q ”p´ q ” ”´ ´ p ` q ˆ ` ˙3 ˆ ` ˙3

32 Miaoqing Jia

On the other hand, after applying the Euclidean algorithm, we get

7 1 3 ´3 9 1 4! 2 3! 1 ! 1 ! mod 2 3! . “ “p´ ´ qp ` q`p´ ´ q”´ ´ p ` q

3 7 1 Since 1 ! 1 ! mod 2 3! , we conclude that 3 ´3 mod 2 3! . ´ ´ ”´ ´ p ` q 2 3! ” p ` q ˆ ` ˙3 Therefore, since both tests hold when N 7, then 7 is a prime number. ⌅ “

33 REFERENCES Miaoqing Jia

References

[1] Agrawal, M., Kayal, N. and Saxena, N.: PRIMES is in P. In Annals of mathematics, 781-793. (2004) [2] Berrizbeitia, P., M¨uller, S. and Williams, H.C.: Pseudocubes and primality testing. In: Buell, D.A. (ed.) ANTS 2004. LNCS, vol. 3076, pp. 102-116. Springer, Heidelberg. (2004)

[3] Ireland, K. and Rosen, M.: A Classical Introduction to Modern Number Theory, 2nd ed. Graduate Texts in Mathematics, vol. 84. Springer, Heidelberg. (1990) [4] Lukes, R.F., Patterson, C.D. and Williams, H.: Some results on pseudosquares. Mathe- matics of Computations 65(213), S25-S27, 361-372. (1996)

[5] Miller, G.L.: Riemann’s hypothesis and tests for primality. in Proceedings of seventh annual ACM symposium on Theory of computing, pp 234-239. ACM, (1975) [6] Rivest, R.L., Shamir, A. and Adleman, L.: A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM, 21(2), 120-126. (1978)

[7] Solovay, R. and Strassen, V.: A fast Monte-Carlo test for primality. SIAM journal on Computing 6, 6(1), pp 84-85. (1977) [8] Wiliams, H.C.: Edouard` Lucas and Primality Testing. Canadian Mathematical Society Series of Monographs and Advanced Tests, vol. 22. Wiley Interscience, Hoboken. (1998) [9] Wooding, K. and Williams, H.C.: Doubly-focused enumeration of pseudosquares and pseudocubes. In: Hess, F., Pauli, S., Pohst, M. (eds.) ANTS 2006. LNCS, vol. 4076, pp. 208-221. Springer, Heidelberg. (2006) [10] Wooding, K. and Williams, H.C.: Improved Primality Proving with Eisenstein Pseu- docubes. In: Algorithmic number-theory, pp. 331-339. Springer Berline Heidelberg. (2010)

34