<<

The Little Book of Bigger Primes Second Edition

Paulo Ribenboim

The Little Book of Bigger Primes Second Edition Paulo Ribenboim Department of and Statistics Queen’s University Kingston, ON K7L 3N6 Canada

Mathematics Subject Classification (2000): 11A41, 11B39, 11A51

Library of Congress Cataloging-in-Publication Data Ribenboim, Paulo. The little book of bigger primes / Paulo Ribenboim. p. cm. Includes bibliographical references and index. ISBN 0-387-20169-6 (alk. paper) 1. , Prime. I. Title.

QA246.R473 2004 512.7′23—dc22 2003066220

ISBN 0-387-20169-6 Printed on acid-free paper.

See first edition © 1991 Paulo Ribenboim.

© 2004 Springer-Verlag New York, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY 10010, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

Printed in the United States of America. (EB)

987654321 SPIN 10940969

Springer-Verlag is a part of Springer Science+Business Media springeronline.com Nel mezzo del cammin di nostra vita mi ritrovai per una selva oscura che la diritta via era smarrita

Dante Alighieri, L’Inferno Preface

This book could have been called “Selections from the New Book of Prime Records.” However, I preferred the title which pro- pelled you on the first place to open it, and perhaps (so I hope) to buy it! But the book is not very different from its parent. Like a bonsai, which has all the main characteristics of the full-sized tree, this pa- perback should exert the same fatal attraction. I wish it to be as dangerous as the other one. I wish you, young student, teacher or retired mathematician, engineer, computer buff, all of you who are friends of numbers, to be driven into thinking about the beautiful theory of prime numbers, with its inherent mystery. I wish you to exercise your brain and fingers—not vice-versa. This second edition is still a little book, but the primes have “grown bigger”. An irrepressible activity of computation special- ists has pushed records to levels previously unthinkable. These en- deavours generated—or were possible by—new algorithms and great advances in programming techniques and hardware developments. A fruitful interplay for the intended aim, to produce large, awesome numbers. These updated records are reported; they are like a snapshot taken May 2003. However, only limited progress was made in the theoret- ical results. They are explained in the appropriate place. The old viii Preface classical problems remain open and continue defying our great minds. With an inner smile: “If you solve me, you’ll become idle”. Not know- ing that we, mathematicians, invent more problems than we can solve. Idle, we shall not be.

Paulo Ribenboim Acknowledgements

First and foremost, I wish to express my gratitude to Wilfrid Keller. He spent uncountable hours working on this book, informing me of the newest records, discussing my text to great depths, with judicious comments. He also took up the arduous task of preparing the camera- ready copy. Like the proud Buenos Aires tailor who was not happy until the jacket fitted to perfection. I have also obtained great support from many colleagues who ex- plained patiently their results. As a consequence, their names are included in the text. Finally, Chris Caldwell maintains a rich, well selected, informative website on prime numbers, which I consulted often with great profit. Contents

Preface vii Acknowledgements ix Guiding the Reader xv Index of Notations xvii

Introduction 1

1 How Many Prime Numbers Are There? 3 I Euclid’sProof...... 3 II GoldbachDidItToo!...... 6 III Euler’sProof...... 8 IV Thue’sProof...... 9 V Three Forgotten Proofs ...... 10 A Perott’s Proof ...... 10 B Auric’sProof...... 11 CM´etrod’sProof...... 11 VI Washington’s Proof ...... 11 VIIFurstenberg’sProof...... 12

2 How to Recognize Whether a is a Prime 15 I The Sieve of Eratosthenes ...... 16 xii Contents

II Some Fundamental Theorems on Congruences ..... 17 A Fermat’s Little Theorem and Primitive Roots ModuloaPrime...... 17 B The Theorem of Wilson ...... 21 C The Properties of Giuga and of Wolstenholme . 21 D The Power of a Prime Dividing a Factorial . . 24 E TheChineseRemainderTheorem...... 26 F Euler’sFunction...... 28 G SequencesofBinomials...... 33 H QuadraticResidues...... 37 III ClassicalPrimalityTestsBasedonCongruences.... 39 IV LucasSequences...... 44 V PrimalityTestsBasedonLucasSequences...... 63 VI FermatNumbers...... 70 VIIMersenneNumbers...... 75 VIIIPseudoprimes...... 88 A PseudoprimesinBase2(psp)...... 88 B in Base a (psp(a))...... 92 C Euler Pseudoprimes in Base a (epsp(a)).... 95 D Strong Pseudoprimes in Base a (spsp(a)) . . . 96 IX CarmichaelNumbers...... 100 X LucasPseudoprimes...... 103 A FibonacciPseudoprimes...... 104 B Lucas Pseudoprimes (lpsp(P, Q))...... 106 C Euler-Lucas Pseudoprimes (elpsp(P, Q)) and Strong Lucas Pseudoprimes (slpsp(P, Q)) . . . 106 D Carmichael–LucasNumbers...... 108 XI PrimalityTestingandFactorization...... 109 A TheCostofTesting...... 110 B MorePrimalityTests...... 111 C TitanicandCuriousPrimes...... 119 D Factorization...... 122 E Public Key Cryptography ...... 126

3 Are There Functions Defining Prime Numbers? 131 I FunctionsSatisfyingCondition(a)...... 131 II FunctionsSatisfyingCondition(b)...... 137 III Prime-ProducingPolynomials...... 138 A PrimeValuesofLinearPolynomials...... 139 Contents xiii

B OnQuadraticFields...... 140 C Prime-ProducingQuadraticPolynomials....144 D The Prime Values and Prime Factors Races . . 148 IV FunctionsSatisfyingCondition(c)...... 151

4 How Are the Prime Numbers Distributed? 157 I The Function π(x) ...... 158 A HistoryUnfolding...... 159 B Sums Involving the M¨obiusFunction...... 172 C TablesofPrimes...... 173 D The Exact Value of π(x) and Comparison with x/ log x,Li(x), and R(x)...... 174 E The Nontrivial Zeros of ζ(s)...... 177 F Zero-Free Regions for ζ(s) and the Error Term inthePrimeNumberTheorem...... 180 G Some Properties of π(x)...... 181 H The Distribution of Values of Euler’s Function 183 II The nthPrimeandGapsBetweenPrimes...... 184 AThenthPrime...... 185 B GapsBetweenPrimes...... 186 III TwinPrimes...... 192 IV Prime k-Tuplets...... 197 V Primes in Progression ...... 204 A There Are Infinitely Many! ...... 204 B The Smallest Prime in an Arithmetic Progression ...... 207 C Strings of Primes in Arithmetic Progression . . 209 VI Goldbach’sFamousConjecture...... 211 VII The Distribution of Pseudoprimes and of Carmichael Numbers...... 216 A DistributionofPseudoprimes...... 216 B DistributionofCarmichaelNumbers...... 218 C DistributionofLucasPseudoprimes...... 220

5 Which Special Kinds of Primes Have Been Considered? 223 I RegularPrimes...... 223 II SophieGermainPrimes...... 227 III WieferichPrimes...... 230 IV Wilson Primes ...... 234 xiv Contents

V ...... 235 VI Numbers k × bn ± 1 ...... 237 VII Primes and Second-Order Linear Recurrence Sequences...... 243

6 Heuristic and Probabilistic Results About Prime Numbers 249 I PrimeValuesofLinearPolynomials...... 250 II Prime Values of Polynomials of Arbitrary Degree . . . 253 III Polynomials with Many Successive Composite Values . 261 IV PartitioNumerorum...... 263

Appendix 1 269 Appendix 2 275

Conclusion 279

Bibliography 281 Web Site Sources 325 Primes up to 10,000 327 Index of Tables 331 Index of Records 333 Index of Names 335 Subject Index 349 Guiding the Reader

If a notation, which is not self-explanatory, appears without explana- tion on, say, page 107, look at the Index of Notations, which is orga- nized by page number; the definition of the notation should appear before or at page 107. If you wish to see where and how often your name is quoted in this book, turn to the Index of Names, at the end of the book. Should I say that there is no direct relation between achievement and number of quotes earned? If, finally, you do not want to read the book but you just want to have some information about Cullen numbers—which is perfectly legitimate, if not laudable—go quickly to the Subject Index. Do not look under the heading Numbers, but rather Cullen. And for a sub- ject like Strong Lucas pseudoprimes, you have exactly three possibil- ities ... . Index of Notations

The following traditional notations are used in the text without ex- planation:

Notation Explanation

m | n the m divides the integer n m n the integer m does not divide the integer n pe npis a prime, pe | n but pe+1 n gcd(m, n) greatest common of the m, n lcm(m, n) least common multiple of the integers m, n log x natural of the real number x>0 Z ring of integers Q field of rational numbers R field of real numbers C field of complex numbers

The following notations are listed as they appear in the book: xviii Index of Notations

Page Notation Explanation

3 pn the nth prime 4 p# product of all primes q ≤ p,or of p 2n 6 Fn nth , Fn =2 +1 15 [x] the largest integer in x, that is, the only integer [x] such that [x] ≤ x<[x]+1 19 gp smallest primitive root modulo p 28 ϕ(n) totient or Euler’s function 29 λ(n) Carmichael’s function 30 ω(n) number of distinct prime factors of n 30 L(x) number of composite n such that n ≤ x and ϕ(n) divides n − 1 31 Vϕ(m)#{n ≥ 1 | ϕ(n)=m} ∗ n − n 34 tn primitive part of a b 35 k(m) square-free kernel of m 36 P [m] largest prime factor of m 36 Sr set of integers n with at most r log log n distinct prime factors a 37 or (a | p) p a 38 or (a | b) b 44 Un = Un(P, Q) nth term of the with parameters (P, Q) 44 Vn = Vn(P, Q) nth term of the companion Lucas sequence with parameters (P, Q) 50 ρ(n)=ρ(n, U) smallest r ≥ 1 such that n divides Ur 50 ψ(p)= p − (D | p) α, β 52 a symbol associated to the roots α, β p 2 of X− PX + Q α, β 52 ψ (p)=p − ,wherep is an odd prime α,β p e e−1 52 ψα,β(p )=p ψα,β(p), where e ≥ 1andp is an odd prime e e 52 λα,β p lcm{ψα,β(p )} 56 P(U) set of primes p dividing some term Un =0 56 P(V ) set of primes p dividing some term Vn =0 Index of Notations xix

Page Notation Explanation

∗ 58 Un primitive part ofUn s 1 s D 63 ψ pei = pei−1 p − D i 2s−1 i i p i=1 i=1 i 72 Pn with n digits 72 Cn with n digits q 76 Mq =2 − 1, Mersenne number 84 σ(n) sum of of n 86 τ(n) number of divisors of n 86 H(n) harmonic mean of divisors of n 86 V (x)#{N | N ≤ x} 87 s(n) sum of aliquot parts of n 88 psp in base 2 92 psp(a) pseudoprime in base a 94 Bpsp(n) number of bases a,1

Page Notation Explanation

134 µ(x)M¨obius function 140 ∆ fundamental associated √ to d√=0 , 1 140 Q( d)=Q( ∆), quadratic√ field Q 141 Cld or Cl∆ class group of ( √d) 141 hd or h∆ class number of Q( d) 141 ed exponent of the class group Cld ∗ { | ≤ ≤ | | } 148 πf(X)(N)#n 0 n N, f(n) is a prime 150 P0[m] smallest prime factor of m>1 150 P0[f(X)] = min{P0[f(k)] | k =0, 1, 2,...} 158 f(x) ∼ h(x) f, h are asymptotically equal 159 f(x)=g(x) the difference f(x) − g(x) is ultimately +O(h(x)) bounded by a constant multiple of h(x) 159 f(x)=g(x) the difference f(x) − g(x) is negligible +o(h(x)) in comparison to h(x) 159 ζ(s) Riemann’s zeta function 161 Bk Bernoulli number n k 162 Sk(n)=j=1 j 162 Bk(X) Bernoulli polynomial 163 Li(x) logarithmic integral 164 θ(x)=p≤x log p, Tschebycheff’s function 165 Re(s) real part of s 165 Γ(s) gamma function 166 γ Euler’s constant 167 J(x) weighted prime-power counting function 168 R(x) Riemann’s function 169 Λ(x) von Mangoldt’s function 170 ψ(x) summatory function of the von Mangoldt function 172 M(x) Mertens’ function 174 ϕ(x, m)#{a | 1 ≤ a ≤ x, a is not a multiple of 2, 3,...,pm} 177 ρn nth zero of ζ(s) in the upper half of the critical strip 177 N(T )#{ρ = σ + it | 0 ≤ σ ≤ 1,ζ(ρ)=0, 0

Page Notation Explanation

186 g(p) number of successive composite integers greater than p 186 G = {m | m = g(p)forsomep>2} 186 p[m] the smallest prime p such that g(p)=m 191 log2 x log log x 191 log3 x log log log x 191 log4 x log log log log x 193 B Brun’s constant 194 π2(x)#{p prime | p +2≤ x and p +2isalso aprime } 1 194 C = 1 − , constant 2 (p − 1)2 p>2 197 π2k(x)#{n ≥ 1 | pn ≤ x and pn+1 − pn =2k} 198 π2,6(x)#{p prime | p ≤ x and p +2,p+ 6 are also primes} 198 π4,6(x)#{p prime | p ≤ x and p +4,p+ 6 are also primes} 198 π2,6,8(x)#{p prime | p ≤ x and p +2,p+6,p+8 are also primes} 1 1 1 198 B = + + , 2,6 p p +2 p +6 the summation extended over all triplets of primes (p, p +2,p+6) 1 1 1 198 B = + + , 4,6 p p +4 p +6 the summation extended over all triplets of primes (p, p +4,p+6) 1 1 1 1 198 B = + + + , 2,6,8 p p +2 p +6 p +8 summation over all quadruplets of primes (p, p +2,p+6,p+8) 200 ρ∗(x)=k if there exists an admissible (k − 1)-tuple below x, but none with more components − 200 ρ(x) = lim supy→∞ π(x + y) π(y) 205 πd,a(x)#{p prime | p ≤ x, p ≡ a (mod d)} 207 p(d, a) smallest prime in the arithmetic progression {a + kd | k ≥ 0} xxii Index of Notations

Page Notation Explanation

207 p(d)=max{p(d, a) | 1 ≤ a

Page Notation Explanation

10n − 1 235 Rn = , 9 240 Cn = n × 2n + 1, 241 Cπ(x)#{n | Cn ≤ x and Cn is prime} 241 Wn = n × 2n − 1, Woodall number or Cullen number of the second kind 244 P(T ) set of primes p dividing some term of the sequence T =(Tn)n≥0 244 πH (x)#{p ∈P(H) | p ≤ x} 247 S2n+1 NSW number 254 πf(X)(x)#{n ≥ 1 ||f(n)|≤x and |f(n)| is prime} 261 p(f) smallest integer m ≥ 1 such that |f(m)| is a prime 263 πX,X+2k(x)#{p prime | p +2k prime and p +2k ≤ x} 2 264 πX2+1(x)#{p prime | p is of the form p = m +1 and p ≤ x} 265 πaX2+bX+c(x)#{p prime | p is of the form p = am2 + bm + c and p ≤ x}