The Book of Prime Number Records Second Edition Paulo Ribenboim The Book of Prime Number Records Second Edition Springer-Verlag New York Berlin Heidelberg London Paris Tokyo Paulo Ribenboim Department of Mathematics and Statistics Queen's University Kingston, Ontario K7L 3N6 Canada Mathematics Subject Classification (1980): 10H15, 10H20 Library of Congress Cataloging-in-Publication Data Ribenboim, Paulo. The book of prime number records / Paulo Ribenboim--2nd ed. p. cm. Includes bibliographical references. ISBN-13: 978-1-4684-0509-5 1. Numbers, Prime I. Title. QA246.R47 1989 512'.72--dc20 89-21675 Copyright 1989 Springer-Verlag New York Inc. Softcover reprint of the hardcover 1st edition 1989 This work may not be copied in whole or in part without the written permission of the publisher (Springer-Verlag, 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 or retrevial, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use of general descriptive names, trade names, trademarks, etc. in this publication, even if former are not especially identified, is not to be taken as a sign that such names, as understood by the Trade Marks and Merchandise Act, may accordingly be used freely by anyone. 987654321 ISBN-13: 978-1-4684-0509-5 e-ISBN-13: 978-1-4684-0507-1 DOl: 10.1007/978-1-4684-0507-1 Narrow road to A Jean Pierre Serre, qui a far province. montre Ie chemin. BashO PREFACE TO THE FIRST EDITION This text originated as a lecture delivered November 20, 1984, at Queen's University, in the undergraduate colloquim series established to honor Professors A. J. Coleman and H. W. Ellis and to acknow ledge their long lasting interest in the quality of teaching under graduate students. In another colloquim lecture, my colleague Morris Orzech, who had consulted the latest edition of the Guilllless Book oj Records, remainded me very gently that the most "innumerate" people of the world are of a certain tribe in Mato Grosso, Brazil. They do not even have a word to express the number "two" or the concept of plurality. "Yes Morris, I'm from Brazil, but my book will contain numbers different from 'one.' " He added that the most boring 800-page book is by two Japanese mathematicians (whom I'll not name), and consists of about 16 million digits of the number 11. "I assure you Morris, that in spite of the beauty of the apparent randomness of the decimal digits of 11, I'll be sure that my text will include also some words." Acknowledgment. The manuscript of this book was prepared on the word processor by Linda Nuttall. I wish to express my appreciation for the great care, speed, and competence of her work. Paulo Ribenboim PREFACE TO THE SECOND EDITION What is new in this edition? A few misprints were corrected, as well as a wrong statement about Mersenne numbers which, embarrassingly, I attributed to Bob Silverman. There are also several new records in the text, which were attained since this book appeared one year ago, including a new Mersenne number. On the other hand, no space could be made to describe the very recent primality testing methods involving elliptic curves. Finally, a probable new record: RECORD The fastest selling book on prime number records is .. You may begin reading it! Paulo Ribenboim TABLE OF CONTENTS Preface to the First Edition vii Preface to the Second Edition viii Guiding the Reader xiii Index of Notations xv Introduction Chapter 1. How Many Prime Numbers Are There? 3 I. Euclid's Proof 3 II. Kummer's Proof 4 III. Polya's Proof 5 IV. Euler's Proof 7 V. Thue's Proof 8 VI. Two-and-a-Half Forgotten Proofs 8 A. Perott's Proof 9 B. Auric's Proof 9 C. Metrod's Proof 10 VII. Washington's Proof 10 VIII. FUrstenberg's Proof 11 Chapter 2. How to Recognize Whether a Natural Number Is a Prime? 13 I. The Sieve of Eratosthenes 14 II. Some Fundamental Theorems on Congruences 15 A. Fermat's Little Theorem and Primitive Roots Modulo a Prime 16 B. The Theorem of Wilson 19 x Contents C. The Properties of Giuga, Wolstenholme and Mann & Shanks 20 D. The Power of a Prime Dividing a Factorial 22 E. The Chinese Remainder Theorem 24 F. Euler's Function 25 G. Sequences of Binomials 31 H. Quadratic Residues 34 III. Classical Primality Tests Based on Congruences 36 IV. Lucas Sequences 41 Addendum on Lehmer Numbers 61 V. Classical Primality Tests Based on Lucas Sequences 61 VI. Fermat Numbers 71 VII. Mersenne Numbers 75 Addendum on Perfect Numbers 81 VIII. Pseudoprimes 86 A. Pseudoprimes in Base 2 (psp) 86 B. Pseudoprimes in Base a (psp(a» 89 B. Euler Pseudoprimes in Base a (epsp(a» 92 D. Strong Pseudoprimes in Base a (spsp(a» 94 Addendum on the Congruence an-k == bn-k (mod n) 97 IX. Carmichael Numbers 98 Addendum on Knodel Numbers 100 X. Lucas Pseudo primes 101 A. Fibonacci Pseudoprimes 102 Q» B. Lucas Pseudoprimes (Jlpsp(P, 104 Q» C. Euler-Lucas Pseudoprimes (eJlpsp(P, and Strong Q» Lucas Pseudo primes (sJlpsp(P, 105 D. Carmichael-Lucas Numbers 107 XI. Last Section on Primality Testing and Factorization! 107 A. The Cost of Testing 109 B. Recent Primality Tests 113 C. Monte Carlo Methods 116 D. Titanic Primes 120 E. Factorization 121 F. Public Key Cryptography 123 Chapter 3. Are There Functions Defining Prime Numbers? 129 I. Functions Satisfying Condition (a) 129 II. Functions Satisfying Condition (b) 135 III. Functions Satisfying Condition (c) 144 Chapter 4. How Are the Prime Numbers Distributed? 153 I. The Growth of 7l(x) 154 A. History Unfolding 155 Euler 155 Legendre 159 Gauss 160 Contents xi Tschebycheff 160 Riemann 161 de 1a Vallee Poussin and Hadamard 164 Erdos and Selberg 167 B. Sums Involving the Mobius Function 168 C. The Distribution of Values of Euler's Function 172 D. Tables of Primes 175 E. The Exact Value of n(x) and Comparison with x/(log x), Li(x), and R(x) 178 F. The Nontrivial Zeroes of t(s) 180 G. Zero-Free Regions for t(s) and the Error Term in the Prime Number Theorem 184 H. The Growth of t(s) 186 II. The nth Prime and Gaps 188 A. Some Properties of n(x) 188 B. The nth Prime 190 C. Gaps between Primes 191 D. The Possible Gaps between Primes 196 E. Interlude 197 III. Twin Primes 199 Addendum on Polignac's Conjecture 204 IV. Primes in Arithmetic Progression 205 A. There Are Infinitely Many! 205 B. The Smallest Prime in an Arithmetic Progression 217 C. Strings of Primes in Arithmetic Progression 223 V. Primes in Special Sequences 226 VI. Goldbach's Famous Conjecture 229 VII. The Waring-Goldbach Problem 236 A. Waring's Problem 236 B. The Waring-Goldbach Problem 247 VIII. The Distribution of Pseudoprimes and of Carmichael Numbers 248 A. Distribution of Pseudoprimes 248 B. Distribution of Carmichael Numbers 252 C. Distribution of Lucas Pseudoprimes 253 Chapter 5. Which Special Kinds of Primes Have Been Considered? 255 I. Regular Primes 255 II. Sophie Germain Primes 261 III. Wieferich Primes 263 IV. Wilson Primes 277 V. Repunits and Similar Numbers 277 VI. Primes with Given Initial and Final Digits 280 VII. Numbers k x 2n ± 1 280 Addendum on Cullen Numbers 283 xii Table of Contents VIII. Primes and Second-Order Linear Recurrence Sequences 283 IX. The NSW-Primes 288 Chapter 6. Heuristic and Probabilistic Results About Prime Numbers 291 I. Prime Values of Linear Polynomials 292 II. Prime Values of Polynomials of Arbitrary Degree 307 III. Some Probabilistic Estimates 321 A. Partitio Numerorum 321 B. Polynomials with Many Successive Composite Values 329 C. Distribution of Mersenne Primes 332 D. The log log Philosophy 333 IV. The Density of the Set of Regular Primes 334 Conclusion 347 Dear Reader 347 Citations for Some Possible Prizes for Work on the Prime Number Theorem 349 Bibliography 355 A. General References 355 B. Specific References 357 Chapter 1 357 Chapter 2 361 Chapter 3 390 Chapter 4 398 Chapter 5 439 Chapter 6 449 Conclusion 455 Primes up to 10,000 456 Index of Names 461 Gallima ufr ies 471 Subject Index 473 Addenda to the Second Edition 477