D. Byatt, M. L. Dalrymple and R. M. Turner

Size: px
Start display at page:

Download "D. Byatt, M. L. Dalrymple and R. M. Turner"

Transcription

1 SEARCHING FOR PRIMES IN THE DIGITS OF 7r D. Byatt, M. L. Dalrymple and R. M. Turner Department of Mathematics and Statistics University of Canterbury Private Bag 4800 Christchurch, New Zealand Report Number: UCDMS2003/23 December 2003 Keywords: Pi, primes, random numbers, mathematical constants To appear: Computers and Mathematics with Applications, 2004

2 SEARCHING FOR PRIMES IN THE DIGITS OF 7r D. BYATT, M.L. DALRYMPLE,ANDR. M. TURNER ABSTRACT. Many people are fascinated by 1r. Vast amounts of human and computer resources have been spent producing billions of its digits. Similarly, many people are intrigued by primes. How many primes are there within the digits of 7r? How many can we expect to find? We present the results of some computer searches and develop a theory to predict how many of these primes extensive computer searches are likely to find. 1. INTRODUCTION Certain mathematical constants hold special appeal for a great many people, probably none more so than 7f. Over the years considerable time and effort has been spent developing new formulae for, and calculating ever more digits of 7f. Once of purely academic interest large-scale calculations of n have gained increasing respectability. Nowadays such computations are routinely used as a quality control check for new super-computers for example. Similar computational effort has also been spent on searches for certain types of prime numbers. Primes also hold special appeal for many people. This article was motivated in part by an interest in both these areas. We present the results of some computer searches for primes within the digits of 7f (and a few other well-known constants) and develop a theory for calculating the expected number of primes to be found by such searches. The procedure for discovering these so-called "n-primes" is straightforward: simply check the primality of 1fk = Ln 10k-l J (where Lx J represents the integer part of x), for each k EN. For example, 7f1 = 3 is prime, n2 = 31 is also prime, but n3 = 314 is composite. The first four n-primes are n1,n2,7f5 and 7f33. It is important to note that many modern computer-implemented primality tests are probabilistic rather than deterministic in nature. As such they do not guarantee a number that passes such a test is prime, rather, it is (very) probably prime (see for example [7], and the references therein). Such numbers are sometimes called pseudo-primes. Conversely however, numbers which fail pseudo-prime tests are composite. Probabilistic primality tests are used because they tend to be significantly faster than deterministic tests and, for most purposes, just as good. Details of a new deterministic prime test which runs in polynomial time can be found in [1]. Similarly, the "random" numbers 1

3 2 D. BYATT,M. L. DALRYMPLE,ANDR. M. TURNER generated by a computer (as in Section 3) are calculated by a deterministic process and so are not truly random. Consequently, they are often referred to as pseudo-random. Before discussing the number of 'if-primes, a theory for the expected number of primes when positive integers are chosen at random is presented. After some numerical experiments, this theory is extended to predict the number of n-primes. We then show that these results apply to just about any constant, not just 7f. The resulting theory is used to predict the number of these primes that extensive computer searches are likely to find. The results of some computer searches are presented for comparison with the predicted values. 2. PRIMES AT RANDOM THEORY If a natural number m has exactly k digits 1 then 10k-l ::::; m < lok. Let N(k) be the number of positive integers with exactly k digits so that N(k) = 9 10k- 1. Suppose II(m) represents the number of primes 2 less than m. The number of primes with exactly k digits, P(k), is given by P(k) = II(lOk) - II(10k- 1 ). (1) The probability that m, a randomly chosen positive integer with exactly k digits, is prime is therefore P(k) p(k) = N(k). Values of P(k) and p(k) for k E {1, 2,..., 22} are presented in Table 1 [5]. As m increases, it becomes increasingly difficult (time consuming) to calculate II(m). However there are several well known approximating functions. For example, m II1(m) = (2) log m is the approximation suggested by Legendre in 1798 and m II2(m) = ogm is the approximation, perhaps first considered by Gauss in In both equations (2) and (3) log m represents the natural logarithm of m. In 1896 Hadamard and de la Vallee-Poussin (independently) proved that II2 is an arbitrarily good approximation for II, in the sense that, II2(m)/II(m), 1 as m, oo. This subsequently became known as the 1 When referring to a k-digit integer, only the significant digits are counted. For example, is a four digit integer. 2 The usual notation used by number theorists is 7r(m), however II(m) will be used here to avoid confusion with the constant 7r and the integers 7rk (3)

4 SEARCHING FOR PRIMES IN THE DIGITS OF 7r 3 k P(k) p(k) Table 1. Number of primes with k-digits (P(k)), and the probability they are chosen at random (p(k)). Prime Number Theorem. Note that the constant in equation (2) was based on Legendre's limited table of values for II(m); de la Vallee-Poussin showed that 1 is the best value to use for large m. For the values of k given in Table 1, Il 1 is a very accurate approximation of II (within about 0.53) when k > 4 and II 2 is within 3% of II when k is larger than about 15. The probability that a randomly selected positive integer with exactly k digits is prime, p(k), can be approximated by either or where Pi and P 2 are defined as in equation (1). The calculation of p 2 can be further simplified. Since P2 (k) 1 (10 1 ) p 2 (k) = N(k) = 9log10 k - k-1 '

5 4 D.BYATT,M. L. DALRYMPLE, AND R. M.TURNER P2(k) can be approximated by 1 P 3 ( k) = k log 10 ' and the accuracy of the approximation improves as k increases. Now suppose that n positive integers are chosen at random. How many primes would be expected amongst the n numbers? Since each number is chosen at random the expected value for the number of primes is simply the sum of the probabilities that the individual numbers are prime. If the jth number has kj digits then the expected number of primes is L,7= 1 p(kj). If II (and therefore p) is unavailable, the expected number of primes can be approximated by using either P1, P2 or p3 in place of p. For the remainder of this section, the special case where n positive integers are chosen at random so that the kth such number has k digits (similar to the?t-prime situation) is discussed. Suppose Xk is the Bernoulli random variable representing whether a single randomly chosen k-digit positive integer is prime (Xk = 1) or composite (Xk = 0) so that x, ~ {~ with probability p(k) with probability 1 - p(k). Define T = L,~= 1 Xk to be the random variable representing the total number of primes found when randomly choosing n positive integers so that the kth such number has k digits. The expected number of primes E(T) = L,~=l E(Xk) where E(Xk) = L,~=o Pr(Xk = j) j, hence n E(T) = LP(k). (4) k=l Since Table 1 only goes as far as 22 digits, equation ( 4) can be approximated using p 1, p 2 or p3 whenever n > 22. For example, using p3 gives 22 n E(T) ~ LP(k) + L p3(k) k=l k=23 n 1 = i I: k 1. k=23 og 10 (5) Figure 1 shows the ratios pifp, P2/P and p3/p (as percentages) for k E {1, 2,..., 22}. Once again, P1 is a good approximation for p when k > 4. Furthermore, the simplification leading to p 3 reduces some of the error in approximation p 2 Although the approximations for p may be reasonably accurate, summing a series of such approximations may lead to the accumulation of a large error. However, Figure 2 shows that the expected values obtained by each of the approximations are

6 SEARCHING FOR PRIMES IN THE DIGITS OF 7f 5 120,-----, , :=== -p -e- Pt P2 -e- p Digits Figure 1. Relative accuracy of approximate probabilities. sufficiently close to the theoretical value for all practical purposes. In fact, since the difference p 3 (k) - P2(k) is 1 Oe ( k) = 9 log 10 k ( k - 1) ' the total accumulated error in using p3 instead of P2 whenever k > 22, for the calculation of the expected value E(T) in equation (5), is bounded above by 00 1 ~ oe(k) = ~ k= log10 Furthermore, the approximation p3 allows the expected value to be calculated relatively easily for very large numbers of digits (as in Table 2). Numerical experiments using equation (5) show that E(T) ~ LE(T)J = j (6) whenever n = loj for some j E N. In order to find at least t primes, it would be expected that E(T) > t If the conditions for equation (6) are met, this occurs whenever n > 1.5 x 1ot- 1. Note that n is the number of digits in the final number tested for primality, therefore this final number will be greater than 10 1 ot-i. Let a 2 (T) be the population variance of the total number of primes found when randomly choosing n positive integers so that the kth such number has k digits. Then a 2 (T) = I:~=l a 2 (Xk), where

7 6 D. BYATT,M. L. DALRYMPLE,ANDR. M.TURNER 2.2 h a kl Digits Figure 2. Expected value calculated using each of the approximations (exact up to 22 digits). n CJ 2 (T) = LP(k)(l - p(k)). k=l (7) Equation (7) can be approximated using p1, p 2 or p 3 whenever n > 22. Using p 3, for example gives 22 n CJ 2 (T) ~ LP(k)(l - p(k)) + I: p3(k)(1- p3(k)) k=l k= t klogl0-1 + k=23 (klog10)2 n ~ LP3(k) k=23 22 ~ E(T) LP(k) k=l ~ E(T) (8) Since the difference between p 3 (k) and Ps(k)(l - p3(k)) is 1 bv ( k) = k2 log2 10 '

8 SEARCHING FOR PRIMES IN THE DIGITS OF 7r 7 Digits E(T) LE(T)J E(T) a 2 (T) Table 2. Comparison of the expected value E(T), and the variance a 2 (T). the total accumulated error in using p 3 (k) instead of p 3 (k)(l - p 3 (k)) whenever k > 22, for the calculation of the variance a 2 (T) in equation (8), is bounded above by ( 7r2 1 ) L Ov(k) = L k 2 ~ k=23 log 10 6 k=l Some numerical values for the expected value E(T), LE(T)J, E(T) and the variance a 2 (T) are presented in Table PRIMES AT RANDOM - PRACTICE We now discuss the number of primes found when k-digit positive integers were tested for primality for k E {1, 2,..., n }. Two methods are used for generating the numbers. In the Random Method, each k-digit number is chosen at random from all possible k-digit numbers. The Construction Method generates successive numbers by appending a randomly chosen digit (0-9) at each iteration. Numbers generated by the Construction Method are no longer chosen at random, nor are they independent - the number generated at the next iteration is highly dependent on the current one. The theory developed in the previous section describes numbers generated by the Random Method, however numbers generated when searching for n-primes are more similar to those of the Construction Method. Computer experiments were performed to see how closely numbers generated by the Construction Method are modelled by the Random Method theory. In each experiment, k-digit positive integers were tested for primality for k E {1, 2,..., n} where n E {10, 100, 1000}. The experiments were repeated times for n E {10, 100} but only 100 times for n = 1000 due to the dramatic increase in the amount of computer time required. All of the computer experiments were performed using Maple 7 on a Sun Enterprise 450 machine. The results for the Random and Construction Methods are presented in Tables 3 and 4, where n is the number of digits in the final number

9 8 D.BYATT,M. L. DALRYMPLE,ANDR. M. TURNER n nr E(T) Xr (}2(T) Sr 95% CI (1.33,1.37) (2.30,2.35) (3.2,3.9) Table 3. Results for the Random Method. n nc E(T) Xe (}2(T) Sc 95% CI (1.32,1.36) (2.29, 2.34) (3.2,3.9) Table 4. Results for the Construction Method. tested, E(T) and (} 2 (T) are the theoretical expected value and variance, nr,c, Xr,c and sr,c are the number of times the experiments were repeated (sample size), the sample mean and the sample variance for the Random and Construction Methods. By the Central Limit Theorem the sample means are normally distributed. Tables 3 and 4 include 953 confidence intervals about each of the sample means. In every case, the Construction Method performed similarly to the Random Method. To determine if the means for the two methods (µr and µc) are significantly different, the null hypothesis H 0 : µr = µc was tested against the alternative hypothesis Ha: µr -=/= µc for each n E {10, 100, 1000}. The appropriate test statistic for examining the difference between the means is z = (s2 s2) i. i:_+_. nr nc The corresponding p-values are P10 = , P1oo = and p 1000 = Hence there is insufficient evidence to reject the null hypotheses. With such large p-values we can be confident that the theory developed in Section 2 models the number of primes for numbers generated by both the Random and Construction Methods. 4. RESULTS When searching for Jr-primes the successive digits are not appended at random - they must come from the digits of Jr. However, as the known digits of 7r pass tests for randomness [2, 4, 6], the successive digits appear to have been chosen at random. As such, the theory presented in the previous section is expected to model the distribution of primes within the digits of 7r. Furthermore, it is also expected to apply to any real number whose successive digits appear random - which is just about all of them [3].

10 SEARCHING FOR PRIMES IN THE DIGITS OF 7f 9 Digits E(T) 903 7f e J2 e'lr 1fe 'Y ii (0, 3) (0, 5) (1, 7) (1, 8) (2, 9) (3, 11) Table 5. Numbers of primes within a selection of constants. As the expected value E(T) and the variance 0" 2 (T) are approximately equal we use the Poisson distribution which is characterised by a single parameter.\ and is often used to model rare events, to model the expected number of 7r-primes. The parameter,\ = E(T) Rj 0" 2 (T), in this case, represents the expected number of primes per n-digit search. The results of searches for primes in the digits of some well known constants are presented in Table 5. For completeness, the constants e, i, 'Y and the so-called "golden ratio" are defined as e = lim (1 + ~) n n->oo n i= V-1 'Y = lim ( ~ ~ - log n) n->oo = V L..t k k=l For each of the constants in Table 5, the number of primes found when searching from one digit, up to the number of digits in the Digits column are tabulated, as is a 903 confidence interval based on a Poisson distribution with parameter,\ = E(T) (that is, there is a 53 chance of finding fewer primes than the lower limit of the confidence interval and a 53 chance of finding more primes than the upper limit). The results presented in Table 5 are by no means exhaustive, in fact some of the entries have been left blank for you to fill in yourself when you have a bit of spare time. Based on a Poisson distribution with parameter,\= E(T), and given that it is infeasible to determine the primality of numbers with more than about 10 4 digits, there is only a 53 chance of finding more than 8 primes. If it is possible to test numbers with up to 10 6 digits, then there is a 53 chance of finding more than 11 primes. With the rather optimistic limit of up to 10 9 digits there is a 53 chance of finding more than 15 primes.

11 10 D. BYATT, M. L. DALRYMPLE, AND R. M. TURNER It is worth pointing out that it is not necessary to run a ( computationally expensive) primality test at every iteration. Half the numbers generated are expected to be even and so need not be tested. Similarly, one third of the numbers are expected to be divisible by three. Hence performing a primality test only on the numbers that are equivalent to ±1 modulo 6 removes the need to test about two-thirds of all the numbers generated. For example, if 1000 numbers are generated, only about 300 need to be tested for primality. 5. CONCLUSION Although the expected number of primes, E(T), is unbounded, we conjecture (despite the notorious unreliability of such predictions) that there is little point spending vast amounts of computer time searching for say, the next 10 7r-primes. Although having said that, maybe it would be possible to find just one more... REFERENCES (1] M. Agrawal, N. Kayal, and N. Saxena. Primes is in P. Research report, Department of Computer Science and Engineering, Indian Institute of Technology, Kanpur, India, August Submitted to Annals of Mathematics. (2] D. H. Bailey and R. E. Crandall. On the random character of fundamental constant expansions. Experimental Mathematics, 10(2): , (3] C. Calude. Information and randomness: An algorithmic perspective. Monographs in Theoretical Computer Science. Springer-Verlag, Berlin, 2nd edition, Revised and extended. (4] G. H. Choe and D. H. Kim. Entropy and the randomness of the digits of 'Tr. Communications of the Korean Mathematical Society, 15(4): , (5] X. Gourdon and P. Sebah. Counting the number of primes, (6] B. R. Johnson and D. J. Leeming. A study of the digits of 'Tr, e and certain other irrational numbers. Sankhya, The Indian Journal of Statistics, 52(2): , Series B. (7] S. Y. Yan. Primality testing of large numbers in Maple. Computers and Mathematics with Applications, 29(12):1-8, DEPARTMENT OF MATHEMATICS AND STATISTICS, UNIVERSITY OF CANTERBURY, PRIVATE BAG 4800, CHRISTCHURCH, NEW ZEALAND address: d. byatt@math. canterbury. ac.nz address: m. dalrymple@math. canterbury. ac.nz address: r. turner@math. canter bury. ac. nz

Primes and Factorization

Primes and Factorization Primes and Factorization 1 A prime number is an integer greater than 1 with no proper divisors. The list begins 2, 3, 5, 7, 11, 13, 19,... See http://primes.utm.edu/ for a wealth of information about primes.

More information

Factorization & Primality Testing

Factorization & Primality Testing Factorization & Primality Testing C etin Kaya Koc http://cs.ucsb.edu/~koc koc@cs.ucsb.edu Koc (http://cs.ucsb.edu/~ koc) ucsb ccs 130h explore crypto fall 2014 1/1 Primes Natural (counting) numbers: N

More information

Here is another characterization of prime numbers.

Here is another characterization of prime numbers. Here is another characterization of prime numbers. Theorem p is prime it has no divisors d that satisfy < d p. Proof [ ] If p is prime then it has no divisors d that satisfy < d < p, so clearly no divisor

More information

Cryptography: Joining the RSA Cryptosystem

Cryptography: Joining the RSA Cryptosystem Cryptography: Joining the RSA Cryptosystem Greg Plaxton Theory in Programming Practice, Fall 2005 Department of Computer Science University of Texas at Austin Joining the RSA Cryptosystem: Overview First,

More information

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

More information

Pseudoprime Statistics to 10 19

Pseudoprime Statistics to 10 19 Pseudoprime Statistics to 10 19 Jens Kruse Andersen and Harvey Dubner CONTENTS 1. Introduction 2. Background Information 3. Results References A base-b pseudoprime (psp) is a composite N satisfying b N

More information

Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn Randomization Randomized Algorithm: An algorithm that uses (or can use) random coin flips in order to make decisions We will see: randomization

More information

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006 Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 2.4 2.6 of Rosen Introduction I When talking

More information

Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn

Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn Chapter 7 Randomization Algorithm Theory WS 2017/18 Fabian Kuhn Randomization Randomized Algorithm: An algorithm that uses (or can use) random coin flips in order to make decisions We will see: randomization

More information

NOTES ON SOME NEW KINDS OF PSEUDOPRIMES

NOTES ON SOME NEW KINDS OF PSEUDOPRIMES MATHEMATICS OF COMPUTATION Volume 75, Number 253, Pages 451 460 S 0025-5718(05)01775-8 Article electronically published on September 15, 2005 NOTES ON SOME NEW KINDS OF PSEUDOPRIMES ZHENXIANG ZHANG Abstract.

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 10 February 19, 2013 CPSC 467b, Lecture 10 1/45 Primality Tests Strong primality tests Weak tests of compositeness Reformulation

More information

Lecture 23: Introduction to Quantum Complexity Theory 1 REVIEW: CLASSICAL COMPLEXITY THEORY

Lecture 23: Introduction to Quantum Complexity Theory 1 REVIEW: CLASSICAL COMPLEXITY THEORY Quantum Computation (CMU 18-859BB, Fall 2015) Lecture 23: Introduction to Quantum Complexity Theory November 31, 2015 Lecturer: Ryan O Donnell Scribe: Will Griffin 1 REVIEW: CLASSICAL COMPLEXITY THEORY

More information

The running time of Euclid s algorithm

The running time of Euclid s algorithm The running time of Euclid s algorithm We analyze the worst-case running time of EUCLID as a function of the size of and Assume w.l.g. that 0 The overall running time of EUCLID is proportional to the number

More information

Needles and Numbers. The Buffon Needle Experiment

Needles and Numbers. The Buffon Needle Experiment eedles and umbers This excursion into analytic number theory is intended to complement the approach of our textbook, which emphasizes the algebraic theory of numbers. At some points, our presentation lacks

More information

1. Algebra 1.7. Prime numbers

1. Algebra 1.7. Prime numbers 1. ALGEBRA 30 1. Algebra 1.7. Prime numbers Definition Let n Z, with n 2. If n is not a prime number, then n is called a composite number. We look for a way to test if a given positive integer is prime

More information

Primes. Rational, Gaussian, Industrial Strength, etc. Robert Campbell 11/29/2010 1

Primes. Rational, Gaussian, Industrial Strength, etc. Robert Campbell 11/29/2010 1 Primes Rational, Gaussian, Industrial Strength, etc Robert Campbell 11/29/2010 1 Primes and Theory Number Theory to Abstract Algebra History Euclid to Wiles Computation pencil to supercomputer Practical

More information

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test Introduction to Algorithms (CS 482) Cornell University Instructor: Bobby Kleinberg Lecture Notes, 25 April 2008 The Miller-Rabin Randomized Primality Test 1 Introduction Primality testing is an important

More information

Prime Number Theory and the Riemann Zeta-Function

Prime Number Theory and the Riemann Zeta-Function 5262589 - Recent Perspectives in Random Matrix Theory and Number Theory Prime Number Theory and the Riemann Zeta-Function D.R. Heath-Brown Primes An integer p N is said to be prime if p and there is no

More information

Correctness, Security and Efficiency of RSA

Correctness, Security and Efficiency of RSA Correttezza di RSA Correctness, Security and Efficiency of RSA Ozalp Babaoglu! Bisogna dimostrare D(C(m)) = m ALMA MATER STUDIORUM UNIVERSITA DI BOLOGNA 2 Correttezza di RSA Correttezza di RSA! Risultati

More information

Prime and Perfect Numbers

Prime and Perfect Numbers Prime and Perfect Numbers 0.3 Infinitude of prime numbers 0.3.1 Euclid s proof Euclid IX.20 demonstrates the infinitude of prime numbers. 1 The prime numbers or primes are the numbers 2, 3, 5, 7, 11, 13,

More information

CHAPTER 10 Comparing Two Populations or Groups

CHAPTER 10 Comparing Two Populations or Groups CHAPTER 10 Comparing Two Populations or Groups 10.1 Comparing Two Proportions The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers Comparing Two Proportions

More information

Cryptography CS 555. Topic 18: RSA Implementation and Security. CS555 Topic 18 1

Cryptography CS 555. Topic 18: RSA Implementation and Security. CS555 Topic 18 1 Cryptography CS 555 Topic 18: RSA Implementation and Security Topic 18 1 Outline and Readings Outline RSA implementation issues Factoring large numbers Knowing (e,d) enables factoring Prime testing Readings:

More information

Introduction to Number Theory. The study of the integers

Introduction to Number Theory. The study of the integers Introduction to Number Theory The study of the integers of Integers, The set of integers = {... 3, 2, 1, 0, 1, 2, 3,...}. In this lecture, if nothing is said about a variable, it is an integer. Def. We

More information

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

More information

Primality Testing. 1 Introduction. 2 Brief Chronology of Primality Testing. CS265/CME309, Fall Instructor: Gregory Valiant

Primality Testing. 1 Introduction. 2 Brief Chronology of Primality Testing. CS265/CME309, Fall Instructor: Gregory Valiant CS265/CME309, Fall 2018. Instructor: Gregory Valiant Primality Testing [These notes may not be distributed outside this class without the permission of Gregory Valiant.] 1 Introduction Prime numbers are

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 9 February 6, 2012 CPSC 467b, Lecture 9 1/53 Euler s Theorem Generating RSA Modulus Finding primes by guess and check Density of

More information

FACTORS OF GENERALIZED FERMAT NUMBERS

FACTORS OF GENERALIZED FERMAT NUMBERS mathematics of computation volume 64, number 20 january, pages -40 FACTORS OF GENERALIZED FERMAT NUMBERS HARVEY DUBNER AND WILFRID KELLER Abstract. Generalized Fermât numbers have the form Fb

More information

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS Modular arithmetics that we have discussed in the previous lectures is very useful in Cryptography and Computer Science. Here we discuss several

More information

RANDOM FIBONACCI-TYPE SEQUENCES

RANDOM FIBONACCI-TYPE SEQUENCES R. DAWSON, G. GABOR, R. NOWAKOWSKI, D, WIENS Dalhousie University, Halifax, Nova Scotia (Submitted December 1983) 1, INTRODUCTION In t h i s p a p e r, we s h a l l study s e v e r a l random v a r i a

More information

Theoretical Cryptography, Lecture 13

Theoretical Cryptography, Lecture 13 Theoretical Cryptography, Lecture 13 Instructor: Manuel Blum Scribe: Ryan Williams March 1, 2006 1 Today Proof that Z p has a generator Overview of Integer Factoring Discrete Logarithm and Quadratic Residues

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security Outline Quadratic residues Useful tests Digital Signatures CPSC 467b: Cryptography and Computer Security Lecture 14 Michael J. Fischer Department of Computer Science Yale University March 1, 2010 Michael

More information

WXML Final Report: AKS Primality Test

WXML Final Report: AKS Primality Test WXML Final Report: AKS Primality Test Amos Turchet, Travis Scholl, Rohan Hiatt, Daria Mićović, Blanca Viña Patiño, Bryan Tun Pey Quah Winter 2017 1 Introduction Prime numbers are fascinating objects in

More information

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba B.N.Bandodkar College of Science, Thane Random-Number Generation Mrs M.J.Gholba Properties of Random Numbers A sequence of random numbers, R, R,., must have two important statistical properties, uniformity

More information

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur

PRIMES is in P. Manindra Agrawal. NUS Singapore / IIT Kanpur PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur The Problem Given number n, test if it is prime efficiently. Efficiently = in time a polynomial in number of digits = (log n) c for some constant

More information

Primality testing: variations on a theme of Lucas. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA

Primality testing: variations on a theme of Lucas. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA Primality testing: variations on a theme of Lucas Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA In 1801, Carl Friedrich Gauss wrote: The problem of distinguishing prime numbers from composite

More information

Probabilistic Aspects of the Integer-Polynomial Analogy

Probabilistic Aspects of the Integer-Polynomial Analogy Probabilistic Aspects of the Integer-Polynomial Analogy Kent E. Morrison Department of Mathematics California Polytechnic State University San Luis Obispo, CA 93407 kmorriso@calpoly.edu Zhou Dong Department

More information

THE SOLOVAY STRASSEN TEST

THE SOLOVAY STRASSEN TEST THE SOLOVAY STRASSEN TEST KEITH CONRAD 1. Introduction The Jacobi symbol satisfies many formulas that the Legendre symbol does, such as these: for a, b Z and odd m, n Z +, (1) a b mod n ( a n ) = ( b n

More information

Permutation Generators Based on Unbalanced Feistel Network: Analysis of the Conditions of Pseudorandomness 1

Permutation Generators Based on Unbalanced Feistel Network: Analysis of the Conditions of Pseudorandomness 1 Permutation Generators Based on Unbalanced Feistel Network: Analysis of the Conditions of Pseudorandomness 1 Kwangsu Lee A Thesis for the Degree of Master of Science Division of Computer Science, Department

More information

Lecture 4: Two-point Sampling, Coupon Collector s problem

Lecture 4: Two-point Sampling, Coupon Collector s problem Randomized Algorithms Lecture 4: Two-point Sampling, Coupon Collector s problem Sotiris Nikoletseas Associate Professor CEID - ETY Course 2013-2014 Sotiris Nikoletseas, Associate Professor Randomized Algorithms

More information

Combinatorial Proof of the Hot Spot Theorem

Combinatorial Proof of the Hot Spot Theorem Combinatorial Proof of the Hot Spot Theorem Ernie Croot May 30, 2006 1 Introduction A problem which has perplexed mathematicians for a long time, is to decide whether the digits of π are random-looking,

More information

k-protected VERTICES IN BINARY SEARCH TREES

k-protected VERTICES IN BINARY SEARCH TREES k-protected VERTICES IN BINARY SEARCH TREES MIKLÓS BÓNA Abstract. We show that for every k, the probability that a randomly selected vertex of a random binary search tree on n nodes is at distance k from

More information

A Local-Global Principle for Diophantine Equations

A Local-Global Principle for Diophantine Equations A Local-Global Principle for Diophantine Equations (Extended Abstract) Richard J. Lipton and Nisheeth Vishnoi {rjl,nkv}@cc.gatech.edu Georgia Institute of Technology, Atlanta, GA 30332, USA. Abstract.

More information

Heuristics for Prime Statistics Brown Univ. Feb. 11, K. Conrad, UConn

Heuristics for Prime Statistics Brown Univ. Feb. 11, K. Conrad, UConn Heuristics for Prime Statistics Brown Univ. Feb., 2006 K. Conrad, UConn Two quotes about prime numbers Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers,

More information

Improved Bounds on the Anti-Waring Number

Improved Bounds on the Anti-Waring Number 1 3 47 6 3 11 Journal of Integer Sequences, Vol. 0 (017, Article 17.8.7 Improved Bounds on the Anti-Waring Number Paul LeVan and David Prier Department of Mathematics Gannon University Erie, PA 16541-0001

More information

ECEN 5022 Cryptography

ECEN 5022 Cryptography Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

More information

Uniform random numbers generators

Uniform random numbers generators Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly

More information

Prime coordinates on a modulo map, and sine representation. Diego Alonso Cortez Abstract

Prime coordinates on a modulo map, and sine representation. Diego Alonso Cortez Abstract Prime coordinates on a modulo map, and sine representation Diego Alonso Cortez diego_cortez@mckinsey.com Abstract We compute the primes up to 1 million by starting an arithmetic progression at every positive

More information

Introduction to Modern Cryptography. Benny Chor

Introduction to Modern Cryptography. Benny Chor Introduction to Modern Cryptography Benny Chor RSA Public Key Encryption Factoring Algorithms Lecture 7 Tel-Aviv University Revised March 1st, 2008 Reminder: The Prime Number Theorem Let π(x) denote the

More information

Chapter 9 Inferences from Two Samples

Chapter 9 Inferences from Two Samples Chapter 9 Inferences from Two Samples 9-1 Review and Preview 9-2 Two Proportions 9-3 Two Means: Independent Samples 9-4 Two Dependent Samples (Matched Pairs) 9-5 Two Variances or Standard Deviations Review

More information

Formulae for Computing Logarithmic Integral Function ( )!

Formulae for Computing Logarithmic Integral Function ( )! Formulae for Computing Logarithmic Integral Function x 2 ln t Li(x) dt Amrik Singh Nimbran 6, Polo Road, Patna, INDIA Email: simnimas@yahoo.co.in Abstract: The prime number theorem states that the number

More information

What do we actually know about prime numbers distribution?

What do we actually know about prime numbers distribution? 1 On the number of composite numbers less than a given value. Lemmas, continued. Paper III: What do we know about prime numbers distribution? Paper II presented 3 of 7 lemmas that confirm the conjecture

More information

Lecture 7: Fingerprinting. David Woodruff Carnegie Mellon University

Lecture 7: Fingerprinting. David Woodruff Carnegie Mellon University Lecture 7: Fingerprinting David Woodruff Carnegie Mellon University How to Pick a Random Prime How to pick a random prime in the range {1, 2,, M}? How to pick a random integer X? Pick a uniformly random

More information

2.1 Convergence of Sequences

2.1 Convergence of Sequences Chapter 2 Sequences 2. Convergence of Sequences A sequence is a function f : N R. We write f) = a, f2) = a 2, and in general fn) = a n. We usually identify the sequence with the range of f, which is written

More information

arxiv: v1 [math.gm] 23 Dec 2018

arxiv: v1 [math.gm] 23 Dec 2018 A Peculiarity in the Parity of Primes arxiv:1812.11841v1 [math.gm] 23 Dec 2018 Debayan Gupta MIT debayan@mit.edu January 1, 2019 Abstract Mayuri Sridhar MIT mayuri@mit.edu We create a simple test for distinguishing

More information

PRIME NUMBERS YANKI LEKILI

PRIME NUMBERS YANKI LEKILI PRIME NUMBERS YANKI LEKILI We denote by N the set of natural numbers: 1,2,..., These are constructed using Peano axioms. We will not get into the philosophical questions related to this and simply assume

More information

Some Thoughts on Benford s Law

Some Thoughts on Benford s Law Some Thoughts on Benford s Law Steven J. Miller ovember, 004 Abstract For many systems, there is a bias in the distribution of the first digits. For example, if one looks at the first digit of n in base

More information

Larger Golomb Rulers

Larger Golomb Rulers Larger Golomb Rulers Tomas Rokicki and Gil Dogon rokicki@gmail.com, gil.dogon@mobileye.com Abstract We present the construction of possibly-optimal Golomb rulers through a size of 40,000 marks, which provides

More information

Department of Statistics University of Central Florida. Technical Report TR APR2007 Revised 25NOV2007

Department of Statistics University of Central Florida. Technical Report TR APR2007 Revised 25NOV2007 Department of Statistics University of Central Florida Technical Report TR-2007-01 25APR2007 Revised 25NOV2007 Controlling the Number of False Positives Using the Benjamini- Hochberg FDR Procedure Paul

More information

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ). CMPSCI611: Verifying Polynomial Identities Lecture 13 Here is a problem that has a polynomial-time randomized solution, but so far no poly-time deterministic solution. Let F be any field and let Q(x 1,...,

More information

Lecture 6: Cryptanalysis of public-key algorithms.,

Lecture 6: Cryptanalysis of public-key algorithms., T-79.159 Cryptography and Data Security Lecture 6: Cryptanalysis of public-key algorithms. Helsinki University of Technology mjos@tcs.hut.fi 1 Outline Computational complexity Reminder about basic number

More information

A PROBLEM ON THE CONJECTURE CONCERNING THE DISTRIBUTION OF GENERALIZED FERMAT PRIME NUMBERS (A NEW METHOD FOR THE SEARCH FOR LARGE PRIMES)

A PROBLEM ON THE CONJECTURE CONCERNING THE DISTRIBUTION OF GENERALIZED FERMAT PRIME NUMBERS (A NEW METHOD FOR THE SEARCH FOR LARGE PRIMES) A PROBLEM ON THE CONJECTURE CONCERNING THE DISTRIBUTION OF GENERALIZED FERMAT PRIME NUMBERS A NEW METHOD FOR THE SEARCH FOR LARGE PRIMES) YVES GALLOT Abstract Is it possible to improve the convergence

More information

C.T.Chong National University of Singapore

C.T.Chong National University of Singapore NUMBER THEORY AND THE DESIGN OF FAST COMPUTER ALGORITHMS C.T.Chong National University of Singapore The theory of numbers has long been considered to be among the purest of pure mathematics. Gauss ( 1777-1855)

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Randomness and Computation Lecture 18 (October 25, 2007) Checking Our Work Suppose we want to check p(x) q(x) = r(x), where p, q and r are three polynomials.

More information

Champernowne s Number, Strong Normality, and the X Chromosome. by Adrian Belshaw and Peter Borwein

Champernowne s Number, Strong Normality, and the X Chromosome. by Adrian Belshaw and Peter Borwein Champernowne s Number, Strong Normality, and the X Chromosome by Adrian Belshaw and Peter Borwein ABSTRACT. Champernowne s number is the best-known example of a normal number, but its digits are far from

More information

Dixon s Factorization method

Dixon s Factorization method Dixon s Factorization method Nikithkumarreddy yellu December 2015 1 Contents 1 Introduction 3 2 History 3 3 Method 4 3.1 Factor-base.............................. 4 3.2 B-smooth...............................

More information

Mathematics of Public Key Cryptography

Mathematics of Public Key Cryptography Mathematics of Public Key Cryptography Eric Baxter April 12, 2014 Overview Brief review of public-key cryptography Mathematics behind public-key cryptography algorithms What is Public-Key Cryptography?

More information

Calculus II : Prime suspect

Calculus II : Prime suspect Calculus II : Prime suspect January 31, 2007 TEAM MEMBERS An integer p > 1 is prime if its only positive divisors are 1 and p. In his 300 BC masterpiece Elements Euclid proved that there are infinitely

More information

UNIT 5:Random number generation And Variation Generation

UNIT 5:Random number generation And Variation Generation UNIT 5:Random number generation And Variation Generation RANDOM-NUMBER GENERATION Random numbers are a necessary basic ingredient in the simulation of almost all discrete systems. Most computer languages

More information

Hash Functions. A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length.

Hash Functions. A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length. Hash Functions 1 Hash Functions A hash function h takes as input a message of arbitrary length and produces as output a message digest of fixed length. 0 1 1 0 1 0 0 1 Long Message Hash Function 1 1 1

More information

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing STAT 515 fa 2016 Lec 20-21 Statistical inference - hypothesis testing Karl B. Gregory Wednesday, Oct 12th Contents 1 Statistical inference 1 1.1 Forms of the null and alternate hypothesis for µ and p....................

More information

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010 CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010 So far our notion of realistic computation has been completely deterministic: The Turing Machine

More information

Construction of LDPC codes

Construction of LDPC codes Construction of LDPC codes Telecommunications Laboratory Alex Balatsoukas-Stimming Technical University of Crete July 1, 2009 Telecommunications Laboratory (TUC) Construction of LDPC codes July 1, 2009

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

More information

Strong Normality of Numbers

Strong Normality of Numbers Strong Normality of Numbers Adrian Belshaw Peter Borwein... the problem of knowing whether or not the digits of a number like 2 satisfy all the laws one could state for randomly chosen digits, still seems...

More information

Discrete Distributions Chapter 6

Discrete Distributions Chapter 6 Discrete Distributions Chapter 6 Negative Binomial Distribution section 6.3 Consider k r, r +,... independent Bernoulli trials with probability of success in one trial being p. Let the random variable

More information

IITM-CS6845: Theory Toolkit February 3, 2012

IITM-CS6845: Theory Toolkit February 3, 2012 IITM-CS6845: Theory Toolkit February 3, 2012 Lecture 4 : Derandomizing the logspace algorithm for s-t connectivity Lecturer: N S Narayanaswamy Scribe: Mrinal Kumar Lecture Plan:In this lecture, we will

More information

Lecture 31: Miller Rabin Test. Miller Rabin Test

Lecture 31: Miller Rabin Test. Miller Rabin Test Lecture 31: Recall In the previous lecture we considered an efficient randomized algorithm to generate prime numbers that need n-bits in their binary representation This algorithm sampled a random element

More information

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

More information

On a Balanced Property of Compositions

On a Balanced Property of Compositions On a Balanced Property of Compositions Miklós Bóna Department of Mathematics University of Florida Gainesville FL 32611-8105 USA Submitted: October 2, 2006; Accepted: January 24, 2007; Published: March

More information

Shor s Algorithm. Elisa Bäumer, Jan-Grimo Sobez, Stefan Tessarini May 15, 2015

Shor s Algorithm. Elisa Bäumer, Jan-Grimo Sobez, Stefan Tessarini May 15, 2015 Shor s Algorithm Elisa Bäumer, Jan-Grimo Sobez, Stefan Tessarini May 15, 2015 Integer factorization n = p q (where p, q are prime numbers) is a cryptographic one-way function Classical algorithm with best

More information

Review. December 4 th, Review

Review. December 4 th, Review December 4 th, 2017 Att. Final exam: Course evaluation Friday, 12/14/2018, 10:30am 12:30pm Gore Hall 115 Overview Week 2 Week 4 Week 7 Week 10 Week 12 Chapter 6: Statistics and Sampling Distributions Chapter

More information

MA131 - Analysis 1. Workbook 6 Completeness II

MA131 - Analysis 1. Workbook 6 Completeness II MA3 - Analysis Workbook 6 Completeness II Autumn 2004 Contents 3.7 An Interesting Sequence....................... 3.8 Consequences of Completeness - General Bounded Sequences.. 3.9 Cauchy Sequences..........................

More information

Counting Prime Numbers with Short Binary Signed Representation

Counting Prime Numbers with Short Binary Signed Representation Counting Prime Numbers with Short Binary Signed Representation José de Jesús Angel Angel and Guillermo Morales-Luna Computer Science Section, CINVESTAV-IPN, Mexico jjangel@computacion.cs.cinvestav.mx,

More information

1: Please compute the Jacobi symbol ( 99

1: Please compute the Jacobi symbol ( 99 SCORE/xx: Math 470 Communications Cryptography NAME: PRACTICE FINAL Please show your work write only in pen. Notes are forbidden. Calculators, all other electronic devices, are forbidden. Brains are encouraged,

More information

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch Today Probabilistic Turing Machines and Probabilistic Time Complexity Classes Now add a new capability to standard TMs: random

More information

Statistical Methods in Particle Physics

Statistical Methods in Particle Physics Statistical Methods in Particle Physics Lecture 10 December 17, 01 Silvia Masciocchi, GSI Darmstadt Winter Semester 01 / 13 Method of least squares The method of least squares is a standard approach to

More information

Solutions to 2015 Entrance Examination for BSc Programmes at CMI. Part A Solutions

Solutions to 2015 Entrance Examination for BSc Programmes at CMI. Part A Solutions Solutions to 2015 Entrance Examination for BSc Programmes at CMI Part A Solutions 1. Ten people sitting around a circular table decide to donate some money for charity. You are told that the amount donated

More information

CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography

CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography CSCI3390-Lecture 16: Probabilistic Algorithms: Number Theory and Cryptography 1 Two Problems Problem 1. Generate Primes Find a prime number p of between 200 and 1000 decimal digits that has never been

More information

Lucas Lehmer primality test - Wikipedia, the free encyclopedia

Lucas Lehmer primality test - Wikipedia, the free encyclopedia Lucas Lehmer primality test From Wikipedia, the free encyclopedia In mathematics, the Lucas Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Edouard Lucas

More information

You separate binary numbers into columns in a similar fashion. 2 5 = 32

You separate binary numbers into columns in a similar fashion. 2 5 = 32 RSA Encryption 2 At the end of Part I of this article, we stated that RSA encryption works because it s impractical to factor n, which determines P 1 and P 2, which determines our private key, d, which

More information

Uniform Random Number Generators

Uniform Random Number Generators JHU 553.633/433: Monte Carlo Methods J. C. Spall 25 September 2017 CHAPTER 2 RANDOM NUMBER GENERATION Motivation and criteria for generators Linear generators (e.g., linear congruential generators) Multiple

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 21 November 15, 2017 CPSC 467, Lecture 21 1/31 Secure Random Sequence Generators Pseudorandom sequence generators Looking random

More information

The New Largest Known Prime is 2 p 1 With p = Who Cares? Sam Wagstaff Computer Sciences and Mathematics.

The New Largest Known Prime is 2 p 1 With p = Who Cares? Sam Wagstaff Computer Sciences and Mathematics. The New Largest Known Prime is 2 p 1 With p = 74207281. Who Cares? Sam Wagstaff Computer Sciences and Mathematics November 10, 2016 Earlier in 2016, Cooper, Woltman, Kurowski, Blosser and GIMPS found this

More information

Some Facts from Number Theory

Some Facts from Number Theory Computer Science 52 Some Facts from Number Theory Fall Semester, 2014 These notes are adapted from a document that was prepared for a different course several years ago. They may be helpful as a summary

More information

b = 10 a, is the logarithm of b to the base 10. Changing the base to e we obtain natural logarithms, so a = ln b means that b = e a.

b = 10 a, is the logarithm of b to the base 10. Changing the base to e we obtain natural logarithms, so a = ln b means that b = e a. INTRODUCTION TO CRYPTOGRAPHY 5. Discrete Logarithms Recall the classical logarithm for real numbers: If we write b = 10 a, then a = log 10 b is the logarithm of b to the base 10. Changing the base to e

More information

FERMAT S TEST KEITH CONRAD

FERMAT S TEST KEITH CONRAD FERMAT S TEST KEITH CONRAD 1. Introduction Fermat s little theorem says for prime p that a p 1 1 mod p for all a 0 mod p. A naive extension of this to a composite modulus n 2 would be: for all a 0 mod

More information

MATH 25 CLASS 8 NOTES, OCT

MATH 25 CLASS 8 NOTES, OCT MATH 25 CLASS 8 NOTES, OCT 7 20 Contents. Prime number races 2. Special kinds of prime numbers: Fermat and Mersenne numbers 2 3. Fermat numbers 3. Prime number races We proved that there were infinitely

More information

The Composite Two-Step

The Composite Two-Step 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 20 (2017), Article 17.9.1 The Composite Two-Step Eric Kaper Department of Mathematics University of Kentucky Lexington, KY 40506 USA eric.kaper@uky.edu

More information