Math in the News: Mersenne Primes Helmut Knaust Department of Mathematical Sciences The University of Texas at El Paso El Paso TX 79968-0514 hknaust@utep.edu Greater El Paso Council of Teachers of Mathematics Fall Conference October 18, 2008
1 Math in the News 2 Prime numbers 3 How Many Primes? 4 Mersenne Primes 5 Perfect Numbers 6 Computing Mersenne Primes
By the way, the number of atoms in the universe has about 80 digits...
Definition and Examples Definition A prime number is a natural number that has exactly two divisors (1 and itself) Here are the first 100 prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541
Definition and Examples Theorem A natural number p > 1 is prime if and only if no prime number p divides p.
Definition and Examples Theorem A natural number p > 1 is prime if and only if no prime number p divides p. For example, to check that 107 is a prime number, we have to check whether 107 is divisible by by 2, 3, 5 and 7.
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques Another way to find prime numbers is the Sieve of Eratosthenes ( 240 BC): 1 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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
Basic Results and Techniques The next slide shows a graphical representation of the Sieve of Eratosthenes for all numbers 601 2 = 361 201. Black dots represent primes, White dots represent composite numbers.
Basic Results and Techniques 3
Basic Results and Techniques 7
Basic Results and Techniques 17
Basic Results and Techniques 43
Basic Results and Techniques 103
Basic Results and Techniques 307
Basic Results and Techniques 601
Basic Results and Techniques Theorem (Euclid, 300 BC) The Fundamental Theorem of Arithmetic. Every natural number greater than 1 can be written as the product of (one or more) primes. The factorization is unique up to reordering.
Basic Results and Techniques Theorem (Euclid, 300 BC) The Fundamental Theorem of Arithmetic. Every natural number greater than 1 can be written as the product of (one or more) primes. The factorization is unique up to reordering. For example: 564 738 409 098 = 2 3 3 109 3 083 31 121.
Euclid s Theorem Theorem (Euclid, 300 BC) There are infinitely many prime numbers.
Euclid s Theorem Theorem (Euclid, 300 BC) There are infinitely many prime numbers. Proof: Suppose there are only finitely many primes. More precisely, suppose that {p 1, p 2, p 3,..., p n } is a complete list of all prime numbers.
Euclid s Theorem Theorem (Euclid, 300 BC) There are infinitely many prime numbers. Proof: Suppose there are only finitely many primes. More precisely, suppose that {p 1, p 2, p 3,..., p n } is a complete list of all prime numbers. Consider the number N = p 1 p 2 p n + 1.
Euclid s Theorem Theorem (Euclid, 300 BC) There are infinitely many prime numbers. Proof: Suppose there are only finitely many primes. More precisely, suppose that {p 1, p 2, p 3,..., p n } is a complete list of all prime numbers. Consider the number N = p 1 p 2 p n + 1. Observe that N is not divisible by any of the primes p 1, p 2, p 3,... p n on our complete list.
Euclid s Theorem Now there are two possibilities: If N is prime, we obtain a contradiction since N is not on our complete list of primes.
Euclid s Theorem Now there are two possibilities: If N is prime, we obtain a contradiction since N is not on our complete list of primes. If, on the other hand, N is not prime, it must be divisible by one of the primes on our list - but it is not!
Euclid s Theorem Now there are two possibilities: If N is prime, we obtain a contradiction since N is not on our complete list of primes. If, on the other hand, N is not prime, it must be divisible by one of the primes on our list - but it is not! In either case we get a contradiction to our assumption that there are only finitely many primes. So there must be infinitely many primes!
The Prime Number Theorem The most celebrated result in number theory was conjectured by both Legendre and Gauss at the end of the 18th century, but only proved a century later: Theorem (Hadamard/de la Vallée Poussin, 1896) The Prime Number Theorem. Let Π(n) denote the number of prime numbers n. Then lim n Π(n) n/ ln(n) = 1.
The Prime Number Theorem The approximation is pretty slow: n n n ln n n n ln n 1000 168 145 1.1605 1 000 000 78 498 72 382 1.08449 1 000 000 000 50 847 534 48 254 942 1.05373 1 000 000 000 000 37 607 912 018 36 191 206 825 1.03915
Classical Conjectures and Recent Results Conjecture (Goldbach, 1742) The Goldbach Conjecture. Every even natural number greater than 2 is the sum of two primes.
Classical Conjectures and Recent Results Conjecture (Goldbach, 1742) The Goldbach Conjecture. Every even natural number greater than 2 is the sum of two primes. Here is an example: 46 = 17 + 29 (= 3 + 43 = 5 + 41 = 23 + 23).
Classical Conjectures and Recent Results Conjecture (Goldbach, 1742) The Goldbach Conjecture. Every even natural number greater than 2 is the sum of two primes. Here is an example: 46 = 17 + 29 (= 3 + 43 = 5 + 41 = 23 + 23). Note that the Goldbach Conjecture would imply that every odd prime number > 5 is the sum of three prime numbers.
Classical Conjectures and Recent Results The best known result is Theorem (Vinogradov, 1937) Every large odd prime number is the sum of three primes.
Classical Conjectures and Recent Results The best known result is Theorem (Vinogradov, 1937) Every large odd prime number is the sum of three primes. Large currently means greater than 10 1345.
Classical Conjectures and Recent Results Conjecture The Twin Prime Conjecture. There are infinitely many pairs of primes with difference 2.
Classical Conjectures and Recent Results Conjecture The Twin Prime Conjecture. There are infinitely many pairs of primes with difference 2. Examples are 5 and 7, 461 and 463.
Classical Conjectures and Recent Results Conjecture The Twin Prime Conjecture. There are infinitely many pairs of primes with difference 2. Examples are 5 and 7, 461 and 463. The best result known is Theorem (Chen, 1966) There are infinitely many pairs p, p + 2 such that p is prime, and p + 2 is prime or a product of two primes.
Classical Conjectures and Recent Results Theorem (Green-Tao Theorem, 2004) There are arbitrarily long sequences of primes in arithmetic progression.
Classical Conjectures and Recent Results Theorem (Green-Tao Theorem, 2004) There are arbitrarily long sequences of primes in arithmetic progression. Here is an example of five primes in arithmetic progression: 5, 11, 17, 23, 29. The longest currently known sequence of primes in arithmetic progression was found in 2004. It has length 23, starts at 56 211 383 760 397, with differences 44 546 738 095 860.
Classical Conjectures and Recent Results Terence Tao, 1975 2006 Fields Medal Recipient
Definition and Examples Definition A prime number of the form 2 p 1 is called the Mersenne prime M p. The number p is then called a Mersenne exponent.
Definition and Examples Definition A prime number of the form 2 p 1 is called the Mersenne prime M p. The number p is then called a Mersenne exponent. Here are some examples: If p = 2, 2 2 1 = 3 is a Mersenne prime; p = 7 yields the Mersenne prime 2 7 1 = 127.
Definition and Examples Definition A prime number of the form 2 p 1 is called the Mersenne prime M p. The number p is then called a Mersenne exponent. Here are some examples: If p = 2, 2 2 1 = 3 is a Mersenne prime; p = 7 yields the Mersenne prime 2 7 1 = 127. This does not work for all p, even is p is a prime number. For example 2 11 1 = 2047 is not a prime: 2 11 1 = 23 89
Mersenne s Claim Marin Mersenne, 1588 1648
Mersenne s Claim Marin Mersenne boldly claimed in 1644 that a complete list of Mersenne exponents less than 258 is given by {2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257}
Mersenne s Claim Marin Mersenne boldly claimed in 1644 that a complete list of Mersenne exponents less than 258 is given by {2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257} Here is the list of the corresponding 11 numbers of the form 2 p 1: 3, 7, 31, 127, 8191, 131 071, 524 287, 2 147 483 647, 147 573 952 589 676 412 927, 170 141 183 460 469 231 731 687 303 715 884 105 727, 231 584 178 474 632 390 847 141 970 017 375 815 706 539 969 331 281 128 078 915 168 015 826 259 279 871
Mersenne s Claim Mersenne was wrong two numbers on his list are not primes: 2 67 1 = 93 707 721 61 838 257 287 2 257 1 = 35 006 138 814 359 1 155 685 395 246 619 182 673 033 374 550 598 501 810 936 581 776 630 096 313 181 393
Mersenne s Claim Mersenne was wrong two numbers on his list are not primes: 2 67 1 = 93 707 721 61 838 257 287 2 257 1 = 35 006 138 814 359 1 155 685 395 246 619 182 673 033 374 550 598 501 810 936 581 776 630 096 313 181 393 Worse he also missed three exponents: 2 61 1, 2 89 1 and 2 107 1 are prime numbers.
Mersenne s Claim Mersenne s list again: {2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257}
Mersenne s Claim Mersenne s list again: {2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257} Here is the corrected list of Mersenne exponents less than 258: {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127}
Mersenne s Claim Theorem If a p 1 is a prime number, then a = 2 and p is prime.
Mersenne s Claim Theorem If a p 1 is a prime number, then a = 2 and p is prime. Proof: I will only prove that 2 p 1 prime implies that p is prime. Assume that p is not prime, then p = m k, with m, k 2. So 2 p 1 = (2 m ) k 1.
Mersenne s Claim Theorem If a p 1 is a prime number, then a = 2 and p is prime. Proof: I will only prove that 2 p 1 prime implies that p is prime. Assume that p is not prime, then p = m k, with m, k 2. So 2 p 1 = (2 m ) k 1. Do you remember how to factor x 3 1? (2 m ) k 1 works the same way:
Mersenne s Claim Theorem If a p 1 is a prime number, then a = 2 and p is prime. Proof: I will only prove that 2 p 1 prime implies that p is prime. Assume that p is not prime, then p = m k, with m, k 2. So 2 p 1 = (2 m ) k 1. Do you remember how to factor x 3 1? (2 m ) k 1 works the same way: ( ) (2 m ) k 1 = (2 m 1) (2 m ) k 1 + (2 m ) k 2 + (2 m ) k 3 + + (2 m ) + 1 End of the story! 2 p 1 is divisible by 2 m 1, and hence not prime.
Definition and Examples Definition A natural number is called a perfect number if it equals the sum of its proper divisors.
Definition and Examples Definition A natural number is called a perfect number if it equals the sum of its proper divisors. Here are the first two examples: 6 = 1 + 2 + 3, 28 = 1 + 2 + 4 + 7 + 14.
Perfect Numbers and Mersenne Primes As it turns out there is a perfect correspondence between Mersenne primes and even perfect numbers.
Perfect Numbers and Mersenne Primes As it turns out there is a perfect correspondence between Mersenne primes and even perfect numbers. Theorem (Euclid, 300 BC) If 2 p 1 is prime, then 2 p 1 (2 p 1) is perfect.
Perfect Numbers and Mersenne Primes As it turns out there is a perfect correspondence between Mersenne primes and even perfect numbers. Theorem (Euclid, 300 BC) If 2 p 1 is prime, then 2 p 1 (2 p 1) is perfect. Theorem (Euler, 1707 1783) If n is an even perfect number, then n = 2 p 1 (2 p 1) for some Mersenne prime 2 p 1.
Perfect Numbers and Mersenne Primes As it turns out there is a perfect correspondence between Mersenne primes and even perfect numbers. Theorem (Euclid, 300 BC) If 2 p 1 is prime, then 2 p 1 (2 p 1) is perfect. Theorem (Euler, 1707 1783) If n is an even perfect number, then n = 2 p 1 (2 p 1) for some Mersenne prime 2 p 1. Conjecture All perfect numbers are even.
Known Mersenne Primes # n Digits in Mersenne Number Digits in Perfect number Date of Discovery Discoverer 1 2 1 1 ancient ancient 2 3 1 2 ancient ancient 3 5 2 3 ancient ancient 4 7 3 4 ancient ancient 5 13 4 8 1456 anonymous 6 17 6 10 1588 Cataldi 7 19 6 12 1588 Cataldi 8 31 10 19 1772 Euler 9 61 19 37 1883 Pervushin 10 89 27 54 1911 Powers 11 107 33 65 1914 Powers 12 127 39 77 1876 Lucas 13 521 157 314 January 301952 Robinson 14 607 183 366 January 301952 Robinson 15 1,279 386 770 June 251952 Robinson 16 2,203 664 1,327 October 71952 Robinson 17 2,281 687 1,373 October 91952 Robinson 18 3,217 969 1,937 September 81957 Riesel 19 4,253 1,281 2,561 November 31961 Hurwitz 20 4,423 1,332 2,663 November 31961 Hurwitz 21 9,689 2,917 5,834 May 111963 Gillies 22 9,941 2,993 5,985 May 161963 Gillies 23 11,213 3,376 6,751 June 21963 Gillies
Known Mersenne Primes # n Digits in Mersenne Number Digits in Perfect number Date of Discovery Discoverer 24 19,937 6,002 12,003 March 41971 Tuckerman 25 21,701 6,533 13,066 October 301978 Noll & Nickel 26 23,209 6,987 13,973 February 91979 Noll 27 44,497 13,395 26,790 April 81979 Nelson & Slowinski 28 86,243 25,962 51,924 September 251982 Slowinski 29 110,503 33,265 66,530 January 281988 Colquitt & Welsh 30 132,049 39,751 79,502 September 201983 Slowinski 31 216,091 65,050 130,100 September 61985 Slowinski 32 756,839 227,832 455,663 February 191992 Slowinski & Gage 33 859,433 258,716 517,430 January 101994 Slowinski & Gage 34 1,257,787 378,632 757,263 September 31996 Slowinski & Gage 35 1,398,269 420,921 841,842 November 131996 Armengaud, Woltman et. al. GIMPS 36 2,976,221 895,932 1,791,864 August 241997 Spence, Woltman et. al. GIMPS 37 3,021,377 909,526 1,819,050 January 271998 Clarkson, Woltman, Kurowski et. al. GIMPS & PrimeNet 38 6,972,593 2,098,960 4,197,919 June 11999 Hajratwala, Woltman, Kurowski et. al. GIMPS & PrimeNet 39 13,466,917 4,053,946 8,107,892 November 142001 Cameron, Woltman, Kurowski et. al. GIMPS & PrimeNet 40* 20,996,011 6,320,430 12,640,858 November 172003 Shafer, Woltman, Kurowski et. al. GIMPS & PrimeNet 41* 24,036,583 7,235,733 14,471,465 May 152004 Findley, Woltman, Kurowski et. al. GIMPS & PrimeNet 42* 25,964,951 7,816,230 15,632,458 February 182005 Nowak, Woltman, Kurowski et. al. GIMPS & PrimeNet 43* 30,402,457 9,152,052 18,304,103 December 152005 Cooper, Boone, Woltman, Kurowski et. al. GIMPS & PrimeNet 44* 32,582,657 9,808,358 19,616,714 September 42006 Cooper, Boone, Woltman, Kurowski et. al. GIMPS & PrimeNet 45* 37,156,667 11,185,272 22,370,543 September 62008 Elvenich, Woltman, Kurowski, et al. GIMPS & PrimeNet 46* 43,112,609 12,978,189 25,957,378 August 232008 Smith, Woltman, Kurowski, et al. GIMPS & PrimeNet
Lucas-Lehmer Test Nowadays, primality of Mersenne numbers is established with a test developed by Édouard Lucas (1842 1891) and improved by Derrick H. Lehmer (1905 1991): Theorem (Lucas-Lehmer Test, 1870s/1930s) Consider the sequence s 0 = 4, s n = sn 1 2 2 for n 1. Let p be an odd prime. Then 2 p 1 is a Mersenne prime if and only if s p 2 = 0 (mod 2 p 1).
Lucas-Lehmer Test Here is how this works to check that 2 7 1 = 127 is a Mersenne prime: n s n s n (mod 127) 0 4 4 1 14 14 2 194 67 3 4 487 42 4 1 762 111 5 12 319 0
Lucas-Lehmer Test Lehmer s Photoelectric Number Sieve
GIMPS www.mersenne.org
Conclusion All Questions Answered, All Answers Questioned Contact: hknaust@utep.edu Borrowed from Donald Knuth
The Lucas - Lehmer Test tu TimeUsed ; z 1; Do n Prime k ; If Nest Function s, Mod s^2 2, 2^n 1, 4, n 2 0, s TimeUsed tu; z ; If s 120, Print z, "\t", n, "\t", IntegerPart s 60, " min.", Print z, "\t", n, "\t", s, " sec." ;,, k, 1, 10 000 3 0. sec. 2 3 5 0.015 sec. 4 7 0.015 sec. 5 13 0.015 sec. 6 17 0.015 sec. 7 19 0.015 sec. 8 31 0.015 sec. 9 61 0.015 sec. 10 89 0.015 sec. 11 107 0.015 sec. 12 127 0.015 sec. 13 521 0.187 sec. 14 607 0.234 sec. 15 1279 1.419 sec. 16 2203 5.725 sec. 17 2281 6.427 sec. 18 3217 17.784 sec. 19 4253 43.898 sec. 20 4423 49.592 sec. 21 9689 11 min. 22 9941 12 min. 23 11 213 18 min.
David Hilbert (1862 1943) We Must Know We Shall Know