• No results found

Primality Testing

N/A
N/A
Protected

Academic year: 2021

Share "Primality Testing"

Copied!
26
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Primality Testing

Bachelor's thesis

May 2, 2016

Student: P. A. van der Sluis

Primary supervisor: Prof. dr. J. Top

Secondary supervisor: Prof. dr. E.C. Wit

(2)
(3)

Abstract

This thesis discusses the primality of two types of numbers. In 1857, French mathematician Édouard Lucas stated that 2127− 1 was a prime number. In the 1930s, American mathematician Derrick Lehmer came up with a simple test for finding primes of the form 2n− 1, n ∈ N. In this thesis I give a detailed proof of a more general version of this test, based on the unpublished notes from Jaap Top. After that, a part of the proof will be modified to make variations and find different prime tests. The second type of numbers are of the form K`:= 32`−32`−1+1. I will give an necessary and sufficient condition for primes of this form, but only proof the necessary part of it. This proof is based on elliptic curves. The last part of this thesis is used to discuss several important differences between the two tests.

(4)

Contents

1 Introduction 4

1.1 Mersenne Numbers . . . 4 1.2 The numbers K` . . . 4

2 Mersenne Numbers 5

2.1 Finding the square root of 6 in Fq . . . 6 2.2 Number of elements of G(FMn) . . . 9 2.3 Determining the elements of order 4 in G(K). . . 11

3 Primality of K` 14

3.1 Part of the proof of the theorem . . . 14 3.2 The particular form of K` . . . 17

4 Generating primes 18

5 Results 19

6 Explanation of the results 19

7 Conclusion 21

A The group G := Z(x2− 3y2− 1) 22

B Magma 23

C Proof that Z[ω] is Euclidean 24

Bibliography 25

(5)

1 Introduction

This thesis discusses the primality of two types of numbers: Mn:= 2n−1, n ∈ N and Mn and Kl:= 32l− 32l−1+ 1, l ∈ N.

1.1 Mersenne Numbers

The first type of numbers, Mn, are also called the Mersenne numbers. Observe that M1= 1 is not prime and M2= 3 is prime. For n > 2, one can first think about some necessary conditions on the number n. For example if n is a even number, we see that 2n− 1 = (2n2 − 1)(2n2 + 1), so since n > 2 both factors are larger then 1 and thus Mn is a composite number. To find a more strict condition on n, assume n is a composite number, say n = ab, with a, b 6= 1, 2n− 1 = 2ab− 1 = (2a− 1)(1 + 2a+ 22a+ · · · + 2(b−2)a+ 2(b−1)a). Since a and b are larger then 1, both factors are larger then 1 and hence Mnis composite. We conclude that n composite implies Mn composite. But for n prime, we cannot say directly whether 2n− 1 is prime. We see this since M3 = 7 is prime but M11= 2047 = 23 · 89 is not. In section 2 a necessary and sufficient condition on n for the primality of Mn is stated and proved. This condition is the classical Lucas-Lehmer test, initiated by Lucas in 1856 and in 1878, and finalized by Lehmer in 1935.

1.2 The numbers K

`

With ω := e2πi/3 ∈ C, the integers K` = 32` − 32`−1 + 1 can be written as Kl = (32l−1 + ω)(32`−1+ ω). In Subsection 3.2 it will be explained that for an integer of the form (3m+ ω)(3m+ ω) to be a prime number, a necessary condition is that m is a power of 2. We will present some details concerning a primality test using elliptic curves, which was introduced by Denomme and Savin in 2008.

(6)

2 Mersenne Numbers

In order to find a neseccary and sufficient condition for the primality of Mersenne numbers, we first define a recurrence relation.

a0:= 4, ak+1:= a2k− 2

Theorem 1. Mnwith n > 2 is a prime number if and only if an−2≡ 0 mod Mn. The proof of this theorem is based on 4 lemmas. But before stating these, first state some definitions.

Definition 1. Let P be a polynomial. By Z(P ) we mean the set of all zeros of the polynomial P .

The proof of theorem 1 makes use of

G := Z(x2− 3y2− 1).

So G consists of pairs (a, b) satisfying a2− 3b2= 1.

Definition 2. Let K be a field. Then

G(K) := {(x, y) ∈ K × K| x2− 3y2= 1}

is an abelian group, with zero element (1, 0) and group operation will be defined as follows:

(x1, y1) + (x2, y2) := (x1x2+ 3y1y2, x1y2+ x2y1).

It is not hard to show that G(K) is indeed an abelian group. Every element (x, y) ∈ G has an inverse, given by (x, y)−1 = (x, −y). Note that (x, y) ∈ G implies that (x, −y) ∈ G. Details are found in appendix A on page 22. The last thing we need to show is that the sum of every two elements of G is also an element of G. We know that

(x1, y1) + (x2, y2) = (x1x2+ 3y1y2, x1y2+ x2y1) If we fill in this point in the polynomial, we get the following:

(x1x2+ 3y1y2)2− 3(x1y2+ x2y1) − 1 =x21x22+ 6x1x2y1y2+ 9y21y22− 3x21y21 + 3x1x2y1y2+ 3x22y21− 1

=x21x22− 3x21y22− 3x22y12+ 9y21y22− 1

=(x21− 3y12)(x22− 3y22) − 1

=0

Thus (x1, y1) + (x2, y2) ∈ G, ∀(x1, y1), (x2, y2) ∈ G.

The first lemma describes the relation between the recurrence relation and the group. Note that (2, 1) ∈ G.

(7)

Lemma 1. 2 · (x coordinate of 2k(2, 1)) = ak.

Proof. The proof of this lemma is done by induction. Note that for k = 0, both sides of the equation equal 4 and therefore the base step holds. For the inductive step, assume 2 · (x coordinate of 2k(2, 1)) = ak. For the righthand side we know ak+1= a2k− 2. For the lefthand side 2k+1(2, 1)) = 2 · 2k(2, 1) = 2 · (a2k, ∗). Since (a2k, ∗) has to be an element of the group, we know that (a2k)2− 3 ∗2−1 = 0, thus 3∗2= (a2k)2− 1. Thus

2 · (ak

2 , ∗) = (a2k

4 + 3∗2, µ) = (a2k 4 +a2k

4 − 1, µ) for some µ.

Therefore we conclude that

2·(x coordinate of 2k+1(2, 1)) = 2·(x coordinate of (a2k

2 −1, µ) = 2·(a2k

2 −1) = ak+1

which proves the lemma.

2.1 Finding the square root of 6 in F

q

Definition 3. Let R be a ring. R∗2:= {x ∈ R|∃y ∈ R : x = y2} ⊂ R

For proving the next lemma, we want to find specific values for q such that 6 ∈ F∗2q . We do this by expressing√

6 in terms of roots of unity. This is done in analogy with the same problem over the complex numbers.

In C, we want to find an element a such that a2= 6. Consider

 := e2πi3 = −12+12

−3 β := e2πi8 = 12

2 + 12

−2 γ := β := e11πi12 = 14(−1 +√

−3)(√ 2 +√

−2) Eliminating the parenthesis will yield in a expression with√

6 in it. Namely γ = 1

4(−√ 2 −√

−2 +√

−6 +√ 6)

Adding its complex conjugate to this, the complex parts will cancel out.

γ +1 γ =1

2(√ 6 −√

2)

Note that β + β1 = √

2. Therefore 2γ + 2γ + β + 1β = √

6. In this way we constructed the square root of 6 ∈ C.

Proposition 1. If the characteristic of Fq is not equal to 2 or 3, 6 ∈ F∗2q ⇔ q ≡ 1, 5, 19, 23 mod 24.

(8)

Proof. Taking a similar approach as the complex numbers, consider Ω = ΩXF24−1

q ,

the splitting field of X24− 1. By definition of the splitting field, ∃α ∈ Ω : ord(α) = 24. Thus α24 = 1, α12 = −1. Analogous to the complex numbers, consider

(2α + 2

α− α3− 1

α3)2 (1)

When this expression equals 6, we have found the square root of 6.

(2α + 2

α− α3− 1

α3)2= 4α2+ 4

α2 + α6+ 1

α6 + 8 − 4α4− 4

α2 − 4α2− 4 α4 + 2

= α12− 4α10+ 10α6− 4α2+ 1 α6

Since we know that α has order 24, α12 = −1, thus α12+ 1 = (α4)3+ 1 = 0, therefore we may conclude that (α4+ 1)(α8− α4+ 1) = 0. Since ord(α) = 24, α4 6= −1. Therefore α8 = α4− 1. Combining these results, we see that expression 1 is equal to

−4α10+ 10α6− 4α2

α6 =−4α8+ 10α4− 4 α4

=−4α4+ 4 + 10α4− 4 α4

=6α4 α4

= 6 Therefore we may conclude that:

(2α + 2

α− α3− 1 α3)2= 6

Now we are only interested in the question whether β := 2α +2α− α3α13 ∈ Fq. This is the case when it is a root of xq−x. So we need to find all possibilities of q such that

2α + 2

α− α3− 1

α3 = (2α +2

α− α3− 1

α3)q (2)

Note that βq = (2α + α2 − α3α13)q = (2α)q + (α2)q − (α3)q − (α13)q = 2αq + α2q − (αq)31q)3. Observe that if q ≡ x mod 24, it suffices to look whether βx is equal to β, since every factor α24 is equal to 1.

By assumption, the characteristic is not equal to 2 or 3. Thus the only possibilities for q that are left are q ≡ 1, 5, 7, 11, 13, 17, 19, 23 mod 24. Note that if q ≡ x mod 24 satisfies the equation if and only if q ≡ −x mod 24 satisfy the equation. Since α24 = 1, we know that for q ≡ ±1 mod 24, equation 2 holds.

(9)

For q ≡ ±5, we get

βq = 2α5+ 2

α5 − α15− 1 α15

= 2α5− 2α7+ α3+ 1 α3

= 2α5− 2α3+ 2

α+ α3+ 1 α3

= 2α − 2 α3 + 2

α− α3+ 1 α3

= 2α + 2

α− α3− 1 α3

= β Therefore if q ≡ ±5 mod 24, 6 ∈ F∗2q

For q ≡ ±7 mod 24, we have βq = 2α7+ 2

α7 − α21− 1 α21

= 2α3− 2

α− 2α5+ α9+ 1 α9

= 2α3− 2

α− 2α + 2

α3 + α5− α − α3

= 2α3− 2

α− 2α + 2

α3 + α − 1

α3 − α − α3

= −2α − 2

α+ α3+ 1 α3

= −β

Therefore if q ≡ ±7 mod 24, 6 /∈ F∗2q

For q ≡ ±11 mod 24, we have βq= 2α11+ 2

α11 − α33− 1 α33

= 2

α− 2α − α9− 1 α9

= −2α − 2 α+ 1

α3 + α3

= −β Therefore if q ≡ ±11 mod 24, 6 /∈ F∗2q

Lemma 2. Let Mn be a prime number with n odd. Then (2, 1) ∈ G is not divisible by 2 in G(FMn)

(10)

Proof. We want to know whether the element (2, 1) is divisible by 2, that is

∃(x, y) ∈ G : (x, y) + (x, y) = (2, 1) If such point exists, it has to satisfy the following equations:





x2− 3y2 = 1 x2+ 3y2 = 2

2xy = 1

Subtracting the first equation from the second, it follows that 6y2= 1 and by proposition 1 there exists a solution in G(Fq) if and only if 6−1 ∈ F∗2q . Note that F∗2q is a group therefore it is sufficient to show that 6 ∈ F∗2q

Considering the Mersenne numbers, we see that Mn = 2n− 1 ≡ (−1)n − 1 mod 3. For odd n, we see that Mn ≡ 1 mod 3. For n ≥ 3, 8|Mn+ 1. Therefore Mn ≡ 7 mod 8. Combining these two gives us that Mn ≡ 7 mod 24 for n ≥ 3 and odd. Therefore we may apply proposition 1 and conclude that (2, 1) is not divisible by 2 in G(FMn).

2.2 Number of elements of G(F

Mn

)

Let Fq be a finite field of cardinality q.

Lemma 3. Assume the characteristic of Fq is not equal to 2 or 3. Then

#G(Fq) =

(q − 1 if q ≡ 1, 11 mod 12 q + 1 if q ≡ 5, 7 mod 12

Proof. To find #G(Fq) for characteristics different than 2 or 3, we make a relation between G(Fq)\{(1, 0)} and the set of linear relations between y and x of the form y = γ(x − 1), γ ∈ Fq. The latter set has q elements. We do this with the following map:

f : (a, b) 7→ y = b

a − 1(x − 1)

(1, 0) is the only element in G(Fq) with x-coordinate 1, thus a − 1 6= 0, and therefore this is a well defined map. To see whether the map is injective, we see if two different elements can be mapped to the same line. So assumea−1b = c−1d This results in the following set of equations:





a2− 3b2 = 1 c2− 3d2 = 1 b(c − 1) = d(a − 1)

(11)

Combining the first and third equation, we get a2− 1 =3d(c−1)2(a−1)22

⇒ a + 1 =3d(c−1)2(a−1)2

⇒ a(1 − (c−1)3d22) = −1 −(c−1)3d22

⇒ a =−(c−1)(c−1)22−3d−3d22

Since 3d2= c2− 1, this implies

a =−(c−1)(c−1)22−c−c22+1+1

=−(c−1)−c−1(c−1)−c−1

=−2c−2

= c

By the third equation of the system b = d thus the image is injective.

Conversely,

f−1( y = t(x − 1) ) = {(a, b)|a2− 3b2= 1, a 6= 1, t = b a − 1} Combining these gives

a2− 3t2(a − 1)2− 1 = 0 (a − 1)(a + 1 − 3t2(a − 1)) = 0 Since a 6= 1, the second factor has to be equal to zero, thus

a(1 − 3t2) + 1 + 3t2= 0

Filling this in gives us the unique a and b satisfying this set of equations, there- fore the inverse is defined as follows:

f−1 : y = t(x − 1) 7→ (3t2+ 1 3t2− 1, 2t

3t2− 1)

A little care is required when 3−1∈ G(Fq)∗2, since the inverse isn’t well defined in that case, because the relation y = ±3−1(x − 1) can not be mapped to an element of G(Fq)\{(1, 0)}. Therefore

#G(Fq)\{(1, 0)} =

(q if 3−1∈ G(F/ q)∗2 q − 2 if 3−1∈ G(Fq)∗2 Thus we want to know whether 3 ∈ F∗2q .

Considering the same technique as on page 6, we want to see when 3 ∈ F∗2q . Consider Ω = ΩxF12−1

q . Let α ∈ Ω be the element of order 12. Thus α12 = 1,

(12)

α6 = −1. Therefore (α2+ 1)(α4− α2+ 1) = 0 and α4− α2+ 1 = 0 because α26= −1. So

(α + 1

α)2= α2+ 2 + 1 α2

= α2+ 2 − α4

= α4+ 1 + 2 − α4

= 3 Now we want to find all q that satisfy

(α + 1

α)q = α + 1

α (3)

Note that the only values for q mod 12 that are possible are ±1, ±5. All the others cannot occur because the characteristic has to be 2 or 3 in that case.

Consider the four cases that are left.

q ≡ 1 mod 12

Trivial. Satisfies condition 3.

q ≡ 5 mod 12

(α +α1)q = α5+α15 = −1α− α. So this does not satisfy condition 3.

q ≡ 7 mod 12

(α +α1)q = α7+α17 = −α −α1 So it does not satisfy condition 3.

q ≡ 11 mod 12

(α +α1)q = α11+α111 = α1 + α. So it does satisfy condition 3.

Therefore we may conclude that:

#G(Fq) =

(q − 1 if q ≡ 1, 11 mod 12 q + 1 if q ≡ 5, 7 mod 12

Corollary 1. Assume Mn is prime and n ≥ 3. #G(FMn) = Mn+ 1 = 2n. Proof. This is a direct consequence of lemma 3 and the fact that Mn≡ 7 mod 24 thus Mn≡ 7 mod 12

2.3 Determining the elements of order 4 in G(K).

The next lemma describes the elements of order 4 in the group G(K). If the characteristic of K is equal to 2, all elements except the unit are of order 2. If the characteristic is not equal to 2, an element of order two must satisfy the

(13)

following equations:









x2+ 3y2 = 1

2xy = 0

x2− 3y2 = 1 (x, y) 6= (1, 0)

It follows easily that only (−1, 0) satisfies this set of equations.

Now we want to find elements of order 4 in G(K). If the characteristic is 2 or 3, we clearly have no elements of order 4. Note that in characteristic 3, we also have no elements with x-coordinate 0. For elements of order 4 in characteristic different than 2 or 3, we state the following lemma.

Lemma 4. Let a ∈ G(K). If the characteristic of K is not equal to 2, the order of a is 4 if and only if the x-coordinate of a equals 0.

Proof. For finding elements of order 4, thus (u, v) + (u, v) = (−1, 0), we need to solve the following set of equations.





u2− 3v2 = −1 u2+ 3v2 = 1

2uv = 0

By a simple calculation it follows that the only elements of order 4 are the elements (0, ±1

3).

The other way around. Assume a has an x-coordinate equal to 0. Since a is an element of the group G(K) we have 3y2= 1 and therefore the y-coordinate of a is equal to ±1

3 and in both cases a is an element of order 4.

Now that the four lemmas are stated and proved, one can prove the Mersenne primality condition.

Proof of theorem 1. Assume Mn is prime, n > 2. Since 2n− 1 ≡ (−1)n− 1 ≡ 0 mod 3 for n even, we may conclude that n is odd. Therefore the characteristic of G(FMn) is not equal to 2. Note that in the proof of lemma 4 we saw that (−1, 0) is the only element of order 2. By corollary 1 we have that #G(FMn) = 2n and therefore G(FMn) ' Z/2nZ. By lemma 2, we have that (2, 1) is not divisible by 2, thus this element generates the group and has order 2n. Therefore 2n−2(2, 1) has order 4. By lemma 4 we have that the x-coordinate equals 0 and therefore by lemma 1 we can conclude that an−2≡ 0 mod Mn.

Assume an−2 ≡ 0 mod Mn. If p|Mn, then an−2 ≡ 0 mod p. Note that p = 2 implies that Mnis even which is not possible. Since the characteristic is not 2, by lemma 4 we have that there is an element of order 4. Therefore the characteristic is not 3 and thus n is odd. In G(Fp) we get thus that 2n−2(2, 1) = (0, ±1

3).

Thus by lemma 1, 2n−2(2, 1) has order 4 in G(Fp). Therefore (2, 1) has order 2n. Since the order of an element is a divisor of the number of elements in the

(14)

group, we get that 2n ≤ #G(Fp). In the proof of lemma 3 we saw that the maximum possible numbers of elements in the group is p + 1, so

2n≤ #G(Fp) ≤ p + 1 Which implies p ≥ 2n− 1 = Mn. Therefore Mn is prime.

(15)

3 Primality of K

`

In the next section another primality test is described. The proof of the test involves elliptic curves, but the theorem itself is stated without them. Let K`:= 32`− 32`−1+ 1 and f (x) := −30x90x32−1.

For n > 1 we write fn for the composition f ◦ f ◦ . . . ◦ f (composing f n times).

Theorem 2. K` is prime if and only if f2`−1(12) ≡ 0 mod K` (and f (12) mod K`, f2(12) mod K`, . . . , f2`−1(12) mod K` are all well-defined).

As remarked above, the proof of this statement uses elliptic curves. An introduction to the theory of such curves is, e.g., the textbook [8] written by J. Tate and J. Silverman. An elliptic curve over a field K (of characteristic 6= 2) is a curve E given by an equation y2= ax3+ bx2+ cx + d, with a, b, c, d ∈ K satisfying the condition that ax3+ bx2+ cx + d is a polynomial of degree 3 without multiple zeros. Moreover, one adds a point O ‘at infinity’. The set E(K) consisting of all points on the curve with x, y ∈ K together with the point O is in fact an abelian group. Here O is the unit element, the inverse of any point (x, y) ∈ E(K) is the point (x, −y), and (x1, y1) + (x2, y2) = (x3, y3) precisely when (x1, y1), (x2, y2), (x3, −y3) are the intersection points of E with a line.

3.1 Part of the proof of the theorem

To prove this theorem, we first state another theorem that almost directly im- plies theorem 2. Let E : y2= 30x3+14, which defines an elliptic curve over the field K provided the characteristic of K is not 2 and not 3 and not 5. Moreover, assume ω := −1+

−3

2 ∈ K. This is an element of order 3 in the group K. Note that K`= k``with k`= −1 − 32`−1ω. Here K`is regarded as an element of the prime field of K, so it is K`mod p in case the characteristic is p > 0.

Moreover, ¯k` means that ω is replaced by ω2 (which is the complex conjugate of ω in case K ⊂ C). Furthermore we define ρ : E → E, (x, y) 7→ (ωx, y). This is a homomorphism E(K) → E(K) in case ω ∈ K.

Theorem 3. P := (12, 2) is a point on the elliptic curve E. K` is prime if and only if

(ρ − ρ2)2`−1· P ≡ (0, ±1

2) mod k`.

In this thesis, I will not give a proof of the "only if" part. For a complete proof see the article of Silverberg[3] or the article of Denomme and Savin[5]

Before proving the theorem, some useful propositions are stated and proved.

Proposition 2. K`∈ Z is prime if and only if k`∈ Z[ω] is irreducible.

Proof. Assume K` ∈ Z is prime. Assume there exist a, b ∈ Z[ω] such that k`= a · b. Then K`= k`· ¯k`= a · ¯a · b · ¯b. Note that a · ¯a ∈ Z and b · ¯b ∈ Z. Since

(16)

K` is prime by assumption, a · ¯a = 1 or b · ¯b = 1. Therefore a or b is unit and therefore k` is irreducible.

The other way around, assume kl is irreducible. Since Z[ω] is Euclidean and therefore a principal ideal domain, this implies that (k`) ⊂ Z[ω] is a maximal ideal and therefore Z[ω]k

` is a field. By Proposition 3, this field has N (k`) = K`= pn elements, for some p prime and n ∈ Z. Since p|K`, we get

32`− 32`−1+ 1 ≡ 0 mod p

Define x := 32`−1, for convenience. Now x2− x + 1 ≡ 0 mod p which implies x3+ 1 = (x + 1)(x2− x + 1) ≡ 0 mod p. Therefore x6 ≡ 1 mod p. We know therefore that the order of x mod p ∈ {1, 2, 3, 6}. The order of x equal to 1 implies that x = 1, hence 1 = x2− x + 1 = 0 in Fp. This contradicts the fact that p is prime. The order of x equal to 2 implies that x = −1, hence x2− x + 1 = 3 = 0 in Fp. This contradicts the fact that K`≡ 1 mod 3. Order 3 contradicts the fact that x3≡ −1 mod p. Therefore ord(x) = ord(32l−1) = 6.

Therefore 6|p − 1. And thus p ≡ 1 mod 6.

Note that

Z[ω]

(p) = Fp[x]

(x2+ x + 1),

and x2+ x + 1 ∈ Fp[x] is reducible because p ≡ 1 mod 6. From [6], it follows that p is reducible in Z[ω]. Write p = u · α1· α2· · · αt, with t ≥ 2, u ∈ Z[ω], and αi irreducible. Now

K`= k`· ¯k`= pn = un· αn1 · αn2· · · αnt

but since k`and ¯k`are irreducible, their product consists of exactly 2 irreducible factors. Therefore pn consists of two irreducible factors and thus t = 2 and n = 1. Therefore we conclude that K` is prime.

Proposition 3. Consider Z[α] ∼= Z[x]/(x2−ax−b), with α = x mod (x2−ax−b) for some a, b ∈ Z. For any (n, m) ∈ Z with (n, m) 6= (0, 0) one has

# Z[α]

(n + mα) = |N (n + mα)|.

Proof. Consider the additive group of Z[α]. The map f : Z[α] → Z2, c + cα 7→

(c, d) is a group isomorphism. The subgroup (n + mα) is generated by n + mα and (n + mα) · α = nα + maα + mb. These generators are mapped under f to (n, m) and (mb, n + ma), respectively. Now

Z2

(n, m)Z + (mb, n + ma)Z' Z[α]

(n + mα) As seen in [1], if

det n m

mb n + ma

 6= 0

(17)

the number of elements of (n,m)Z+(mb,n+ma)ZZ2 is equal to the absolute value of this determinant. Thus

# Z[α]

(n + mα)= |n2+ nma − m2b| = |N (n + mα)|.

Proof of theorem 3. ⇐: Suppose p is a prime divisor of K`. From the proof of Proposition 2 we know p ≡ 1 mod 6, hence p = ππ for some irreducible π ∈ Z[ω]. Then Z[ω]/(π) =: Fp is a finite field with p elements. We have the homomorphism ρ : E(Fp) → E(Fp), (x, y) 7→ (ωx, y). Then (ρ2+ ρ + id)(x, y) = (ω2x, y)+(ωx, y)+(x, y) = O for every (x, y) ∈ E. Thus ρ2= −ρ−id. Consider a point Q := (x, y) ∈ E. Note that

x =0

⇐⇒

ρ(Q) = Q

⇐⇒

(1 − ρ)(Q) = O

⇐⇒

(ρ − ρ2)(Q) = O.

Note that ρ − ρ2= ρ − (−ρ − id) = 2ρ + id; the calculation above shows that the kernel of this map consists of O together with the points (x, y) ∈ E with x = 0, i.e., the points (0, ±12). Consider the map

f : Z[ω] → E(Fp), n + mω 7→ (n + mρ)P

This is a homomorphism of Z[ω]-modules, hence its kernel is an ideal in Z[ω].

Since Z[ω] is euclidean, the kernel is of the form (α). Recall that (2ρ + id) · (0, ±12) = O. By assumption (2ρ + id)2`−1 · P = (0, ±12) ∈ E(Fp), hence (2ρ + id)2`· P = O.

We see that (2ω + 1)2` ∈ ker(f ) = (α) and (2ω + 1)2`−1∈ ker(f ). Note that/ 2ω + 1 is irreducible in Z[ω] because N (2ω + 1) = 3.

Now we are going to find the decomposition in irreducible factors of (α).

Since α|(2ω+1)2` and 2ω+1 is irreducible, it follows that α = (2ω+1)k, k ≤ 2l. But from (2ω + 1)2`−1 ∈ (α), it follows that 2/ ` − 1 < k. Combining these inequalities, we get k = 2` and thus ker(f ) = ((2ω + 1)2`). As a result,

f (Z[ω]) = Z[ρ]P ' Z[ω]

((2ω + 1)2`). From Proposition 3, one finds

#E(Fp) ≥ #f (Z[ω]) = # Z[ω]

((2ω + 1)2l) = N ((2ω + 1)2l) = 32l.

(18)

Applying the Hasse bound[2], we get that #E(Fp) ≤ (√

p + 1)2. So (√

p + 1)2=≥ #E(Fp) ≥ 32` ≥ 32`− 32`−1+ 1 = K`

Thus√

p + 1 ≥√

K`, which implies p >√

K` provided ` > 1. In case ` ≤ 1 the number K` is certainly a prime, and for ` > 1 we showed that the condition of the theorem implies that every possible prime divisor of K`is larger than√

K`, which also implies that K` is prime.

3.2 The particular form of K

`

One may wonder why our K` has this particular form. Why a power of 2 for example? The proof of Proposition 2 shows that 32n− 3n+ 1 is prime if and only if 3n+ ω ∈ Z[ω] is irreducible.

Proposition 4. 3n+ ω is not irreducible in case n has prime divisors other then 2 and 3.

Proof. The following identity plays an important role in the next proof. For n odd, we have

xn+ yn= (x + y)(xn−1− xn−2y + . . . − xyn−2+ yn−1) (4) If n = pa for some prime p > 3, then

(3a)p+ ω1+3m= 3n+ ω = (3a)p+ (ω−1)2+3m for all m ∈ N.

We pick m such that either 1+3m = p, or 2+3m = p depending on p mod 3.

Then by equation 4, k`is divisible by 3a+ ω±1 which completes the proof.

Proposition 5. For each k ∈ N, 33k+ ω is not irreducible.

Proof. Note

32a+1+ ω = ((1 − 2 · 3a)ω + 1 − 3a)((1 + 2 · 3a)ω + 1 + 3a))

For a := 3k2−1, which is a natural number since 3k is odd, this shows the proposition.

To conclude, if we want to generate a prime number of the form k`· ¯k`, where k` := 3n+ ω, we have the necessary condition that n is of the form n := 2i· 3j with i ≥ 1. For example the case n = 6 results is a prime number 312− 36+ 1 = 530713. However in this text we restrict to the numbers where j = 0.

(19)

4 Generating primes

Now that we have found primality conditions, one may want to apply this con- ditions to find prime numbers. Here is some Maple code to find these kind of primes and some examples of the primes generated by this code.

With a simple algorithm that calculates the values of an−2mod Mn, we can easily find large prime numbers.

Listing 1: Finding Mersenne Primes

1 for n from 2 to 4500 do 2 Mn := (2^n-1);

3 A:= 4;

4 for i from 1 to (n-2) do 5 A:= (A^2-2) mod Mn;

6 end do

7 if A=0

8 then print(n);

9 end if 10 end do:

After a few iterations we already find some prime numbers. We see that Mn is prime for n = 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423. Note that 24423− 1 ≈ 101331. The found prime number thus already has more than thousand decimal digits.

For the numbers K`, the condition we have found is not very easy to calcu- late. Therefore we adjust the test a bit to make it easier to calculate with. As one can see in appendix B, we have (ρ − ρ2)(x, y) = (13x

3901

x2 , ξ) with ξ such that the point is in E. To implement the condition of theorem 3, one iterates f (x) = 13xx32901 . Then f2l−1(12) ≡ 0 mod Kl implies Kl is prime. We convert this to the following algorithm to find prime numbers.

1 for l to 8 do

2 Kl := 3^(2^l)-3^(2^(l-1))+1;

3 x := 1/2;

4 for n to 2^l-1 do

5 x := ‘mod‘((-(1/3)*x^3-1/90)/x^2, Kl) 6 end do;

7 if x = 0 then

8 print(l)

9 end if 10 end do

With this algorithm we found 3 primes, namely K1 = 7, K2 = 73 and K3 = 6481.

(20)

5 Results

One may wonder whether this test can be used to find prime large prime numbers efficiently. Do these tests even generate infinitely many prime numbers? The following tests have run for 20 minutes each on a regular computer. See the results below

Prime Digits of largest found number computation time

M4423 ≈ 1331 20 min

K3 4 20 min

6 Explanation of the results

One may wonder why the test for Mersenne primes generate a significantly more primes than the K` test. In this section some plausible arguments are given for this results.

Definition 4. Let π(x) denote the number of primes lower or equal to x.

Theorem 4 (Prime Number Theorem).

x→∞lim π(x)

x ln(x) = 1

For the proof of the Prime Number Theorem and further reading, see [7].

This is equivalent to saying that π(x) behaves asymptotically the same as ln xx , π(x) ≈ x

ln x

Consider the interval [1, . . . , x], if we take a number random in this interval, the probability that this number is prime is roughly ln x1 . With a little abuse of the random choosing, we pick K`from the interval [1, . . . , K`]. The probability that this is prime is ln K1

`. Thus the expected number of primes of the form K` is

X

`=0

1 ln K`

≈ 0.975 · · · .

We already found 3 primes K`which is more that the expected number based on the above heuristics. Unfortunately, we cannot prove that no more such primes exist. As mentioned before, the exponents of K`do not necessary involve only a pure power of two. It can also be of the form 32k3`−1−32k−13`−1+1. When using the same approximation for the number of prime numbers, we find a slightly higher expected number, since that sum will also converge. Thus this yield also in a finite amount of prime numbers. We conclude that most likely the method for finding primes of the form K` will not produce large prime numbers.

In contrast to the Mersenne numbers, where the exponent is quite simple, we

(21)

suspect that this method will produce infinite number of prime numbers. If we consider the same infinite sum for the Mersenne numbers, we see that

X

p

1 ln Mp

=X

p

1

ln 2p− 1 ≥X

p

1 ln 2p = 1

ln 2 X

p

1 p

where we sum over all prime numbers p. This is a diverging sum, as was proven by Euler in 1744. See a modified proof of this this argument in [4]. So one expects that an infinite number of Mersenne primes exist.

(22)

7 Conclusion

In conclusion, we have found and proven primality conditions for the numbers Mn and K`. When we used them to find large prime numbers, we found two main differences between the two tests: Mn from which we suspect that it will generate infinite prime numbers and K`from which we suspect that if will generate a finite amount of prime numbers. Further research can be done to find theorems that support this conjecture. In the proof of the Mersenne primality condition, we only used that Mn ≡ 7 mod 24. We can adjust our arguments easily to generate primes of other forms. One may perform research on these kind of numbers.

(23)

A The group G := Z(x

2

− 3y

2

− 1)

To prove that G := Z(x2− 3y2− 1) ⊂ A2is a algebraic abelian group, we check whether it satisfies the four group properties.

(G1)

Let (x1, y1), (x2, y2), (x3, y3) ∈ G. Now

((x1, y1) + (x2, y2)) + (x3, y3) = (x1x2+ 3y1y2, x1y2+ x2y1) + (x3, y3)

= (x1x2x3+3x1y2y3+3y1x2y3+3y1y2x3, 3y1y2y3+x1x2y3+x1y2x3+y1x2x3) On the other hand:

(x1, y1) + ((x2, y2) + (x3, y3)) = (x1, y1) + (x2x3+ 3y2y3, x2y3+ x3y2)

= (x1x2x3+3x1y2y3+3y1x2y3+3y1y2x3, 3y1y2y3+x1x2y3+x1y2x3+y1x2x3) Therefore ∀x, y, z ∈ G, (x + y) + z = x + (y + z).

(G2)

(1, 0) Is the additive unit since

∀(x, y) ∈ G, (x, y) + (1, 0) = (x · 1 + 3 · y · 0, x · 0 + y · 1) = (x, y) (G3)

To see that (x, −y) is actually the inverse of (x, y) ∈ G, consider (x, y) + (x, −y) = (x2−3y2, xy−xy) = (1, 0), since (x, y) is a zero of the polynomial x2− 3y2− 1.

(G4)

(x1, y1) + (x2, y2) := (x1x2+ 3y1y2, x1y2+ x2y1)

= (x2x1+ 3y2y1, x2y1+ x1y2) = (x2, y2) + (x1, y1)

Since G is defined by a polynomial and addition and taking the inverse are maps given by polynomials, G is algebraic.

(24)

B Magma

The following commands are used to find a sufficient condition for finding Kl

primes. The following code shows that (ρ − ρ2)(x, y) = (13xx32901 , ξ).

1 > Q:=Rationals();

2 > Pol<x>:=PolynomialRing(Q);

3 > K<w>:=ext<Q | x^2+x+1>;

4 > F<a>:=FunctionField(K);

5 > PF<T>:=PolynomialRing(F);

6 > L<b>:=ext<F | T^2-30*a^3-1/4>;

7 > E:=EllipticCurve([L!0,L!225]);

8 > P:=E![30*a,30*b];

9 > rho:=map<E->E | A :-> [w*A[1],A[2],A[3]]>;

10 > rho(P)-rho(rho(P));

11 ((-10*a^3 - 1/3)/a^2 : (1/3*(20*w + 10)*a^3 + 1/9*(-4*w - 2))/a

^3*b : 1)

12 > Pt:=rho(P)-rho(rho(P));

13 > Pt[1]/30;

14 (-1/3*a^3 - 1/90)/a^2

Which produce the following result

1 (-1/3*a^3 - 1/90)/a^2

(25)

C Proof that Z[ω] is Euclidean

Z[ω] is Euclidean if

∀a, b ∈ Z[ω], b 6= 0, ∃q, r ∈ Z[ω] such that: a = qb + r, with |r|2< |b|2 with the map | · |2: Z[ω] → Z≥0 defined as in [6].

Proposition 6. Z[ω] is Euclidean

Proof. Write a, b ∈ Z[ω] as n + mω, k + lω, respectively and assume b 6= 0. Then a

b =n + mω

k + lω = (n + mω)(l + lω)

|k + lω|2 = α + βω

for some α, β ∈ Q. Now pick x ∈ Z such that |α − x| ≤ 12 and y ∈ Z such that

|β − y| ≤ 12. Now if we take q := x + yω ∈ Z[ω], then a

b = q + ξ + ηω

where |ξ|, |η| ≤ 12. Take r := b(ξ + ηω) = a − bq ∈ Z[ω]. Then

|r|2= |b|2|ξ + ηω|2= |b|22− ξη + η2) ≤ 3

4|b|2< |b|2

Therefore we may conclude that Z[ω] is Euclidean with respect to the norm map | · |2: Z[ω] → Z≥0.

(26)

Bibliography

[1] J. Top, Groepentheorie. http://www.math.rug.nl/∼top/alg1.pdf, pages 105–119.

[2] J.H. Silverman, An Introduction to the Theory of Elliptic Curves.

http://www.math.rug.nl/∼top/BenC.pdf, pages 49–69.

[3] A. Silverberg, Some remarks on primality proving and elliptic curves. 2014, pages 427–436.

[4] J. Top, http://www.math.rug.nl/∼top/lectures/carrousel8.pdf.

[5] R. Denomme, G. Savin, Elliptic curve primality tests for Fermat and related primes, Journal of Number Theory. 2008, pages 2398 – 2412.

[6] B. van Geemen, H.W. Lenstra, F. Oort, J.Top, Algebraïsche Structuren.

http://www.math.rug.nl/∼top/dic.pdf, pages 90–91, 200–201.

[7] Dorian Goldfeld, THE ELEMENTARY PROOF OF THE PRIME

NUMBER THEOREM: AN HISTORICAL PERSPECTIVE.

http://www.math.columbia.edu/∼goldfeld/ErdosSelbergDispute.pdf.

[8] J. Tate and J. Silverman, Rational Points on Elliptic Curves. ISBN 978-1- 4419-3101-6, 1992.

Referenties

GERELATEERDE DOCUMENTEN

In order to prove that a number n is prime rather than composite we need a converse to Fermat's theorem.. Two problems

Experts above all recognise added value in including indicators at macro level that fall within the cluster signal and risk behaviour (such as how young people spend their

The only restriction is that if there are any numbered equations inside the subequations environment that break out of the subequation numbering sequence, they would have to be

A prime number is a positive integer other than 1 that is only divisible by 1 and itself.. As you will show in Exercise 1.1, there are infinitely

(11-19) Protocollen zijn, gestuurd door wet- en regelgeving, opgesteld door experts en sluiten vaak niet aan bij de behoeften en denkwijze van

prime number, prime number theorem, Fermat primes, Mersenne primes, Sophie Ger- main primes, twin primes, prime number races, Chebotarev density theorem, heuristic argument,

Notwithstanding the relative indifference toward it, intel- lectual history and what I will suggest is its necessary complement, compara- tive intellectual history, constitute an

Everybody can hear the choice of the number and of p A computes the remainder of 777 a upon division by p and gives this to B. B computes the remainder of 777 b upon division by p