ON PRIME NUMBER FUNCTIONS a Necessary and Sufficient Condition

Total Page:16

File Type:pdf, Size:1020Kb

ON PRIME NUMBER FUNCTIONS a Necessary and Sufficient Condition MORE ON PRIME NUMBER FUNCTIONS In several recent notes we have derived and discussed some properties of the point function- f (N 2 ) 1 F(N ) Nf (N 3 ) , where f(x)=[(x)-(x+1)]/x is a function we have designated as the number fraction, is the familiar sigma function of number theory, and x=N represents any positive integer starting with two . We can generate the following table for the functions f(N) and F(N) for integers 2 through 15- Integer, N Number Fraction, f(N Prime Number Function, F(N 2 0 1 3 0 1 4 1/2 15/31 5 0 1 6 5/6 90/383 7 0 1 8 3/4 21/85 9 1/3 40/121 10 7/10 216/1339 11 0 1 12 5/4 134/1117 13 0 1 14 9/14 398/3255 15 8/15 201/1432 What is immediately obvious from this table is that the function F(N) equals unity only if N is a prime number and is found to be less than one for composite numbers. Also the number fraction f(N) has zero value when N is a prime but a finite value when composite. For obvious reasons we refer to f(N) and F(N) as the Prime Number Functions. It is our purpose here to discuss some additional properties of these functions. Again, from earlier notes, we recall that any prime number above N=3 has the form 6n±1 without exception. We call such prime numbers Q Primes. They represent all possible primes N=5 or greater. However, it must be noted that not all N=6n±1 numbers need to be primes. Coming to mind are the composites 25, 35, 49, etc. How does one know when N is indeed a prime? The answer can be summarized by the following - A necessary and sufficient condition for N>3 to be a prime is that N=6n±1 and that F(N)=1 and f(N)=0 In actual calculations one can distinguishes between prime and composite numbers by evaluating just one of these functions since the second will follow. The required calculations efforts to show f(N)=0 is somewhat simpler than determining F(N)=1. However, the graph of F(N) versus N in a given range of N more clearly shows the locations of primes as indicated by the following graph over the range3<N<50- The primes clearly stand out in this figure. What is important to emphasize that all primes above N=3 have the form N=6n±1 without exception. For example the prime N=127 has the form N=6(21)+1 which also means that 127 mod(6)=1. Let us work out a few more examples and present the results in the following table- N N mod (6) f(N) F(N) Category 3247 1 0.064059 0.0048308.. Composite 1797629 5 0.0016388 0.000339558.. Composite 659083149 3 - - Composite 4294967297 5 0.0015602 0.14923 x 10-6 Composite 1763524987135789 1 0 1 Prime 5343721409546135798791 0 1 Prime The last 22 digit long number lies at the limit of my PCs capability. It does clearly show that this number is a prime. Note that the mod(6) operation comes in very handy for telling one if the number N has the possibility of being a prime. The requirement is N mod(6) =1 or N mod6)=5 followed by the F(N)=1 or f(N)=0 test. If an odd number has the form N mod(6)=3 it implies N=6n+3 and hence can the number can never be a prime. The 4th number given in the above table is the Fermat number 232+1. It was first shown to be composite by Leonard Euler. We next look at semi-primes. These have the important property that N=pq , where p and q are different prime numbers. Thus N=403=13x31 is a good example of a semi-prime. Such semi-primes, when involving numbers of one hundred digit length or so, play a central role in present day public key cryptography. The number fraction for any semi-prime equals- (1 p)(1 q) pq 1 ( p q) 1 1 f ( pq) pq pq p q This will generally be a very small number much less than one but greater than zero. We have f(403)=44/403=0.10918114… Since N=pq, we have the quadratic equation- p 2 pf (N ) N 0 with the solution- Nf (N ) Nf (N ) p [ ]2 N 2 2 So, once f(N) for a semi-prime is known, the two prime number components p and q can be determined. Lets try this for the semi-prime N=455839=6(75973)+1. Here we have f(N)=1360/455839=0.0029835.. and the quadratic solves as p=599 and q=761. This particular semi-prime is often used to demonstrate the elliptic curve factorization method of Lenstra. We can also use a graphical method to factor semi-primes. Take for example the semi-prime N=pq=120643 for which f(N)=0.006332733.. Using the above identity for f(pq) we have- x 1 f (N ) where x p or q N x Plotting this equation and the line f=0.00633.. over a large enough range produces two curves which intersect at x=p and x=q as shown- One can also work out the value for the function F(N) when N=pq. This however leads to a rather complicated expression since- ( p p 2 ) (q q2 ) pq(1 p q) f [( pq)2 ] ( pq)2 and- ( p p 2 p3 ) (q q2 q3 ) pq(1 p p 2 q q2 ) ( pq)2 (1 p q) f [( pq)3 ] ( pq)3 It produces- [( p p 2 q q2 ) pq(1 p q) ( pq)2 ] F( pq) [( p p 2 p3 q q2 q3 ) pq(1 p p 2 q q2 ) ( pq)2 (1 p q) That this equality is correct may easily be checked by setting p=2 and q=3 so that N=6. We find- f (36) 1 (6 12) 6(6) 36 90 F(6) 6 f (216) (14 39) 6(7 12) 36(6) 383 The values of f(N) and F(N) can often be written down in analytic form. Take the case of N=2n for n two or greater. We have f(4)=1/2, f(8)=3/4, f(16)=7/8, and f(32)=15/16. From this we see that- f (2n ) 1 21n Thus f(1024)=f(210)=1-(1/512)=511/512. Substituting into the definition equation for F(N) also yields- (22n 1) F(2n ) (23n1 1) As n gets large f(2n) approaches the value of one and F(2n) approaches a value of zero. Thus N=2n will never satisfy the criteria for a prime number. This is of course obvious since 2n is an even number . However, the slight modification f(2n-1) changes things completely. This new number represents a Mersenne Number. If n takes on certain prime number values, the Mersenne number can become a prime. For example, N=213-1=8191 is a Mersenne Prime. Continuing on to f(3n), we find f(9)=1/3, f(27)= 4/9, and f(81)=13/27. So the general term will be- 1 f (32 ) (1 31n ) 2 Also one finds that- (32n 1) F(3n ) (33n1 1) Thus- 38 1 6560 F(81) F(34 ) 0.0370316... 311 1 177146 By looking at the forms F(2n)and F(3n), one can postulate that for any number rn we have- (r 2n 1) F(r n ) (r 3n1 1) In testing out this equality, we find the expression in indeed true provided r is a prime. It fails to work when r is a composite. For example, N=75 works fine producing F(75)= (710-1)/(714-1)= 0.00041649. But the function F(127)=(1214- 1)/(1220-1)= 0.3348979767x10-6 fails to agree with the computer result of F(127)= 0.41862x10-7 based on the definition of F(N) given at the beginning of this note. Thus we can say the above analytic result for F(rn)works provided we also have that F(r)=1. May 2014 .
Recommended publications
  • 1 Mersenne Primes and Perfect Numbers
    1 Mersenne Primes and Perfect Numbers Basic idea: try to construct primes of the form an − 1; a, n ≥ 1. e.g., 21 − 1 = 3 but 24 − 1=3· 5 23 − 1=7 25 − 1=31 26 − 1=63=32 · 7 27 − 1 = 127 211 − 1 = 2047 = (23)(89) 213 − 1 = 8191 Lemma: xn − 1=(x − 1)(xn−1 + xn−2 + ···+ x +1) Corollary:(x − 1)|(xn − 1) So for an − 1tobeprime,weneeda =2. Moreover, if n = md, we can apply the lemma with x = ad.Then (ad − 1)|(an − 1) So we get the following Lemma If an − 1 is a prime, then a =2andn is prime. Definition:AMersenne prime is a prime of the form q =2p − 1,pprime. Question: are they infinitely many Mersenne primes? Best known: The 37th Mersenne prime q is associated to p = 3021377, and this was done in 1998. One expects that p = 6972593 will give the next Mersenne prime; this is close to being proved, but not all the details have been checked. Definition: A positive integer n is perfect iff it equals the sum of all its (positive) divisors <n. Definition: σ(n)= d|n d (divisor function) So u is perfect if n = σ(u) − n, i.e. if σ(u)=2n. Well known example: n =6=1+2+3 Properties of σ: 1. σ(1) = 1 1 2. n is a prime iff σ(n)=n +1 p σ pj p ··· pj pj+1−1 3. If is a prime, ( )=1+ + + = p−1 4. (Exercise) If (n1,n2)=1thenσ(n1)σ(n2)=σ(n1n2) “multiplicativity”.
    [Show full text]
  • Mersenne and Fermat Numbers 2, 3, 5, 7, 13, 17, 19, 31
    MERSENNE AND FERMAT NUMBERS RAPHAEL M. ROBINSON 1. Mersenne numbers. The Mersenne numbers are of the form 2n — 1. As a result of the computation described below, it can now be stated that the first seventeen primes of this form correspond to the following values of ra: 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281. The first seventeen even perfect numbers are therefore obtained by substituting these values of ra in the expression 2n_1(2n —1). The first twelve of the Mersenne primes have been known since 1914; the twelfth, 2127—1, was indeed found by Lucas as early as 1876, and for the next seventy-five years was the largest known prime. More details on the history of the Mersenne numbers may be found in Archibald [l]; see also Kraitchik [4]. The next five Mersenne primes were found in 1952; they are at present the five largest known primes of any form. They were announced in Lehmer [7] and discussed by Uhler [13]. It is clear that 2" —1 can be factored algebraically if ra is composite; hence 2n —1 cannot be prime unless w is prime. Fermat's theorem yields a factor of 2n —1 only when ra + 1 is prime, and hence does not determine any additional cases in which 2"-1 is known to be com- posite. On the other hand, it follows from Euler's criterion that if ra = 0, 3 (mod 4) and 2ra + l is prime, then 2ra + l is a factor of 2n— 1.
    [Show full text]
  • Primes and Primality Testing
    Primes and Primality Testing A Technological/Historical Perspective Jennifer Ellis Department of Mathematics and Computer Science What is a prime number? A number p greater than one is prime if and only if the only divisors of p are 1 and p. Examples: 2, 3, 5, and 7 A few larger examples: 71887 524287 65537 2127 1 Primality Testing: Origins Eratosthenes: Developed “sieve” method 276-194 B.C. Nicknamed Beta – “second place” in many different academic disciplines Also made contributions to www-history.mcs.st- geometry, approximation of andrews.ac.uk/PictDisplay/Eratosthenes.html the Earth’s circumference Sieve of Eratosthenes 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Sieve of Eratosthenes We only need to “sieve” the multiples of numbers less than 10. Why? (10)(10)=100 (p)(q)<=100 Consider pq where p>10. Then for pq <=100, q must be less than 10. By sieving all the multiples of numbers less than 10 (here, multiples of q), we have removed all composite numbers less than 100.
    [Show full text]
  • Appendix a Tables of Fermat Numbers and Their Prime Factors
    Appendix A Tables of Fermat Numbers and Their Prime Factors The problem of distinguishing prime numbers from composite numbers and of resolving the latter into their prime factors is known to be one of the most important and useful in arithmetic. Carl Friedrich Gauss Disquisitiones arithmeticae, Sec. 329 Fermat Numbers Fo =3, FI =5, F2 =17, F3 =257, F4 =65537, F5 =4294967297, F6 =18446744073709551617, F7 =340282366920938463463374607431768211457, Fs =115792089237316195423570985008687907853 269984665640564039457584007913129639937, Fg =134078079299425970995740249982058461274 793658205923933777235614437217640300735 469768018742981669034276900318581864860 50853753882811946569946433649006084097, FlO =179769313486231590772930519078902473361 797697894230657273430081157732675805500 963132708477322407536021120113879871393 357658789768814416622492847430639474124 377767893424865485276302219601246094119 453082952085005768838150682342462881473 913110540827237163350510684586298239947 245938479716304835356329624224137217. The only known Fermat primes are Fo, ... , F4 • 208 17 lectures on Fermat numbers Completely Factored Composite Fermat Numbers m prime factor year discoverer 5 641 1732 Euler 5 6700417 1732 Euler 6 274177 1855 Clausen 6 67280421310721* 1855 Clausen 7 59649589127497217 1970 Morrison, Brillhart 7 5704689200685129054721 1970 Morrison, Brillhart 8 1238926361552897 1980 Brent, Pollard 8 p**62 1980 Brent, Pollard 9 2424833 1903 Western 9 P49 1990 Lenstra, Lenstra, Jr., Manasse, Pollard 9 p***99 1990 Lenstra, Lenstra, Jr., Manasse, Pollard
    [Show full text]
  • Some New Results on Odd Perfect Numbers
    Pacific Journal of Mathematics SOME NEW RESULTS ON ODD PERFECT NUMBERS G. G. DANDAPAT,JOHN L. HUNSUCKER AND CARL POMERANCE Vol. 57, No. 2 February 1975 PACIFIC JOURNAL OF MATHEMATICS Vol. 57, No. 2, 1975 SOME NEW RESULTS ON ODD PERFECT NUMBERS G. G. DANDAPAT, J. L. HUNSUCKER AND CARL POMERANCE If ra is a multiply perfect number (σ(m) = tm for some integer ί), we ask if there is a prime p with m = pan, (pa, n) = 1, σ(n) = pα, and σ(pa) = tn. We prove that the only multiply perfect numbers with this property are the even perfect numbers and 672. Hence we settle a problem raised by Suryanarayana who asked if odd perfect numbers neces- sarily had such a prime factor. The methods of the proof allow us also to say something about odd solutions to the equation σ(σ(n)) ~ 2n. 1* Introduction* In this paper we answer a question on odd perfect numbers posed by Suryanarayana [17]. It is known that if m is an odd perfect number, then m = pak2 where p is a prime, p Jf k, and p = a z= 1 (mod 4). Suryanarayana asked if it necessarily followed that (1) σ(k2) = pa , σ(pa) = 2k2 . Here, σ is the sum of the divisors function. We answer this question in the negative by showing that no odd perfect number satisfies (1). We actually consider a more general question. If m is multiply perfect (σ(m) = tm for some integer t), we say m has property S if there is a prime p with m = pan, (pa, n) = 1, and the equations (2) σ(n) = pa , σ(pa) = tn hold.
    [Show full text]
  • The Simple Mersenne Conjecture
    The Simple Mersenne Conjecture Pingyuan Zhou E-mail:[email protected] Abstract p In this paper we conjecture that there is no Mersenne number Mp = 2 –1 to be prime k for p = 2 ±1,±3 when k > 7, where p is positive integer and k is natural number. It is called the simple Mersenne conjecture and holds till p ≤ 30402457 from status of this conjecture. If the conjecture is true then there are no more double Mersenne primes besides known double Mersenne primes MM2, MM3, MM5, MM7. Keywords: Mersenne prime; double Mersenne prime; new Mersenne conjecture; strong law of small numbers; simple Mersenne conjecture. 2010 Mathematics Subject Classification: 11A41, 11A51 1 p How did Mersenne form his list p = 2,3,5,7,13,17,19,31,67,127,257 to make 2 –1 become primes ( original Mersenne conjecture ) and why did the list have five errors ( 67 and 257 were wrong but 61,89,107 did not appear here )? Some of mathematicians have studied this problem carefully[1]. From verification results of new Mersenne conjecture we see three conditions in the conjecture all hold only for p = 3,5,7,13,17,19,31,61,127 though new Mersenne conjecture has been verified to be true for all primes p < 20000000[2,3]. If we only consider Mersenne primes and p is p k positive integer then we will discovery there is at least one prime 2 –1 for p = 2 ±1,±3 when k ≤ 7 ( k is natural number 0,1,2,3,…), however, such connections will disappear completely from known Mersenne primes when k > 7.
    [Show full text]
  • Overpseudoprimes, Mersenne Numbers and Wieferich Primes 2
    OVERPSEUDOPRIMES, MERSENNE NUMBERS AND WIEFERICH PRIMES VLADIMIR SHEVELEV Abstract. We introduce a new class of pseudoprimes - so-called “overpseu- doprimes” which is a special subclass of super-Poulet pseudoprimes. De- noting via h(n) the multiplicative order of 2 modulo n, we show that odd number n is overpseudoprime if and only if the value of h(n) is invariant of all divisors d > 1 of n. In particular, we prove that all composite Mersenne numbers 2p − 1, where p is prime, and squares of Wieferich primes are overpseudoprimes. 1. Introduction n Sometimes the numbers Mn =2 − 1, n =1, 2,..., are called Mersenne numbers, although this name is usually reserved for numbers of the form p (1) Mp =2 − 1 where p is prime. In our paper we use the latter name. In this form numbers Mp at the first time were studied by Marin Mersenne (1588-1648) at least in 1644 (see in [1, p.9] and a large bibliography there). We start with the following simple observation. Let n be odd and h(n) denote the multiplicative order of 2 modulo n. arXiv:0806.3412v9 [math.NT] 15 Mar 2012 Theorem 1. Odd d> 1 is a divisor of Mp if and only if h(d)= p. Proof. If d > 1 is a divisor of 2p − 1, then h(d) divides prime p. But h(d) > 1. Thus, h(d)= p. The converse statement is evident. Remark 1. This observation for prime divisors of Mp belongs to Max Alek- seyev ( see his comment to sequence A122094 in [5]).
    [Show full text]
  • Arxiv:1606.08690V5 [Math.NT] 27 Apr 2021 on Prime Factors of Mersenne
    On prime factors of Mersenne numbers Ady Cambraia Jr,∗ Michael P. Knapp,† Ab´ılio Lemos∗, B. K. Moriya∗ and Paulo H. A. Rodrigues‡ [email protected] [email protected] [email protected] [email protected] paulo [email protected] April 29, 2021 Abstract n Let (Mn)n≥0 be the Mersenne sequence defined by Mn = 2 − 1. Let ω(n) be the number of distinct prime divisors of n. In this short note, we present a description of the Mersenne numbers satisfying ω(Mn) ≤ 3. Moreover, we prove that the inequality, (1−ǫ) log log n given ǫ> 0, ω(Mn) > 2 − 3 holds for almost all positive integers n. Besides, a we present the integer solutions (m, n, a) of the equation Mm+Mn = 2p with m,n ≥ 2, p an odd prime number and a a positive integer. 2010 Mathematics Subject Classification: 11A99, 11K65, 11A41. Keywords: Mersenne numbers, arithmetic functions, prime divisors. 1 Introduction arXiv:1606.08690v5 [math.NT] 27 Apr 2021 n Let (Mn)n≥0 be the Mersenne sequence defined by Mn = 2 − 1, for n ≥ 0. A simple argument shows that if Mn is a prime number, then n is a prime number. When Mn is a prime number, it is called a Mersenne prime. Throughout history, many researchers sought to find Mersenne primes. Some tools are very important for the search for Mersenne primes, mainly the Lucas-Lehmer test. There are papers (see for example [1, 5, 21]) that seek to describe the prime factors of Mn, where Mn is a composite number and n is a prime number.
    [Show full text]
  • Prime and Perfect Numbers
    Chapter 34 Prime and perfect numbers 34.1 Infinitude of prime numbers 34.1.1 Euclid’s proof If there were only finitely many primes: 2, 3, 5, 7, ...,P, and no more, consider the number Q = (2 3 5 P ) + 1. · · ··· Clearly it is divisible by any of the primes 2, 3,..., P , it must be itself a prime, or be divisible by some prime not in the list. This contradicts the assumption that all primes are among 2, 3, 5,..., P . 34.1.2 Fermat numbers 2n The Fermat numbers are Fn := 2 + 1. Note that 2n 2n−1 2n−1 Fn 2 = 2 1= 2 + 1 2 1 = Fn 1(Fn 1 2). − − − − − − By induction, Fn = Fn 1Fn 2 F1 F0 + 2, n 1. − − ··· · ≥ From this, we see that Fn does not contain any factor of F0, F1, ..., Fn 1. Hence, the Fermat numbers are pairwise relatively prime. From this,− it follows that there are infinitely primes. 1 1 It is well known that Fermat’s conjecture of the primality of Fn is wrong. While F0 = 3, F1 = 5, 32 F2 = 17, F3 = 257, and F4 = 65537 are primes, Euler found that F5 = 2 + 1 = 4294967297 = 641 6700417. × 1202 Prime and perfect numbers 34.2 The prime numbers below 20000 The first 2262 prime numbers: 10 20 30 40 50 60 70 80 90 100 bbbbbb bb bbb b bb bb b bb b bb bb bb b b b b bb b b b b b b b b b b b b b b b bb b b b b b b b b b b b b b b b b bb b b b b bb b b b b b bb b b b b b b b b b b b b b b b b b b bb b b b b b b b b bb b b b bb b b b b b b b b b b b b bb b b b b b b b b b bb b b b b b b b b b b b b b b b b b b bb b b bb b b b b bb b b b b b b b b b b b b b 100 b b bb b bb b bb b b b b bb b b b b b bb b b b b b b b bb b bb b b b b b bb b b b
    [Show full text]
  • Variations on Euclid's Formula for Perfect Numbers
    1 2 Journal of Integer Sequences, Vol. 13 (2010), 3 Article 10.3.1 47 6 23 11 Variations on Euclid’s Formula for Perfect Numbers Farideh Firoozbakht Faculty of Mathematics & Computer Science University of Isfahan Khansar Iran [email protected] Maximilian F. Hasler Laboratoire CEREGMIA Univ. Antilles-Guyane Schoelcher Martinique [email protected] Abstract We study several families of solutions to equations of the form σ(n)= An + B(n), where B is a function that may depend on properties of n. 1 Introduction We recall that perfect numbers (sequence A000396 of Sloane’s Encyclopedia [8]) are defined as solutions to the equation σ(x) = 2 x, where σ(x) denotes the sum of all positive divisors of x, including 1 and x itself. Euclid showed around 300 BCE [2, Proposition IX.36] that q−1 q all numbers of the form x = 2 Mq, where Mq = 2 1 is prime (A000668), are perfect numbers. − While it is still not known whether there exist any odd perfect numbers, Euler [3] proved a converse of Euclid’s proposition, showing that there are no other even perfect numbers (cf. A000043, A006516). (As a side note, this can also be stated by saying that the even perfect 1 numbers are exactly the triangular numbers (A000217(n) = n(n + 1)/2) whose indices are Mersenne primes A000668.) One possible generalization of perfect numbers is the multiply or k–fold perfect numbers (A007691, A007539) such that σ(x) = k x [1, 7, 9, 10]. Here we consider some modified equations, where a second term is added on the right hand side.
    [Show full text]
  • On Squaring a Number and T-Semi Prime Number
    International Journal of Modern Research in Engineering and Technology (IJMRET) www.ijmret.org Volume 3 Issue 3 ǁ March 2018. ON SQUARING A NUMBER AND T-SEMI PRIME NUMBER Mohammed Khalid Shahoodh Applied & Industrial Mathematics (AIMs) Research Cluster, Faculty of Industrial Sciences & Technology, Universiti Malaysia Pahang, Lebuhraya Tun Razak, 26300 Gambang, Kuantan, Pahang Darul Makmur ABSTRACT: In this short paper, we have provided a new method for finding the square for any positive integer. Furthermore, a new type of numbers are called T-semi prime numbers are studied by using the prime numbers. KEYWORDS –Prime numbers, Semi prime numbers, Mathematical tools, T-semi prime numbers. I. INTRODUCTION Let n 10, then It is well known that the field of number (10 1)22 (2 10 1) 81 19 100 (10) . theory is one of the beautiful branch in the In general, the square for any positive mathematics, because of its applications in several 2 subjects of the mathematics such as statistics, integer n can be express as (nn 1) (2 1).Next, numerical analysis and also in different other some examples are presented to illustrate the sciences.In the literature, there are many studies method which are given as follows. had discovered some specific topics in the number theory but still there are somequestions are Example 1. Consider n 37 and n 197, then unsolved yet, which make an interesting for the (n )2 (37) 2 (37 1) 2 (2 37 1) 1296 73 1369. mathematicians to find their answer. One of these (n )2 (197) 2 (197 1) 2 (2 197 1) 38416 393 38809.
    [Show full text]
  • MATH 453 Primality Testing We Have Seen a Few Primality Tests in Previous Chapters: Sieve of Eratosthenes (Trivial Divi- Sion), Wilson’S Test, and Fermat’S Test
    MATH 453 Primality Testing We have seen a few primality tests in previous chapters: Sieve of Eratosthenes (Trivial divi- sion), Wilson's Test, and Fermat's Test. • Sieve of Eratosthenes (or Trivial division) Let n 2 N with n > 1. p If n is not divisible by any integer d p≤ n, then n is prime. If n is divisible by some integer d ≤ n, then n is composite. • Wilson Test Let n 2 N with n > 1. If (n − 1)! 6≡ −1 mod n, then n is composite. If (n − 1)! ≡ −1 mod n, then n is prime. • Fermat Test Let n 2 N and a 2 Z with n > 1 and (a; n) = 1: If an−1 6≡ 1 mod n; then n is composite. If an−1 ≡ 1 mod n; then the test is inconclusive. Remark 1. Using the same assumption as above, if n is composite and an−1 ≡ 1 mod n, then n is said to be a pseudoprime to base a. If n is a pseudoprime to base a for all a 2 Z such that (a; n) = 1, then n is called a Carmichael num- ber. It is known that there are infinitely Carmichael numbers (hence infinitely many pseudoprimes to any base a). However, pseudoprimes are generally very rare. For example, among the first 1010 positive integers, 14; 882 integers (≈ 0:00015%) are pseudoprimes (to base 2), compared with 455; 052; 511 primes (≈ 4:55%) In reality, thep primality tests listed above are computationally inefficient. For instance, it takes up to n divisions to determine whether n is prime using the Trivial Division method.
    [Show full text]