Finding Large Primes Gavriel Yarmish Brooklyn College Joshua Yarmish Pace University Jason Yarmish NYU Tandon School of Engineering

Total Page:16

File Type:pdf, Size:1020Kb

Finding Large Primes Gavriel Yarmish Brooklyn College Joshua Yarmish Pace University Jason Yarmish NYU Tandon School of Engineering Page 1 of 14 Finding Large Primes Gavriel Yarmish Brooklyn College Joshua Yarmish Pace University Jason Yarmish NYU Tandon School of Engineering Keywords: Prime Number Theorem, Digital Root, Fermat primality test, Euler Test, Miller-Rabin test, GNU GMP Library Abstract: In this paper we present and expand upon procedures for obtaining large d digit prime number to an arbitrary probability. We use a layered approach. The first step is to limit the pool of random number to exclude numbers that are obviously composite. We first remove any number ending in 1,3,7 or 9. We then exclude numbers whose digital root is not 3, 6, or 9. This sharply reduces the probability of the random number being composite. We then use the Prime Number Theorem to find the probability that the selected number n is prime and use primality tests to increase the probability to an arbitrarily high degree that n is prime. We apply primality tests including Euler’s test based on Fermat Little theorem and the Miller-Rabin test. We computed these conditional probabilities and implemented it using the GNU GMP library. 1. Introduction In 1978 Rivest, Shamir and Adleman (RSA) [1] created the RSA cryptosystem. This system plays a significant role in securing our information on the internet. The security of this system is based on the difficulty in factoring large numbers, which are created by multiplying two very large prime numbers. As we will see, although factoring large integers is a very difficult problem, finding large primes is relatively easy. The Prime Number Theorem tells us that if we 1 choose a number x at random the chance that x is prime is about ~ i.e. If we pick 푙표푔푒푥 푙표푔푒푥 numbers at random we expect about 1 to be prime. But how do we know when this x is prime? We use a probabilistic approach. We choose a large random number of a particular digit size but exclude numerous classes of numbers that we know are composite. We use the prime number theorem to calculate the probability that a random d-digit size number is prime. We then show how this probability increases when we exclude classes of composites. The first step is to limit the pool of random number to exclude numbers that are obviously composite; we remove any number ending in 1,3,7 or 9. We then exclude numbers whose digital root is not 3, 6, or 9. These steps sharply reduce the probability of the random number being composite. We then apply primality tests to increase the probability to an arbitrarily high degree that n is Page 2 of 14 prime. If the test indicates the random number is likely prime we calculate the increased probability. In section 2 we review the Prime Number Theorem and calculate the base probability. We also adjust this probability calculation assuming we exclude numbers ending in 2, 4, 5, 6 or 8. We again adjust the probabilities by excluding numbers with specific digital roots. In section 3 we review the Fermat Primality Test, Euler Test and Miller-Rabin Test. We also calculate exactly how the probability is affected by application of these tests. Finally, in Section 4 we present our application of these tests using C++ and the GNU GMP library. 2. Calculating and increasing probabilities 2.1 Probability a d-digit prime: the Prime Number theorem The Prime Number Theorem [2](PNT) gives an asymptotic approximation for 휋(x) = number of prime numbers ≤ x i. e. ln 푥 푥 lim 휋(푥) = 1 표푟 lim 휋(푥) = 푥→∞ 푥 푥→∞ ln 푥 Thus the odds that a randomly selected number not exceeding x is a prime can be approximated by 휋(푥) (푥/ ln 푥) 1 = = 푥 푥 ln 푥 So the number of 75 digit primes is 휋(1075) − 휋(1074) = 푛푢푚푏푒푟 표푓 푝푟푖푚푒푠 ≤ 1075 − 푛푢푚푏푒푟 표푓 푝푟푖푚푒푠 ≤ 1074 = 푛푢푚푏푒푟 표푓 푝푟푖푚푒푠 푖푛 푖푛푡푒푟푣푎푙 (1099, 10100) Let N(x)=number of x digit primes. 1075 1074 1074 665 N(75) can be approximated by − = ( ) = .052037087 ∗ 1074 푙푛 1075 푙푛 1074 푙푛10 5550 10푘−1 9푘−10 In general 푁(푘)~ ( ) 푙푛10 푘(푘−1) There are more precise estimates of 휋(x), one of which is [3] 푥 푥 < 휋(푥) < 푓표푟 푥 ≥ 60184 ln 푥 − 1 푙푛 푥 − 1.1 With this formula we get Page 3 of 14 . 05233970251 ∗ 1074 < 휋(75) < .05237015782 ∗ 1074 To find the probability that a generated k digit number is actually a prime we divide N(k) by the total number of k digit numbers: 9 ∗ 10푘−1 푡ℎ푢푠 10푘−1 9푘 − 10 ( ) 푁(푘) 푙푛10 푘(푘 − 1) 푃(퐴) = = = 9푘 − 10 9 ∗ 10푘−1 9 ∗ 10푘−1 9푘(푘 − 1) ln 10 Where A is the event that the k digit number selected is a prime. And for k=75 we get P(A)=.005781899 2.2 Excluding obvious composites: Increasing the prime probability If we use k digits which end in 1, 3, 7 or 9, we can increase the probability that the k digit number is prime. (any multi-digit number ending with 2, 4, 5, 6 or 8 cannot be prime). The number of k digit numbers having a 1, 3, 7 or 9 in the last digits is 9 ∗ 10푘−2 ∗ 4 = 36 ∗ 10푘−2 so the probability now becomes 푁(푘) 10 푃(퐴) = = ( 9푘 − 10 ) 36 ∗ 10푘−2 4 9푘(푘 − 1) ln 10 10 So we increase the probability by a factor = 2.5. We now have P(A)=.014454748 4 2.3 Digital Roots: Further increasing the prime probability We can further increase the probability of A by avoiding all k digit numbers where digital root are 3, 6 or 9. Recall [4] that the digital root of a nonnegative integer n (dr(n)) is a single digit obtained by continually summing the digits until a single digit is obtained. dr(n) can be defined using the 푛−1 floor function ⌊푥⌋ 푎푠 푑푟(푛) = 푛 − 9 ⌊ ⌋ or in terms of congruences 9 0 푖푓 푛 = 0 푑푟(푛) = { 9 푖푓 푛 ≠ 0, 푛 ≡ 0 푚표푑 푛 (푛 푖푠 푎 푚푢푙푡푖푝푙푒 표푓 9) 푛 푚표푑 9 푖푓 푛 ≢ 0 푚표푑 9 Thus if Page 4 of 14 푑푟(푛) = 3 ⟹ 푛 = 9푘 + 3 푓표푟 푘 = 0,1,2, … 푑푟(푛) = 6 ⟹ 푛 = 9푘 + 6 푓표푟 푘 = 0,1,2, … 푑푟(푛) = 9 ⟹ 푛 = 9푘 푓표푟 푘 = 1,2, … So that if dr(n)= 3, 6 or 9, n is divisible by 3 and is composite. If we eliminate all n whose digital root is 3, 6 or 9 we decrease the k digit pool that we can choose n from by 1/3 thus increasing the P(A) by a factor of 3, thus P(A)=.043364243 i.e. If we restrict our k digit number choice to only those that end in 1,3,7 or 9 and whose digital 1 root is not 3,6, or 9 we can expect about 1 prime in about 23 attempts or . But how do we 23 know whether the selected number n is actually prime? We discuss some primality tests [5] [6] [7] which can determine that a given n is definitely not a prime but can tell us that n is a prime with a very high probability i.e. these tests allow for false positives (n is prime when it is actually not) and no false negatives (n is not prime when it actually is). 3. Primality tests 3.1 Fermat primality test Fermat’s Little Theorem (FLT): If p is prime and a is an integer not divisible by p then 푎푝−1 ≡ 1 푚표푑 푝 (and for all a 푎푝 ≡ 푎 푚표푑 푃). By the contrapositive if 푎푛−1 ≠ 1 푚표푑 푛 for some a (푎 ≠ 0 푚표푑 푛) then n is composite. Using the contrapositive of FLT we can prove that a number is composite without actually factoring it. However if n passes the test i.e. 푎푛−1 ≡ 1 푚표푑 푛 it is not a proof that n is prime because the converse of FLT is not necessarily true. Example 1: 푛 = 561 푎 = 2 푎푛푑 푦푒푡 2560 ≡ 1 푚표푑 561, 퐵푢푡 561 = 3 ∗ 11 ∗ 7 푖푠 푐표푚푝표푠푖푡푒 Example 2: 푛 = 341 푎 = 2 푎푛푑 푦푒푡 2340 ≡ 1 푚표푑 561, 퐵푢푡 341 = 11 ∗ 38 푖푠 푐표푚푝표푠푖푡푒 Any composite number m that passes the test is called a “Fermat Pseudoprime to the base a.” [8] Thus 561 and 341 are both Fermat Pseudoprimes to the base 2 . In fact there are many numbers n that are composite such that 푎푛−1 ≡ 1 푚표푑 푛 for every a such that gcd(a,n)=1 (i.e. a and n are relatively prime). Such numbers are called Carmichael numbers. FERMAT PRIMALITY TEST: To test if n is prime or composite Page 5 of 14 1) Choose a number a so that a is not divisible by n 2) Compute 푎푛−1푚표푑 푛 3) If 푎푛−1 ≡ 1 푚표푑 푛 claim “n is a probable prime” Repeat steps 1, 2 and 3 with a different a. The probability of n being a prime number increases with each iteration 4) If 푎푛−1 ≢ 1 푚표푑 푛 output “n is definitely composite.” As we noted above Fermat’s test fails for all a when n is a Carmichael number. So what are the chances that a Carmichael number will be randomly chosen to be tested – Not likely 1) There are only 7 Carmichael numbers within the first 104 numbers. 2) There are only 585,355 Carmichael numbers within the first 1017 numbers.
Recommended publications
  • Lecture 9: Arithmetics II 1 Greatest Common Divisor
    DD2458, Problem Solving and Programming Under Pressure Lecture 9: Arithmetics II Date: 2008-11-10 Scribe(s): Marcus Forsell Stahre and David Schlyter Lecturer: Douglas Wikström This lecture is a continuation of the previous one, and covers modular arithmetic and topics from a branch of number theory known as elementary number theory. Also, some abstract algebra will be discussed. 1 Greatest Common Divisor Definition 1.1 If an integer d divides another integer n with no remainder, d is said to be a divisor of n. That is, there exists an integer a such that a · d = n. The notation for this is d | n. Definition 1.2 A common divisor of two non-zero integers m and n is a positive integer d, such that d | m and d | n. Definition 1.3 The Greatest Common Divisor (GCD) of two positive integers m and n is a common divisor d such that every other common divisor d0 | d. The notation for this is GCD(m, n) = d. That is, the GCD of two numbers is the greatest number that is a divisor of both of them. To get an intuition of what GCD is, let’s have a look at this example. Example Calculate GCD(9, 6). Say we have 9 black and 6 white blocks. We want to put the blocks in boxes, but every box has to be the same size, and can only hold blocks of the same color. Also, all the boxes must be full and as large as possible . Let’s for example say we choose a box of size 2: As we can see, the last box of black bricks is not full.
    [Show full text]
  • An Analysis of Primality Testing and Its Use in Cryptographic Applications
    An Analysis of Primality Testing and Its Use in Cryptographic Applications Jake Massimo Thesis submitted to the University of London for the degree of Doctor of Philosophy Information Security Group Department of Information Security Royal Holloway, University of London 2020 Declaration These doctoral studies were conducted under the supervision of Prof. Kenneth G. Paterson. The work presented in this thesis is the result of original research carried out by myself, in collaboration with others, whilst enrolled in the Department of Mathe- matics as a candidate for the degree of Doctor of Philosophy. This work has not been submitted for any other degree or award in any other university or educational establishment. Jake Massimo April, 2020 2 Abstract Due to their fundamental utility within cryptography, prime numbers must be easy to both recognise and generate. For this, we depend upon primality testing. Both used as a tool to validate prime parameters, or as part of the algorithm used to generate random prime numbers, primality tests are found near universally within a cryptographer's tool-kit. In this thesis, we study in depth primality tests and their use in cryptographic applications. We first provide a systematic analysis of the implementation landscape of primality testing within cryptographic libraries and mathematical software. We then demon- strate how these tests perform under adversarial conditions, where the numbers being tested are not generated randomly, but instead by a possibly malicious party. We show that many of the libraries studied provide primality tests that are not pre- pared for testing on adversarial input, and therefore can declare composite numbers as being prime with a high probability.
    [Show full text]
  • A Clasification of Known Root Prime-Generating
    Special properties of the first absolute Fermat pseudoprime, the number 561 Marius Coman Bucuresti, Romania email: [email protected] Abstract. Though is the first Carmichael number, the number 561 doesn’t have the same fame as the third absolute Fermat pseudoprime, the Hardy-Ramanujan number, 1729. I try here to repair this injustice showing few special properties of the number 561. I will just list (not in the order that I value them, because there is not such an order, I value them all equally as a result of my more or less inspired work, though they may or not “open a path”) the interesting properties that I found regarding the number 561, in relation with other Carmichael numbers, other Fermat pseudoprimes to base 2, with primes or other integers. 1. The number 2*(3 + 1)*(11 + 1)*(17 + 1) + 1, where 3, 11 and 17 are the prime factors of the number 561, is equal to 1729. On the other side, the number 2*lcm((7 + 1),(13 + 1),(19 + 1)) + 1, where 7, 13 and 19 are the prime factors of the number 1729, is equal to 561. We have so a function on the prime factors of 561 from which we obtain 1729 and a function on the prime factors of 1729 from which we obtain 561. Note: The formula N = 2*(d1 + 1)*...*(dn + 1) + 1, where d1, d2, ...,dn are the prime divisors of a Carmichael number, leads to interesting results (see the sequence A216646 in OEIS); the formula M = 2*lcm((d1 + 1),...,(dn + 1)) + 1 also leads to interesting results (see the sequence A216404 in OEIS).
    [Show full text]
  • Arxiv:1412.5226V1 [Math.NT] 16 Dec 2014 Hoe 11
    q-PSEUDOPRIMALITY: A NATURAL GENERALIZATION OF STRONG PSEUDOPRIMALITY JOHN H. CASTILLO, GILBERTO GARC´IA-PULGAR´IN, AND JUAN MIGUEL VELASQUEZ-SOTO´ Abstract. In this work we present a natural generalization of strong pseudoprime to base b, which we have called q-pseudoprime to base b. It allows us to present another way to define a Midy’s number to base b (overpseudoprime to base b). Besides, we count the bases b such that N is a q-probable prime base b and those ones such that N is a Midy’s number to base b. Furthemore, we prove that there is not a concept analogous to Carmichael numbers to q-probable prime to base b as with the concept of strong pseudoprimes to base b. 1. Introduction Recently, Grau et al. [7] gave a generalization of Pocklignton’s Theorem (also known as Proth’s Theorem) and Miller-Rabin primality test, it takes as reference some works of Berrizbeitia, [1, 2], where it is presented an extension to the concept of strong pseudoprime, called ω-primes. As Grau et al. said it is right, but its application is not too good because it is needed m-th primitive roots of unity, see [7, 12]. In [7], it is defined when an integer N is a p-strong probable prime base a, for p a prime divisor of N −1 and gcd(a, N) = 1. In a reading of that paper, we discovered that if a number N is a p-strong probable prime to base 2 for each p prime divisor of N − 1, it is actually a Midy’s number or a overpseu- doprime number to base 2.
    [Show full text]
  • Sequences of Primes Obtained by the Method of Concatenation
    SEQUENCES OF PRIMES OBTAINED BY THE METHOD OF CONCATENATION (COLLECTED PAPERS) Copyright 2016 by Marius Coman Education Publishing 1313 Chesapeake Avenue Columbus, Ohio 43212 USA Tel. (614) 485-0721 Peer-Reviewers: Dr. A. A. Salama, Faculty of Science, Port Said University, Egypt. Said Broumi, Univ. of Hassan II Mohammedia, Casablanca, Morocco. Pabitra Kumar Maji, Math Department, K. N. University, WB, India. S. A. Albolwi, King Abdulaziz Univ., Jeddah, Saudi Arabia. Mohamed Eisa, Dept. of Computer Science, Port Said Univ., Egypt. EAN: 9781599734668 ISBN: 978-1-59973-466-8 1 INTRODUCTION The definition of “concatenation” in mathematics is, according to Wikipedia, “the joining of two numbers by their numerals. That is, the concatenation of 69 and 420 is 69420”. Though the method of concatenation is widely considered as a part of so called “recreational mathematics”, in fact this method can often lead to very “serious” results, and even more than that, to really amazing results. This is the purpose of this book: to show that this method, unfairly neglected, can be a powerful tool in number theory. In particular, as revealed by the title, I used the method of concatenation in this book to obtain possible infinite sequences of primes. Part One of this book, “Primes in Smarandache concatenated sequences and Smarandache-Coman sequences”, contains 12 papers on various sequences of primes that are distinguished among the terms of the well known Smarandache concatenated sequences (as, for instance, the prime terms in Smarandache concatenated odd
    [Show full text]
  • Conjecture of Twin Primes (Still Unsolved Problem in Number Theory) an Expository Essay
    Surveys in Mathematics and its Applications ISSN 1842-6298 (electronic), 1843-7265 (print) Volume 12 (2017), 229 { 252 CONJECTURE OF TWIN PRIMES (STILL UNSOLVED PROBLEM IN NUMBER THEORY) AN EXPOSITORY ESSAY Hayat Rezgui Abstract. The purpose of this paper is to gather as much results of advances, recent and previous works as possible concerning the oldest outstanding still unsolved problem in Number Theory (and the most elusive open problem in prime numbers) called "Twin primes conjecture" (8th problem of David Hilbert, stated in 1900) which has eluded many gifted mathematicians. This conjecture has been circulating for decades, even with the progress of contemporary technology that puts the whole world within our reach. So, simple to state, yet so hard to prove. Basic Concepts, many and varied topics regarding the Twin prime conjecture will be cover. Petronas towers (Twin towers) Kuala Lumpur, Malaysia 2010 Mathematics Subject Classification: 11A41; 97Fxx; 11Yxx. Keywords: Twin primes; Brun's constant; Zhang's discovery; Polymath project. ****************************************************************************** http://www.utgjiu.ro/math/sma 230 H. Rezgui Contents 1 Introduction 230 2 History and some interesting deep results 231 2.1 Yitang Zhang's discovery (April 17, 2013)............... 236 2.2 "Polymath project"........................... 236 2.2.1 Computational successes (June 4, July 27, 2013)....... 237 2.2.2 Spectacular progress (November 19, 2013)........... 237 3 Some of largest (titanic & gigantic) known twin primes 238 4 Properties 240 5 First twin primes less than 3002 241 6 Rarefaction of twin prime numbers 244 7 Conclusion 246 1 Introduction The prime numbers's study is the foundation and basic part of the oldest branches of mathematics so called "Arithmetic" which supposes the establishment of theorems.
    [Show full text]
  • Enclave Security and Address-Based Side Channels
    Graz University of Technology Faculty of Computer Science Institute of Applied Information Processing and Communications IAIK Enclave Security and Address-based Side Channels Assessors: A PhD Thesis Presented to the Prof. Stefan Mangard Faculty of Computer Science in Prof. Thomas Eisenbarth Fulfillment of the Requirements for the PhD Degree by June 2020 Samuel Weiser Samuel Weiser Enclave Security and Address-based Side Channels DOCTORAL THESIS to achieve the university degree of Doctor of Technical Sciences; Dr. techn. submitted to Graz University of Technology Assessors Prof. Stefan Mangard Institute of Applied Information Processing and Communications Graz University of Technology Prof. Thomas Eisenbarth Institute for IT Security Universit¨atzu L¨ubeck Graz, June 2020 SSS AFFIDAVIT I declare that I have authored this thesis independently, that I have not used other than the declared sources/resources, and that I have explicitly indicated all material which has been quoted either literally or by content from the sources used. The text document uploaded to TUGRAZonline is identical to the present doctoral thesis. Date, Signature SSS Prologue Everyone has the right to life, liberty and security of person. Universal Declaration of Human Rights, Article 3 Our life turned digital, and so did we. Not long ago, the globalized commu- nication that we enjoy today on an everyday basis was the privilege of a few. Nowadays, artificial intelligence in the cloud, smartified handhelds, low-power Internet-of-Things gadgets, and self-maneuvering objects in the physical world are promising us unthinkable freedom in shaping our personal lives as well as society as a whole. Sadly, our collective excitement about the \new", the \better", the \more", the \instant", has overruled our sense of security and privacy.
    [Show full text]
  • The RSA Algorithm Clifton Paul Robinson
    Bridgewater State University Virtual Commons - Bridgewater State University Honors Program Theses and Projects Undergraduate Honors Program 5-1-2018 The Key to Cryptography: The RSA Algorithm Clifton Paul Robinson Follow this and additional works at: http://vc.bridgew.edu/honors_proj Part of the Computer Sciences Commons Recommended Citation Robinson, Clifton Paul. (2018). The Key ot Cryptography: The RSA Algorithm. In BSU Honors Program Theses and Projects. Item 268. Available at: http://vc.bridgew.edu/honors_proj/268 Copyright © 2018 Clifton Paul Robinson This item is available as part of Virtual Commons, the open-access institutional repository of Bridgewater State University, Bridgewater, Massachusetts. The Key to Cryptography: The RSA Algorithm Clifton Paul Robinson Submitted in Partial Completion of the Requirements for Commonwealth Interdisciplinary Honors in Computer Science and Mathematics Bridgewater State University May 1, 2018 Dr. Jacqueline Anderson Thesis Co-Advisor Dr. Michael Black, Thesis Co-Advisor Dr. Ward Heilman, Committee Member Dr. Haleh Khojasteh, Committee Member BRIDGEWATER STATE UNIVERSITY UNDERGRADUATE THESIS The Key To Cryptography: The RSA Algorithm Author: Advisors: Clifton Paul ROBINSON Dr. Jackie ANDERSON Dr. Michael BLACK Submitted in Partial Completion of the Requirements for Commonwealth Honors in Computer Science and Mathematics Dr. Ward Heilman, Reading Committee Dr. Haleh Khojasteh, Reading Committee ii Dedicated to Mom, Dad, James, and Mimi iii Contents Abstractv 1 Introduction1 1.1 The Project Overview........................1 2 Theorems and Definitions2 2.1 Definitions..............................2 2.2 Theorems...............................5 3 The History of Cryptography6 3.1 Origins................................6 3.2 A Transition.............................6 3.3 Cryptography at War........................7 3.4 The Creation and Uses of RSA...................7 4 The Mathematics9 4.1 What is a Prime Number?.....................9 4.2 Factoring Numbers........................
    [Show full text]
  • Generating Provable Primes Efficiently on Embedded Devices
    Generating Provable Primes Efficiently on Embedded Devices Christophe Clavier1, Benoit Feix1;2, Lo¨ıc Thierry2;?, and Pascal Paillier3 1 XLIM, University of Limoges, [email protected] 2 INSIDE Secure [email protected],[email protected] 3 CryptoExperts [email protected] Abstract. This paper introduces new techniques to generate provable prime numbers efficiently on embedded devices such as smartcards, based on variants of Pocklington's and the Brillhart-Lehmer-Selfridge-Tuckerman- Wagstaff theorems. We introduce two new generators that, combined with cryptoprocessor-specific optimizations, open the way to efficient and tamper-resistant on-board generation of provable primes. We also report practical results from our implementations. Both our theoretical and ex- perimental results show that constructive methods can generate provable primes essentially as efficiently as state-of-the-art generators for probable primes based on Fermat and Miller-Rabin pseudo-tests. We evaluate the output entropy of our two generators and provide techniques to ensure a high level of resistance against physical attacks. This paper intends to provide practitioners with the first practical solutions for fast and secure generation of provable primes in embedded security devices. Keywords: Prime Numbers, Pocklington's theorem, Public Key Cryp- tography, Embedded Software, Modular Exponentiation, Cryptographic Accelerators, Primality Proving. 1 Introduction Large prime numbers are a basic ingredient of keys in several standardized primi- tives such as RSA [21], Digital Signature Algorithm (DSA) [12] or Diffie-Hellman key exchange (DH) [10]. This paper precisely addresses the generation of prov- able prime numbers in embedded, crypto-enabled devices. When it comes to RSA key generation, two approaches coexist: key pairs may be generated off-board (i.e.
    [Show full text]
  • The Probability That a Random Probable Prime Is Composite*
    MATHEMATICS OF COMPUTATION VOLUME 53, NUMBER 188 OCTOBER 1989, PAGES 721-741 The Probability that a Random Probable Prime is Composite* By Su Hee Kim and Carl Pomerance** Abstract. Consider a procedure which (1) chooses a random odd number n < x, (2) chooses a random number 6, 1 < b < n — 1, and (3) accepts n if bn~l = 1 (mod n). Let P(x) denote the probability that this procedure accepts a composite number. It is known from work of Erdös and the second author that P(x) —>0 as x —►oo. In this paper, explicit inequalities are established for P(x)\ For example, it is shown that P(10100) < 2.77 x 10~8 and that P(x) < (logx)"197 for x > 101()5. Introduction. Suppose one wants to produce a random prime p < x, drawn with the uniform distribution. One possible solution is to choose a random number n, 1 < n < x, and apply a test to n that can tell if it is prime or composite. This procedure is repeated independently until a prime is found. By the prime number theorem, the expected number of trials until a prime is drawn is about log x. If one wishes to choose an odd prime, the trials n may be restricted to odd numbers. The expected number of trials is then about ¿ log x. There are many algorithms which can be used to decide if n is prime or com- posite. However, using the Fermât congruence is a very cheap test that is usually recommended as a preliminary procedure before a more time-consuming test is at- tempted.
    [Show full text]
  • Number Theory Boring? Nein!
    Running head: PATTERNS IN NINE 1 Number Theory Boring? Nein! Discerning Patterns in Multiples of Nine Gina Higgins Mathematical Evolutions Jenny McCarthy, Jonathan Phillips Summer Ventures in Science and Mathematics The University of North Carolina at Charlotte PATTERNS IN NINE 2 Abstract This is the process Gina Higgins went through in order to prove that the digital sum of a whole, natural number multiplied by nine would always equal nine. This paper gives a brief history on the number nine and gives a color coded, three-hundred row chart of multiplies of nine as an example and reference. Basic number theory principles were applied with Mathematical Implementation to successfully create a method that confirmed the hypothesis that the digital root of every product of nine equals nine. From this method could evolve into possible future attempts to prove why the digital root anomaly occurred. PATTERNS IN NINE 3 The number nine is the largest digit in a based ten number (decimal) system. In many ancient cultures such as China, India and Egypt, the number nine was a symbol of strength representing royalty, religion or powerful enemies (Mackenzie, 2005). The symbol for the number nine used most commonly today developed from the Hindu-Arabic System written in the third century. Those symbols developed from the Brahmi numerals found as far back as 300 BC. (Ifrah, 1981) Figure 1 Number theory is a branch of mathematics dealing specifically with patterns and sequences found in whole numbers. It was long considered the purest form of mathematics because there was not a practical application until the 20th century when the computer was invented.
    [Show full text]
  • INDEX to ANSWERS Issue Page Number Symmetryplus 60 2
    INDEX TO ANSWERS Issue Page number SYMmetryplus 60 2 SYMmetryplus 61 4 SYMmetryplus 62 5 SYMmetryplus 63 8 SYMmetryplus 64 9 SYMmetryplus 65 10 SYMmetryplus 66 13 SYMmetryplus 67 15 SYMmetryplus 68 17 SYMmetryplus 69 21 SYMmetryplus 70 25 SYMmetryplus 71 29 SYMmetryplus 72 33 SYMmetryplus 73 37 SYMmetryplus 74 44 1 ANSWERS FROM ISSUE 60 SOME TRIANGLE NUMBERS – 2 Many thanks to Andrew Palfreyman who found five, not four solutions! 7 7 7 7 7 1 0 5 3 0 0 4 0 6 9 0 3 9 4 6 3 3 3 3 1 Grid A 6 6 1 3 2 6 2 0 1 6 0 0 Grid B CROSSNUMBER Many thanks again to Andrew Palfreyman who pointed out that 1 Down and 8 Across do not give unique answers so there are four possible solutions. 1 2 1 2 1 2 1 2 1 4 4 8 1 4 4 8 1 4 4 8 1 4 4 8 3 3 3 3 3 9 1 9 8 9 1 9 3 9 1 9 8 9 1 9 4 5 4 5 4 5 4 5 2 3 1 0 2 3 1 0 2 3 1 0 2 3 1 0 6 7 6 7 6 7 6 7 1 0 9 8 1 0 9 8 1 0 9 8 1 0 9 8 8 9 8 9 8 9 8 9 3 6 1 0 3 6 1 0 9 6 1 0 9 6 1 0 10 10 10 10 5 3 4 3 5 3 4 3 5 3 4 3 5 3 4 3 TREASURE HUNTS 12, 13 12 This is a rostral column in St Petersburg, Russia.
    [Show full text]