Prime number: Wikis

Did you know ...

More interesting facts on Prime number

Encyclopedia

 Divisibility-based sets of integers Forms of factorization: Prime number Composite number Powerful number Square-free number Achilles number Constrained divisor sums: Perfect number Almost perfect number Quasiperfect number Multiply perfect number Hyperperfect number Superperfect number Unitary perfect number Semiperfect number Primitive semiperfect number Practical number Numbers with many divisors: Abundant number Highly abundant number Superabundant number Colossally abundant number Highly composite number Superior highly composite number Other: Untouchable number Deficient number Weird number Amicable number Friendly number Sociable number Solitary number Sublime number Harmonic divisor number Frugal number Equidigital number Extravagant number See also: Divisor function Divisor Prime factor Factorization This box: view • talk • edit
.In mathematics, a prime number (or a prime) is a natural number that has exactly two distinct natural number divisors: 1 and itself.^ Prime numbers are numbers that only have two factors: 1 and itself.
• Tag: Prime - Explore content tagged Prime on eHow.com 28 January 2010 1:41 UTC www.ehow.com [Source type: General]

^ N is a NEW prime number itself OR b.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ Prime numbers used to be a mathematical curiosity.

The first twenty-five prime numbers are:
.2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.^ N=2x3x5x7x11x13x17 + 1 This number is not a multiple of 2, 3, 5, 7, 11, 13 or 17 because performing division you would always have a remainder of one.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ First ten: 1 , 7 , 10 , 13 , 19 , 23 , 28 , 31 , 32 , 44 .
• Number Gossip: List of Properties 28 January 2010 1:41 UTC www.numbergossip.com [Source type: Reference]

^ The result is 31, 7, 19, 13, 21 -- or "VENIO", our original message.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]


.An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC, though the density of prime numbers within natural numbers is 0. The number 1 is by definition not a prime number.^ So, for example, 1 in 6 numbers around 1,000 are prime.
• The prime number lottery 28 January 2010 1:41 UTC plus.maths.org [Source type: FILTERED WITH BAYES]

^ For each prime number p > 3, there exists a natural number n such that p = 6 n ± 1.

^ Euclid's second theorem demonstrated that there are an infinite number of primes.
• Prime Number -- from Wolfram MathWorld 18 September 2009 15:41 UTC mathworld.wolfram.com [Source type: Academic]

.The fundamental theorem of arithmetic establishes the central role of primes in number theory: any nonzero natural number n can be factored into primes, written as a product of primes or powers of different primes (including the empty product of factors for 1).^ The reason for not allowing 1 as prime is to keep the fundamental theorem of arithmetic .
• prime number@Everything2.com 28 January 2010 1:41 UTC www.everything2.com [Source type: FILTERED WITH BAYES]

^ Prime numbers - A complete course in arithmetic .
• Prime numbers - A complete course in arithmetic 28 January 2010 1:41 UTC www.themathpage.com [Source type: FILTERED WITH BAYES]

^ Representing natural numbers as products of primes 2 How many prime numbers are there?

Moreover, this factorization is unique except for a possible reordering of the factors.
.The property of being prime is called primality.^ The property of being a prime is called primality .

^ The property of being a prime is called primality , and the word prime is also used as an adjective.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Verifying the primality of a given number n can be done by trial division, that is to say dividing n by all integer numbers m smaller than or equal to $\sqrt{n}$, thereby checking whether n is a multiple of m, and therefore not prime but a composite.^ A number is therefore defined by its prime factorization.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Proving a number is prime is not done (for large numbers) by trial division.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Our new number q equals the product of all primes in the set {2 ...
• Prime Numbers 18 September 2009 15:41 UTC www.arachnoid.com [Source type: FILTERED WITH BAYES]

.For big primes, increasingly sophisticated algorithms which are faster than this technique have been devised.^ Does what you do allow calculating a big prime faster than existing algorithms?
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ In 200 BC, Eratosthanes devised an algorithm for calculating primes called the Sieve of Eratosthanes .
• prime number@Everything2.com 28 January 2010 1:41 UTC www.everything2.com [Source type: FILTERED WITH BAYES]

^ Extremely large prime numbers (that is, greater than 10 100 ) are used in several public key cryptography algorithms.

.There is no known formula that yields all of the prime numbers and no composites.^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Prime numbers, to me, are not all that interesting.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ All numbers are prime.
• Prime Magic Squares 28 January 2010 1:41 UTC recmath.com [Source type: Academic]

.However, the distribution of primes, that is to say, the statistical behaviour of primes in the large can be modeled.^ A very significant one is the Riemann hypothesis, which essentially says that the primes are as regularly distributed as possible.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ It is possible to quickly check whether a given large number (say, up to a few thousand digits) is prime using probabilistic primality tests.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The problem of modelling the distribution of prime numbers is a popular subject of investigation for number theorists: when looking at individual numbers, the primes seem to be randomly distributed, but the "global" distribution of primes follows well-defined laws.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The first result in that direction is the prime number theorem which says that the probability that a given, randomly chosen number n is prime is inversely proportional to its number of digits, or the logarithm of n.^ He asked: What proportion of numbers are prime numbers?
• The prime number lottery 28 January 2010 1:41 UTC plus.maths.org [Source type: FILTERED WITH BAYES]

^ The first 30 prime numbers are: .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The results proof that the prime numbers are not uniform randomly distributed among the natural numbers.
• Prime Numbers Random? 28 January 2010 1:41 UTC members.tele2.nl [Source type: Academic]

This statement has been proven since the end of the 19th century. .The unproven Riemann hypothesis dating from 1859 implies a refined statement concerning the distribution of primes.^ A very significant one is the Riemann hypothesis, which essentially says that the primes are as regularly distributed as possible.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The most significant of these is the Riemann hypothesis , which essentially says that the primes are as regularly distributed as possible.

^ It is trying to explain the sequence of prime numbers that the Riemann Hypothesis is all about.
• The prime number lottery 28 January 2010 1:41 UTC plus.maths.org [Source type: FILTERED WITH BAYES]

.Despite being intensely studied, many fundamental questions around prime numbers remain open.^ There are many open questions about prime numbers.

^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ So, for example, 1 in 6 numbers around 1,000 are prime.
• The prime number lottery 28 January 2010 1:41 UTC plus.maths.org [Source type: FILTERED WITH BAYES]

.For example, Goldbach's conjecture which asserts that any even natural number bigger than two is the sum of two primes, or the twin prime conjecture which says that there are infinitely many twin primes (pairs of primes whose difference is two), have been unresolved for more than a century, notwithstanding the simplicity of their statements.^ Problem 2: How many prime numbers are there?
• Prime Numbers - Dev Shed 28 January 2010 1:41 UTC forums.devshed.com [Source type: General]

^ The rate of convergence to infinity if there are infinitely many twins.
• Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General]

^ Goldbach's conjecture : Can every even integer greater than 2 be written as a sum of two primes?

.Prime numbers give rise to various generalizations in other mathematical domains, mainly algebra, notably the notion of prime ideals.^ The notion of prime number has been generalized in many different branches of mathematics.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ K. Matthews, Generating prime numbers .
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ In ring theory, one generally replaces the notion of number with that of ideal.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Primes are applied in several routines in information technology, such as public-key cryptography, which makes use of the difficulty of factoring large numbers into their prime factors.^ A number is therefore defined by its prime factorization.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Example using prime number 7.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ If it is a prime number, then this information is simply printed.
• Prime Numbers - Dev Shed 28 January 2010 1:41 UTC forums.devshed.com [Source type: General]

.Searching for big primes, often using distributed computing, has stimulated studying special types of primes, chiefly Mersenne primes whose primality is comparably quick to decide.^ Some special types of primes .

^ Special types of primes from formulas for primes .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The newly discovered number is an example of a specific type of prime number called a Mersenne prime, named after the 17th century French scholar Marin Mersenne.
• Why 2 to the power of 43,112,609 - 1 = $100,000 for prime number hunters | Science | The Guardian 28 January 2010 1:41 UTC www.guardian.co.uk [Source type: News] .As of 2010, the largest known prime number has about 13 million decimal digits.^ The largest known factorial prime is 3610! ^ Ten largest known primes . • prime number@Everything2.com 28 January 2010 1:41 UTC www.everything2.com [Source type: FILTERED WITH BAYES] ^ Prime numbers p where 2 p + 1 is also prime are known as Sophie Germain primes .  Prime numbers and the fundamental theorem of arithmetic .A natural number is called a prime, a prime number or just prime if it has exactly two distinct natural number divisors.^ A number n is prime if and only if it has exactly two positive divisors. • id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic] ^ In mathematics , a prime number (or a prime ) is a natural number which has exactly two distinct natural number divisors: 1 and itself. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ A natural number that is greater than one and is not a prime is called a composite number . .Natural numbers greater than 1 that are not prime are called composite.^ Prime numbers less than 2^18 . • The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference] ^ Prime numbers are opposite to composite numbers. • Number Gossip: List of Properties 28 January 2010 1:41 UTC www.numbergossip.com [Source type: Reference] ^ D. J. Bernstein, Distinguishing prime numbers from composite numbers . • id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic] .Therefore, 1 is not prime, since it has only one divisor, namely 1. However, 2 and 3 are prime, since they have exactly two divisors, namely 1 and 2, and 1 and 3, respectively.^ A prime has exactly one proper positive divisor, 1. • id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic] ^ Or for short: A prime number is a natural number with exactly two natural divisors. ^ A number n is prime if and only if it has exactly two positive divisors. • id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic] Next, 4, is composite, since it has 3 divisors: 1, 2, and 4. Using symbols, a number n > 1 is prime if it cannot be written as a product of two factors a and b, both of which are larger than 1: n = a · b. .The crucial importance of prime numbers to number theory and mathematics in general stems from the fundamental theorem of arithmetic which states that every positive integer larger than 1 can be written as a product of one or more primes in a way which is unique except possibly for the order of the prime factors.^ A number is therefore defined by its prime factorization. • Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES] ^ If n is a positive integer greater than 1, then there is always a prime number p with n < p < 2 n ( Bertrand's postulate ). ^ Positive integers other than 1 which are not prime are called composite numbers . • Prime Number -- from Wolfram MathWorld 18 September 2009 15:41 UTC mathworld.wolfram.com [Source type: Academic] .Primes can thus be considered the “basic building blocks” of the natural numbers.^ Primes are thus the "basic building blocks" of the natural numbers (The proof of this is below). ^ They realised that the primes are the building blocks of all numbers. • The prime number lottery 28 January 2010 1:41 UTC plus.maths.org [Source type: FILTERED WITH BAYES] ^ Representing natural numbers as products of primes . For example, we can write:  23244 = 2 · 2 · 3 · 13 · 149 = 22 · 3 · 13 · 149. (22 denotes the square or second power of 2.) .As in this example, the same prime factor may occur multiple times.^ The same prime may occur multiple times. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ In the previous articles, the prime trial factors were taken from the same bit array as the numbers being tested. ^ The definition of the function may be to test a single number for primeness, but it may be called many times for many numbers. • Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES] A decomposition: n = p1 · p2 · ... · pt of a number .n into (finitely many) prime factors p1, p2, ...^ What about the 200 trillion you could run in a year -- how many prime factors would you need? ^ It follows that s (N) is divisible by 2 k+1 1, which is odd, so this must be a prime (else it would factor into two odd primes). • Geometry.Net - Theorems_And_Conjectures: Perfect And Prime Numbers 18 September 2009 15:41 UTC www.geometry.net [Source type: Reference] ^ Many prime factorization algorithms have been devised for determining the prime factors of a given integer , a process known as factorization or prime factorization. • Prime Number -- from Wolfram MathWorld 18 September 2009 15:41 UTC mathworld.wolfram.com [Source type: Academic] to pt is called prime factorization of n. .The fundamental theorem of arithmetic can be rephrased so as to say that any factorization into primes will be identical except for the order of the factors.^ Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the mind will never penetrate. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ The Fundamental Theorem of Arithmetic states that for every number, there is exactly one way to factor that number into primes -- and vice versa: every selection of primes multiplies into a different number. • Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES] ^ Euclid's Elements (circa 300 BC) contain important theorems about primes, including the infinitude of primes and the fundamental theorem of arithmetic. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] .So, albeit there are many prime factorization algorithms to do this in practice for larger numbers, they all have to yield the same result.^ A number is therefore defined by its prime factorization. • Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES] ^ There are many open questions about prime numbers. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ There are infinitely many prime numbers . • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] .The set of all primes is often denoted P.^ The set of primes is sometimes denoted , represented in Mathematica as Primes . • Prime Number -- from Wolfram MathWorld 18 September 2009 15:41 UTC mathworld.wolfram.com [Source type: Academic] ^ Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ However, since 2 is the only even prime (which, ironically, in some sense makes it the "oddest" prime), it is also somewhat special, and the set of all primes excluding 2 is therefore called the " odd primes ." • Prime Number -- from Wolfram MathWorld 18 September 2009 15:41 UTC mathworld.wolfram.com [Source type: Academic] Examples and first properties  Illustration showing that 11 is a prime number while 12 is not. The only even prime number is 2, since any larger even number is divisible by 2. Therefore, the term odd prime refers to any prime number greater than 2. The image at the right shows a graphical way to show that 12 is not prime. .More generally, all prime numbers except 2 and 5, written in the usual decimal system, end in 1, 3, 7 or 9, since numbers ending in 0, 2, 4, 6 or 8 are multiples of 2 and numbers ending in 0 or 5 are multiples of 5. Similarly, all prime numbers above 3 are of the form 6n − 1 or 6n + 1, because all other numbers are divisible by 2 or 3. Generalizing this, all prime numbers above q are of form q#·n + m, where 0 < m < q, and m has no prime factor ≤ q.^ Division by any other number less than the prime number results in a remainder. • Testing For Prime Numbers 28 January 2010 1:41 UTC cpearson.com [Source type: Reference] ^ Twin primes : All twin primes except (3, 5) are of the form . • Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General] ^ I said that all primes of are such form, not that all of such form are primes. • Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General] .If p is a prime number and p divides a product ab of integers, then p divides a or p divides b.^ Sum of k primes = Product of k integers . • The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference] ^ If p is a prime number and p divides a product ab of integers, then p divides a or p divides b . • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ One of the central thereoms of Number Theory provides that the density of primes is always greater than a known number for the first incomprehensively large number of integers. • Testing For Prime Numbers 28 January 2010 1:41 UTC cpearson.com [Source type: Reference] .This proposition is known as Euclid's lemma.^ This proposition was proved by Euclid and is known as Euclid's lemma . • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ The oldest known proof for the statement that there are infinitely many prime numbers is given by the Greek mathematician Euclid in his Elements (Book IX, Proposition 20). • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] .It is used in some proofs of the uniqueness of prime factorizations.^ It is used in some proofs of the uniqueness of prime factorizations. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ Already some people are using keys that, in order to factor with the Number Field Sieve, would require more energy than exists in the known universe. • Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES] ^ Why was the process so significantly slower using prime factors up to a billion? Primality of one .The importance of this theorem is one of the reasons for the exclusion of 1 from the set of prime numbers.^ The importance of this theorem is one of the reasons for the exclusion of 1 from the set of prime numbers. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the mind will never penetrate. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ Postulate 1 essentially defines the primes...and does so by elimination of all the other numbers, which are composites...composed of components other than or in addition to one and themselves. • "Butterfly Prime Determinate Number Array (DNA)" copyright © 2006, Reginald Brooks. All rights reserved. 28 January 2010 1:41 UTC www.brooksdesign-ps.net [Source type: Reference] If 1 were admitted as a prime, the precise statement of the theorem would require additional qualifications, since 3 could then be decomposed in different ways 3 = 1 · 3 and 3 = 1 · 1 · 1 · 3 = 13 · 3. .Until the 19th century, most mathematicians considered the number 1 a prime, the definition being just that a prime is divisible only by 1 and itself but not requiring a specific number of distinct divisors.^ N is a NEW prime number itself OR b. • Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES] ^ For example, 7 is a prime number because it is evenly divisible by only 1 and 7. • Testing For Prime Numbers 28 January 2010 1:41 UTC cpearson.com [Source type: Reference] ^ In mathematics , a prime number (or a prime ) is a natural number which has exactly two distinct natural number divisors: 1 and itself. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] .There is still a large body of mathematical work that is valid despite labeling 1 a prime, such as the work of Stern and Zeisel.^ Until the 19th century most mathematicians considered the number 1 a prime, and there is still a large body of mathematical work that is valid despite labelling 1 a prime, such as the work of Stern and Zeisel. • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] ^ It is not known if there are an infinite number of such primes (Wells 1986, p. • Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General] ^ Main article: public key cryptography Several public-key cryptography algorithms, such as RSA, are based on large prime numbers (for example with 512 bits). • WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference] .Derrick Norman Lehmer's list of primes up to 10,006,721, reprinted as late as 1956, started with 1 as its first prime.^ The Electronic Frontier Foundation (EFF) has offered a US$100,000 prize to the first discoverers of a prime with at least 10 million digits.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ HELLO! We've just printed the primes up to 10,000,000 in 2.30 seconds.

^ For example, to find all the odd primes less than or equal to 100 we first list the odd numbers from 3 to 100 (why even list the evens?
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

 .Henri Lebesgue is said to be the last professional mathematician to call 1 prime.^ Henri Lebesgue is said to be the last professional mathematician to call 1 prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

 .The change in label occurred so that the fundamental theorem of arithmetic, as stated, is valid, i.e., “each number has a unique factorization into primes.” Furthermore, the prime numbers have several properties that the number 1 lacks, such as the relationship of the number to its corresponding value of Euler's totient function or the sum of divisors function.^ A number is therefore defined by its prime factorization.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Numbers with exactly one prime divisor.
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ Properties of numbers that have a Mersenne Number as a factor .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]



History . The Sieve of Eratosthenes is a simple algorithm for finding all prime numbers up to a specified integer.
^ Finding prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Prime number algorithm in C .
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ Find all prime numbers which is <= sqrt(lim) 2.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

.It is the predecessor to the modern Sieve of Atkin, which is faster but more complex.^ A more complicated, but more efficient algorithm (when properly optimized) is the sieve of Atkin.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ As a hint, there are faster but more complicated algorithms, like the Sieve of Atkin and the various Wheel Sieves.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

The Sieve of Eratosthenes was created in the 3rd century BC by Eratosthenes, an ancient Greek mathematician.
.There are hints in the surviving records of the ancient Egyptians that they had some knowledge of prime numbers: the Egyptian fraction expansions in the Rhind papyrus, for instance, have quite different forms for primes and for composites.^ D. J. Bernstein, Distinguishing prime numbers from composite numbers .
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ Prime Numbers - There is a pattern!
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ Therefore, if one is to calculate a prime – they have to know the number of “skips” that occur within the lines prior to the prime.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

.However, the earliest surviving records of the explicit study of prime numbers come from the Ancient Greeks.^ However, the earliest surviving records of the explicit study of prime numbers come from the Ancient Greeks .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ There are hints in the surviving records of the ancient Egyptians that they had some knowledge of prime numbers: the Egyptian fraction expansions in the Rhind papyrus, for instance, have quite different forms for primes and for composites.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ However there is no evidence to suggest that starfish have 5 arms because 5 is a prime number.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Euclid's Elements (circa 300 BC) contain important theorems about primes, including the infinitude of primes and the fundamental theorem of arithmetic.^ Euclid's Elements (circa 300 BC) contain important theorems about primes, including the infinitude of primes and the fundamental theorem of arithmetic.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ If p is prime and G is a group with p n elements, then G contains an element of order p .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ An infinitude of prime numbers exists, as demonstrated by Euclid in about 300 BC .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Euclid also showed how to construct a perfect number from a Mersenne prime.^ How about the next challenge is to return all 78498 prime numbers between 1 and 1000000?” .
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

^ Euler's Totient Function is denoted by the Greek letter phi, and is defined as follows: phi(N) = how many numbers between 1 and N - 1 which are relatively prime to N. Thus: .
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ We already know how to exlude numbers from the prime list.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

.The Sieve of Eratosthenes, attributed to Eratosthenes, is a simple method to compute primes, although the large primes found today with computers are not generated this way.^ The Sieve of Eratosthenes, attributed to Eratosthenes, is a simple method to compute primes, although the large primes found today with computers are not generated this way.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ F. Richman, Generating primes by the sieve of Eratosthenes .
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ So I decided to try to convert the Sieve of Eratosthenes to T-SQL. This algorithm is known to be both simple and fast for getting a list of prime numbers.
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

.After the Greeks, little happened with the study of prime numbers until the 17th century.^ After the Greeks, little happened with the study of prime numbers until the 17th century.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Until the 19th century most mathematicians considered the number 1 a prime, and there is still a large body of mathematical work that is valid despite labelling 1 a prime, such as the work of Stern and Zeisel.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Having the answer falling on Ray1 will ALWAYS happen no matter which two prime numbers you choose ...
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

.In 1640 Pierre de Fermat stated (without proof) Fermat's little theorem (later proved by Leibniz and Euler).^ In 1640 Pierre de Fermat stated (without proof) Fermat's little theorem (later proved by Leibnitz and Euler ).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ This can be deduced directly from Fermat's little theorem.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ This outline was completed by Hadamard and de la Vallée Poussin, who independently proved the prime number theorem in 1896.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.A special case of Fermat's theorem may have been known much earlier by the Chinese.^ A special case of Fermat's theorem may have been known much earlier by the Chinese.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ They include special cases such as the Lucas-Lehmer test for Mersenne primes and Pepin's Test for Fermat primes.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Many well-known conjectures are special cases of the broad Schinzel's hypothesis H. Many believe there are infinitely many Fibonacci primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Fermat conjectured that all numbers of the form 22n + 1 are prime (they are called Fermat numbers) and he verified this up to n = 4 (or 216 + 1).^ Primes of the form 2 p − 1, where p is a prime number, are known as Mersenne primes, while primes of the form are known as Fermat primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Prime numbers, to me, are not all that interesting.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ They are called Mersenne primes in his honor.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.However, the very next Fermat number 232 + 1 is composite (one of its prime factors is 641), as Euler discovered later, and in fact no further Fermat numbers are known to be prime.^ Primes of the form 2 p − 1, where p is a prime number, are known as Mersenne primes, while primes of the form are known as Fermat primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ No shared digits between composites and its prime factors .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ However, the very next Fermat number 2 32 +1 is composite (one of its prime factors is 641), as Euler discovered later, and in fact no further Fermat numbers are known to be prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The French monk Marin Mersenne looked at primes of the form 2p − 1, with p a prime.^ The French monk Marin Mersenne looked at primes of the form 2 p - 1, with p a prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Primes of the form 2 p − 1, where p is a prime number, are known as Mersenne primes, while primes of the form are known as Fermat primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ In 1747 he showed that the even perfect numbers are precisely the integers of the form 2 p -1 (2 p -1) where the second factor is a Mersenne prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.They are called Mersenne primes in his honor.^ They are called Mersenne primes in his honor.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ They include special cases such as the Lucas-Lehmer test for Mersenne primes and Pepin's Test for Fermat primes.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Fermat conjectured that all numbers of the form 2 2 n + 1 are prime (they are called Fermat numbers) and he verified this up to n = 4.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Euler's work in number theory included many results about primes.^ There are many open questions about prime numbers.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Prime numbers are of utmost importance in number theory.
• Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General]

.He showed the infinite series 1/2 + 1/3 + 1/5 + 1/7 + 1/11 + … is divergent.^ Adding the reciprocals of all primes together results in a divergent infinite series (proof).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ He showed the infinite series 1 / 2 + 1 / 3 + 1 / 5 + 1 / 7 + 1 / 11 + ...
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.In 1747 he showed that the even perfect numbers are precisely the integers of the form 2p−1(2p − 1), where the second factor is a Mersenne prime.^ Euclid also showed how to construct a perfect number from a Mersenne prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ A = The set of prime number twins of the above form.
• Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General]

^ Primes of the form 2 p − 1, where p is a prime number, are known as Mersenne primes, while primes of the form are known as Fermat primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.At the start of the 19th century, Legendre and Gauss independently conjectured that as x tends to infinity, the number of primes up to x is asymptotic to x/ln(x), where ln(x) is the natural logarithm of x.^ Prime numbers in nature .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ At the start of the 19th century, Legendre and Gauss independently conjectured that as x tends to infinity, the number of primes up to x is asymptotic to x /log( x ), where log( x ) is the natural logarithm of x .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Until the 19th century most mathematicians considered the number 1 a prime, and there is still a large body of mathematical work that is valid despite labelling 1 a prime, such as the work of Stern and Zeisel.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Ideas of Riemann in his 1859 paper on the zeta-function sketched a program which would lead to a proof of the prime number theorem.^ Ideas of Riemann in his 1859 paper on the zeta-function sketched a program which would lead to a proof of the prime number theorem.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ P. Hartmann, Prime number proofs .
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ This outline was completed by Hadamard and de la Vallée Poussin, who independently proved the prime number theorem in 1896.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

This outline was completed by Hadamard and de la Vallée Poussin, who independently proved the prime number theorem in 1896.
.Proving a number is prime is not done (for large numbers) by trial division.^ Proving a number is prime is not done (for large numbers) by trial division.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ This outline was completed by Hadamard and de la Vallée Poussin, who independently proved the prime number theorem in 1896.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Because these are the numbers easiest to prove prime!
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.Many mathematicians have worked on primality tests for large numbers, often restricted to specific number forms.^ Many mathematicians have worked on primality tests for large numbers, often restricted to specific number forms.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Until the 19th century most mathematicians considered the number 1 a prime, and there is still a large body of mathematical work that is valid despite labelling 1 a prime, such as the work of Stern and Zeisel.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ In particular, number theorists such as British mathematician G. H. Hardy prided themselves on doing work that had absolutely no military significance.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.This includes Pépin's test for Fermat numbers (1877), Proth's theorem (around 1878), the Lucas–Lehmer primality test (originated 1856), and the generalized Lucas primality test.^ [The Lucas-Lehmer test is introduced.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ In 1891 Lucas turned Fermat's Little Theorem into a practical primality test.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Lucas-Lehmer test .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.More recent algorithms like APRT-CL, ECPP, and AKS work on arbitrary numbers but remain much slower.^ Edson Smith , the systems administrator at UCLA who found the largest Mersenne prime, explained that primes and even Mersenne primes are easy to find in the lower numbers, like 3 and 5, but become much more difficult to find when the numbers become long and intricate.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ I have worked on this before and my findings are that there almost seems to be a correlation between the DNA double helix and the Prime numbers algorithm.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ As a hint, there are faster but more complicated algorithms, like the Sieve of Atkin and the various Wheel Sieves.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

.For a long time, prime numbers were thought to have extremely limited application outside of pure mathematics;[citation needed] this changed in the 1970s when the concepts of public-key cryptography were invented, in which prime numbers formed the basis of the first algorithms such as the RSA cryptosystem algorithm.^ The first 30 prime numbers are: .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Prime number algorithm in C .
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ Public-key cryptography .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Since 1951 all the largest known primes have been found by computers.^ Since 1951 all the largest known primes have been found by computers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ A grid of 75 computers at UCLA has found the largest prime number known to man .
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ This is also the seventh largest known prime of any form.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The search for ever larger primes has generated interest outside mathematical circles.^ The search for ever larger primes has generated interest outside mathematical circles.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ For a long time, number theory in general, and the study of prime numbers in particular, was seen as the canonical example of pure mathematics, with no applications outside of the self-interest of studying the topic.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ So when conducting our search for these two primes, we only need to search circles BELOW the circle that 1225 is on, thereby eliminating an enormous amount of unnecessary search effort.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

.The Great Internet Mersenne Prime Search and other distributed computing projects to find large primes have become popular in the last ten to fifteen years, while mathematicians continue to struggle with the theory of primes.^ We all have limited lifetimes, and waiting a year for the computer to find primes to 220 trillion isn't rewarding.

^ So, even if you continued adding an infinite number of circles, you will only find prime numbers appearing somewhere along extensions of these 8 rays !
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ I envision the main computer as running the prime finding program, but also replying to requests from satellites.

The number of prime numbers

.There are infinitely many prime numbers.^ There are many open questions about prime numbers.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ It is conjectured there are infinitely many primes of the form n 2 + 1.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The oldest known proof for this statement, sometimes referred to as Euclid's theorem, is due to the Greek mathematician Euclid.^ Functionalism Euclid and The Scientific Method of Today Some historians credit an ancient Greek mathematician known as Euclid with implementing logical processes for research and theoretical development, which would later evolve into the scientific method that is universally taught and used today.

^ The oldest known proof for the statement that there are infinitely many prime numbers is given by the Greek mathematician Euclid in his Elements (Book IX, Proposition 20).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The proof is sometimes phrased in a way that leads the student to conclude that P + 1 must itself be prime, and think that Euclid's proof says the prime product plus 1 is always prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

Euclid states the result as "there are more than any given [finite] number of primes", and his proof is essentially the following:
.Consider any finite set of primes.^ Consider any finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ In other words, when considering the set of integers as a ring, − 7 is a prime element.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Multiply all of them together and add 1 (see Euclid number).^ Multiply all of them together and add one (see Euclid number).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ P1P2 represents the product obtained by multiplying the two prime numbers together.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ When you multiply any two numbers together, it's usually fairly trivial to take that final answer and work backwards to figure out the original two numbers that were used.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

.The resulting number is not divisible by any of the primes in the finite set we considered, because dividing by any of these would give a remainder of 1. Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes.^ Either way, there is at least one more prime that was not in the finite set we started with.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ So let us (me) list the prime numbers (a number that is only dividable by 1 and the number itself).
• Another game: Prime numbers and twins. - WebProWorld 28 January 2010 1:41 UTC www.webproworld.com [Source type: General]

.Either way, there is at least one more prime that was not in the finite set we started with.^ So there are more primes than any given finite number.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Of course, there are even more exotic ways to store primes.

^ Either way, there is at least one more prime that was not in the finite set we started with.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.This argument applies no matter what finite set we began with.^ This argument applies no matter what finite set we began with.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Note that there is no finite set of bases that will work in Miller's test.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.So there are more primes than any given finite number.^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Euclid states the result as "there are more than any given [finite] number of primes", and his proof is essentially the following: .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Counting the number of prime numbers below a given number .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

(Euclid, Elements: Book IX, Proposition 20)
.This previous argument explains why the product P of finitely many primes plus 1 must be divisible by some prime (possibly itself) not among those finitely many primes.^ This previous argument explains why the product P of finitely many primes plus 1 must be divisible by some prime not among those finitely many primes (possibly itself).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Adding 1 to this product will always produce an even number, which will be divisible by 2 (and therefore not be prime).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The proof is sometimes phrased in a way that falsely leads some readers to think that P + 1 must itself be prime, and think that Euclid's proof says the prime product plus 1 is always prime.^ The proof is sometimes phrased in a way that leads the student to conclude that P + 1 must itself be prime, and think that Euclid's proof says the prime product plus 1 is always prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ "I am simply sharing that the skips found in the lines are always a product of a prime times another prime" Yes, that is the Fundamental Theorem of Arithmetic which Euclid proved sometime before Jesus was born.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ Actually, Euclid offered a proof of the infinity of primes around 2000 years ago ...
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

.This confusion arises when the proof is presented as a proof by contradiction and P is assumed to be the product of the members of a finite set containing all primes.^ Consider any finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Adding the reciprocals of all primes together results in a divergent infinite series (proof).
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Euclid states the result as "there are more than any given [finite] number of primes", and his proof is essentially the following: .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.Then it is asserted that if P + 1 is not divisible by any members of that set, then it is not divisible by any primes and "is therefore itself prime" (quoting G. H. Hardy).^ In summary therefore, and as far as I can see, the initial five primes may actually be 1, 5, 7, 11, 13 and NOT the conventional 1, 2, 3, 5 and 7.
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

^ For any unique factorization domain, such as the ring Z of integers, the set of prime elements equals the set of irreducible elements, which for Z is {..., −11, −7, −5, −3, −2, 2, 3, 5, 7, 11, ...
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Because all non-prime numbers can be decomposed into a product of underlying primes, then either this resultant number is prime itself, or there is a prime number or prime numbers which the resultant number could be decomposed into but are not in the original finite set of primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.This sometimes leads readers to conclude mistakenly that if P is the product of the first n primes then P + 1 is prime.^ The proof is sometimes phrased in a way that leads the student to conclude that P + 1 must itself be prime, and think that Euclid's proof says the prime product plus 1 is always prime.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

That conclusion relies on a hypothesis later proved false, and so cannot be considered proved. The smallest counterexample with composite P + 1 is
(2 × 3 × 5 × 7 × 11 × 13) + 1 = 30,031 = 59 × 509 (both primes).
.Many more proofs of the infinity of primes are known.^ Euclid states the result as "there are more than any given [finite] number of primes", and his proof is essentially the following: .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Main article: formula for primes There is no known formula for primes which is more efficient at finding primes than the methods mentioned above under "Finding prime numbers".
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Actually, Euclid offered a proof of the infinity of primes around 2000 years ago ...
• Adventures In PRIME NUMBER Land !!! ... (A Dummies Guide to Prime Numbers), page 1 28 January 2010 1:41 UTC www.abovetopsecret.com [Source type: FILTERED WITH BAYES]

Adding the reciprocals of all primes together results in a divergent infinite series: $\sum_{p ext{ prime}} \frac 1 p = \frac 1 2 + \frac 1 3 + \frac 1 5 + \frac 1 7 + \cdots = \infty$
The proof of that statement is due to Euler. More precisely, if S(x) denotes the sum of the reciprocals of all prime numbers p with px, then
S(x) = ln ln x + O(1) for x → ∞.
.Another proof based on Fermat numbers was given by Goldbach.^ Of course, as far as proofs go, this theorem is only useful for proving that a given number is composite.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

 .Kummer's is particularly elegant and Harry Furstenberg provides one using general topology.^ Kummer's is particularly elegant and Harry Furstenberg provides one using general topology.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]


.Not only are there infinitely many primes, Dirichlet's theorem on arithmetic progressions asserts that in every arithmetic progression a, a + q, a + 2q, a + 3q, … where the positive integers a and q are coprime, there are infinitely many primes.^ There are infinitely many prime numbers .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ It is not known whether there are infinitely many primorial or factorial primes.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ It is conjectured there are infinitely many primes of the form n 2 + 1.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

.The recent Green–Tao theorem shows that there are arbitrarily long progressions consisting of primes.^ This shows that there exist infinitely many prime numbers."
• id:A000040 - OEIS Search Results 28 January 2010 1:41 UTC www.research.att.com [Source type: Academic]

^ Therefore, there exist gaps between primes which are arbitrarily large, i.e.
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ The Fundamental Theorem of Arithmetic states that for every number, there is exactly one way to factor that number into primes -- and vice versa: every selection of primes multiplies into a different number.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]



Verifying primality

.To use primes requires verifying whether a given number n is prime or not.^ Counting the number of prime numbers below a given number .
• WikiSlice 28 January 2010 1:41 UTC dev.laptop.org [Source type: Reference]

^ Already some people are using keys that, in order to factor with the Number Field Sieve, would require more energy than exists in the known universe.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Few are the mathematicians who study creatures like the prime numbers with the hope or even desire for their discoveries to be useful outside of their own domain.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.There are several ways to achieve this.^ There are several ways around this problem.

.A sieve is an algorithm that yields all primes up to a given limit.^ Your algorithm could be used as an alternative to Eratosthenes' sieve, if > > the purpose was to find out *all* the prime numbers smaller than N, but > > it would be overkill to test a single number for primeness.
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ We all have limited lifetimes, and waiting a year for the computer to find primes to 220 trillion isn't rewarding.

^ Your algorithm could be used as an alternative to Eratosthenes' sieve, if the purpose was to find out *all* the prime numbers smaller than N, but it would be overkill to test a single number for primeness.
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

.The oldest such sieve is the sieve of Eratosthenes (see above), useful for relatively small primes.^ For very small primes we can use the Sieve of Eratosthenes or trial division .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Your algorithm could be used as an alternative to Eratosthenes' sieve, if > > the purpose was to find out *all* the prime numbers smaller than N, but > > it would be overkill to test a single number for primeness.
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ Your algorithm could be used as an alternative to Eratosthenes' sieve, if the purpose was to find out *all* the prime numbers smaller than N, but it would be overkill to test a single number for primeness.
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

The modern sieve of Atkin is more complicated, but faster when properly optimized. .Before the advent of computers, lists of primes up to bounds like 107 were also used.^ Few are the mathematicians who study creatures like the prime numbers with the hope or even desire for their discoveries to be useful outside of their own domain.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Why was the process so significantly slower using prime factors up to a billion?

^ Let's try finding prime numbers to a billion using a list of primes from 2 to 5 million: .


.In practice, one often wants to check whether a given number is prime, rather than generate a list of primes as the two mentioned sieve algorithms do.^ Prime number algorithm in C .
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ There are several ways to determine whether or not a given number is a prime number.
• Prime Numbers - Dev Shed 28 January 2010 1:41 UTC forums.devshed.com [Source type: General]

^ Two more pieces of advice which could help if you are running this more than once at a time: You only actually need to check against primes, if you know the primes less than the number already.
• Prime Numbers - Dev Shed 28 January 2010 1:41 UTC forums.devshed.com [Source type: General]

.The most basic method to do this, known as trial division, works as follows: given a number n, one divides n by all numbers m less than or equal to the square root of that number.^ And all numbers in this pattern cannot divided by 2 or 3.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ To test n for primality (to see if it is prime) just divide by all of the primes less than the square root of n .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ My logic is that I start a loop of all the numbers between the start and end, and inside that loop I take every number below my number from the first loop, and divide them.
• Prime Number Program 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

.If any of the divisions come out as an integer, then the original number is not a prime.^ When it comes to memory usage, the quickest and most obvious improvement comes with the realization that each candidate number either is or is not prime, and that's all you need to know.

^ We learned that the frequency of prime numbers decreases as the numbers go up, but they decrease at a decreasing rate, leveling off somewhere around an average of 1 out of 25.

^ From there, if you really enjoy prime numbers, you can venture out on the net to find truly optimized algorithms.

Otherwise, it is a prime. .Actually it suffices to do these trial divisions for m prime, only.^ SPRP, 121 = 11.11 is a 3-SPRP, 781 = 11.71 is a 5-SPRP and, 25 = 5.5 is a 7-SPRP. A test based on these results is quite fast, especially when combined with trial division by the first few primes.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ To find individual small primes trial division works well.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ If you pick a value for N that is divisible by 2 or 3 (the prime factors of 12), then you will find that you will only hit certain numbers before you return to midnight, and the sequence will then repeat.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.While an easy algorithm, it quickly becomes impractical for testing large integers because the number of possible factors grows too rapidly as the number-to-be-tested increases: According to the prime number theorem expounded below, the number of prime numbers less than n is near n / (ln (n) − 1).^ A number is therefore defined by its prime factorization.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ The prime factors of a given number (n) cannot be greater than ceiling (√n).
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ Consecutive numbers, increasing quantity of prime factors .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

.So, to check n for primality the largest prime factor needed is just less than $\scriptstyle\sqrt{n}$, and so the number of such prime factor candidates would be close to $\sqrt{n}/(\ln\sqrt{n} - 1)$.^ A number is therefore defined by its prime factorization.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ The largest prime number yet discovered has just been revealed to the world.
• Multi Prime - A multithreaded prime number benchmark - EXTREME Overclocking Forums 28 January 2010 1:41 UTC forums.extremeoverclocking.com [Source type: FILTERED WITH BAYES]

^ Prime numbers less than 2^18 .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

.This increases ever more slowly with n, but, because there is interest in large values for n, the count is large also: for n = 10 20 it is 450 million.^ There are more interesting directions to go.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ Etc… Therefore, there is a speed increase because one only needs to mark certain items.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

.Modern primality test algorithms can be divided into two main classes, deterministic and probabilistic (or "Monte Carlo") algorithms.^ MR 58:470a Monier80 L. Monier , "Evaluation and comparsion of two efficient probablistic primality testing algorithms," Theoretical Computer Science , 12 :1 (1980) 97--108.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ To make a quick primality test from these results, start by dividing by the first few primes (say those below 257); then perform strong primality tests base 2, 3, ...
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ These probable primality tests can be combined to create a very quick algorithm for proving primality for integers less than 340,000,000,000,000.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.Probabilistic algorithms may report a composite number as a prime, but certainly do not identify primes as composite numbers; deterministic algorithms on the other hand do not have the possibility of such erring.^ On the other hand, if p > 1 is composite, then it has a prime divisor q .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Prime number algorithm in C .
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ So I decided to try to convert the Sieve of Eratosthenes to T-SQL. This algorithm is known to be both simple and fast for getting a list of prime numbers.
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

.The interest of probabilistic algorithms lies in the fact that they are often quicker than deterministic ones; in addition for most such algorithms the probability of erroneously identifying a composite number as prime is known.^ Prime numbers less than 2^18 .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ Prime number algorithm in C .
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ It is so obvious and the area of prime numbers is one of the most studied.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

.They typically pick a random number a called a "witness" and check some formula involving the witness and the potential prime n.^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Here's the chunk of my code that checks for prime numbers.
• Prime Number Program 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ In addition, the order in which you visit the numbers is entirely dependent on what value you pick for N. In a similar vein, it is important that both P and Q be relatively prime to phi(R).
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.After several iterations, they declare n to be "definitely composite" or "probably prime". For example, Fermat's primality test relies on Fermat's little theorem (see above).^ If it has none, try a Fermat test to see if it is a probable prime.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Strong probable-primality and a practical test .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ In 1891 Lucas turned Fermat's Little Theorem into a practical primality test.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Thus, if
ap − 1 (mod p)
is unequal to 1, p is definitely composite. .However, p may be composite even if ap − 1 = 1 (mod p) for all witnesses a, namely when p is a Carmichael number.^ Here is the bad news: repeated PRP tests of a Carmichael number will fail to show that it is composite until we run across one of its factors.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Definition: The composite integer n is a Carmichael number if a n -1 =1 (mod n ) for every integer a relatively prime to n .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Some early articles call all numbers satisfying this test pseudoprimes, but now the term pseudoprime is properly reserved for composite probable-primes.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.In general, composite numbers that will be declared probably prime no matter what witness is chosen are called pseudoprimes for the respective test.^ HI, is this is this solution to test if a number is a prime number or not: /* * Is n a prime number?
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ Chapter 2: The quick tests for small numbers and probable primes .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Chapter Two: The quick tests for small numbers and probable primes .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

However, the most popular probabilistic tests do not suffer from this drawback. The following table compares some primality tests. .The running time is given in terms of n, the number to be tested and, for probabilistic algorithms, the number k of tests performed.^ MR2123939 Abstract: We present a deterministic polynomial-time algorithm that determines whether an input number n is prime or composite.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ The definition of the function may be to test a single number for primeness, but it may be called many times for many numbers.
• Prime number algorithm in C - C / C++ answers 28 January 2010 1:41 UTC bytes.com [Source type: FILTERED WITH BAYES]

^ Agrawal, Kayal and Saxena managed to reformulate this into the following algorithm which they proved would run in at most O((log n ) 12 f (log log n )) time where f is a polynomial.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Test Developed in Deterministic Running time Notes
AKS primality test 2002 Yes O(log6+ε(n))
Fermat primality test No O(k · log2n · log log n · log log log n) fails for Carmichael numbers
Lucas primality test Yes requires factorization of n − 1
Solovay–Strassen primality test 1977 No, error probability 2k O(k·log3 n)
Miller–Rabin primality test 1980 No, error probability 4k O(k · log2 n · log log n · log log log n)
Elliptic curve primality proving 1977 No O(log5+ε(n)) heuristic running time

Special types of primes  Construction of a regular pentagon. 5 is a Fermat prime.
.There are many particular types of primes, for example qualified by various formulae, or by considering its decimal digits.^ What he is doing is what we used to cal "digital factoring" (before that came to mean something else), wherein he is using the decimal digits of the number to calculate "digital roots" for various primes which shortcut methods for determining their remainder modulo that prime.
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

^ (There are more examples on the glossary page " probable prime ".
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.Primes of the form 2p − 1, where p is a prime number, are known as Mersenne primes.^ Mersenne prime numbers are a class of primes named after Marin Mersenne , a 17th century French monk who studied the rare numbers 300 years ago.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ So I decided to try to convert the Sieve of Eratosthenes to T-SQL. This algorithm is known to be both simple and fast for getting a list of prime numbers.
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

^ The third chapter cover the classical primality tests that have been used to prove primality for 99.99% of the numbers on the largest known prime list .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.Their importance lies in the fact that there are comparatively quick algorithms testing primality for Mersenne primes.^ Finding Very Small Primes Fermat, Probable-Primality and Pseudoprimes Strong Probable-Primality and a Practical Test This is one of four chapters on finding primes and proving primality.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ The third chapter cover the classical primality tests that have been used to prove primality for 99.99% of the numbers on the largest known prime list .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ The Neoclassical Tests, especially APR and APR-CL Using Elliptic Curves, especially the ECPP Test A Polynomial Time Algorithm Conclusion and Suggestions This is one of four chapters on finding primes and proving primality.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Primes of the form 22n + 1 are known as Fermat primes; a regular n-gon is constructible using straightedge and compass if and only if
n = 2i · m
where .m is a product of any number of distinct Fermat primes and i is any natural number, including zero.^ (By the way, this is one of the reasons that 1 is not considered to be a prime number: if it were, then each number would have an infinite number of prime factorizations, all differing by how many 1s were included.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ R has to be the product of two prime numbers, don't forget.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ The non-prime-pattern is that all the non-primes are products of two numbers.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

.Only five Fermat primes are known: 3, 5, 17, 257, and 65,537. Prime numbers p where 2p + 1 is also prime are known as Sophie Germain primes.^ So I decided to try to convert the Sieve of Eratosthenes to T-SQL. This algorithm is known to be both simple and fast for getting a list of prime numbers.
• SELECT Hints, Tips, Tricks FROM Hugo Kornelis WHERE RDBMS = 'SQL Server' : The prime number challenge – great waste of time! 28 January 2010 1:41 UTC sqlblog.com [Source type: FILTERED WITH BAYES]

^ One obvious improvement would be to test each candidate only with numbers that have been already proven prime.

^ A prime number is a whole number that can be divided only by one and itself.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

A prime p is called primorial or prime-factorial if it has the form
p = n# ± 1
for some number .n, where n# stands for the product 2 · 3 · 5 · 7 · … of all the primes n.^ Danny, if this stands for larger primes, or *all* primes, there is no way in the world you would not be known for eternity.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ However, your claim that all the skips in these columns are the product of two primes is off.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

^ The non-prime-pattern is that all the non-primes are products of two numbers.
• Prime Numbers - There is a pattern! - Danny Cooper - Blogs 28 January 2010 1:41 UTC www.aspose.com [Source type: FILTERED WITH BAYES]

A prime is called factorial if it is of the form n! ± 1. .It is not known whether there are infinitely many primorial or factorial primes.^ Primes associated to Primorials and Factorials .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ (By the way, this is one of the reasons that 1 is not considered to be a prime number: if it were, then each number would have an infinite number of prime factorizations, all differing by how many 1s were included.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

Location of the largest known prime

.Since the dawn of electronic computers the largest known prime has almost always been a Mersenne prime because there exists a particularly fast primality test for numbers of this form, the Lucas–Lehmer primality test.^ [The Lucas-Lehmer test is introduced.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ There are a handful of numbers which pass this test for every base, but which are not prime.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ These tests have been used for over 99.99% of the largest known primes.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.The following table gives the largest known primes of the mentioned types.^ At this site we keep a list of the 5000 largest known primes, so if you do find new record primes, why not let us know ?
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ The third chapter cover the classical primality tests that have been used to prove primality for 99.99% of the numbers on the largest known prime list .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Have you ever looked at the list of largest known primes ?
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Prime Number of decimal digits Type Date Found by
243,112,609 − 1 12,978,189 Mersenne prime August 23, 2008 Great Internet Mersenne Prime Search
19,249 × 213,018,586 + 1 3,918,990 not a Mersenne prime (Proth number) March 26, 2007 Seventeen or Bust
392113# + 1 169,966 primorial prime 2001 Heuer
34790! − 1 142,891 factorial prime 2002 Marchal, Carmody and Kuosa 
65516468355 × 2333333 ± 1 100,355 twin primes 2009 Twin prime search
.Some of the largest primes not known to have any particular form (that is, no simple formula such as that of Mersenne primes) have been found by taking a piece of semi-random binary data, converting it to a number n, multiplying it by 256k for some positive integer k, and searching for possible primes within the interval [256kn + 1, 256k(n + 1) − 1].^ If no factors are found, it's prime.

^ A grid of 75 computers at UCLA has found the largest prime number known to man .
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ Mersenne prime numbers are a class of primes named after Marin Mersenne , a 17th century French monk who studied the rare numbers 300 years ago.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

.The Electronic Frontier Foundation offered a US$100,000 prize to the first discoverers of a prime with at least 10 million digits.^ As a prize, the Electronic Frontier Foundation is handing out$100,000, with half going to the winner and half going to charity.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ By the time you hit that point, 4.67 seconds to decode 6 million text primes is the least of your concerns.

^ To test this hypothesis, let's see how fast it produces 100,000,000 instead of a million, once again using pages of 100,000.

.On October 22, 2009, the prize was awarded to the Great Internet Mersenne Prime Search (GIMPS) for discovering the 45th known Mersenne prime, which is 243,112,609 − 1. The UCLA mathematics department owns the computer on which the discovery was made and received half of the prize money, with the remainder going to charity and future research.^ As a prize, the Electronic Frontier Foundation is handing out $100,000, with half going to the winner and half going to charity. • Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General] ^ The discovery is part of the Great Internet Mersenne Prime Search (GIMPS), a 12-year-old project that uses the computers of volunteers to find larger and larger prime numbers. • Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General] ^ If you are aiming for the money, then either join GIMPS (as Mersenne's have held te record for quite awhile now) or look for a very large generalized Fermat. • How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]  .The EFF also offers$150,000 and $250,000 for 100 million digits and 1 billion digits, respectively.^ First I ran the non-paging program to produce all primes in the range 2 to 100,000,000 (a hundred million). ^ To test this hypothesis, let's see how fast it produces 100,000,000 instead of a million, once again using pages of 100,000. ^ GIMPS founder George Woltman said in a press release that the organization next will offer up a$150,000 award for the first person or group to find the first 100-million-digit prime number.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]



Generating prime numbers

.There is no known formula for primes which is more efficient at finding primes than the methods mentioned above.^ Prime squares composed by no more than two digits .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ Already some people are using keys that, in order to factor with the Number Field Sieve, would require more energy than exists in the known universe.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.There is a set of Diophantine equations in 9 variables and one parameter with the following property: the parameter is prime if and only if the resulting system of equations has a solution over the natural numbers.^ A prime number is a whole number that can be divided only by one and itself.
• Grid power: Sysadmin discovers 13-million-digit prime number 28 January 2010 1:41 UTC www.computerworld.com [Source type: General]

^ In fact, for all ranges below one trillion, we'd use only primes in the 0 to one million range.

^ Euler's Totient Function is denoted by the Greek letter phi, and is defined as follows: phi(N) = how many numbers between 1 and N - 1 which are relatively prime to N. Thus: .
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.This can be used to obtain a single formula with the property that all its positive values are prime.^ In fact, for all ranges below one trillion, we'd use only primes in the 0 to one million range.

^ I started off using the formulas Joe suggested relating to primes but found I kept coming up with the same or simlar answers to those already posted.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ Next I ran the non-paging program to produce all primes 2 to 1,000,000 (one million), saving the results to 0.pri , which is the prime factor input file used by the paging program.

.There is no polynomial, even in several variables, that takes only prime values.^ If you pick a value for N that is divisible by 2 or 3 (the prime factors of 12), then you will find that you will only hit certain numbers before you return to midnight, and the sequence will then repeat.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Until then, at least we have learned that there is a polynomial-time algorithm for all integers that both is deterministic and relies on no unproved conjectures!
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ This method is so fast that there is no reason to store a large list of primes on a computer--an efficient implementation can find them faster than a computer can read from a disk.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.However, there are polynomials in several variables, whose positive values (as the variables take all positive integer values) are exactly the primes (for an example, see formula for primes).^ Again all integers n > 1 which fail this test are composite; integers that pass it might be prime.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ Until then, at least we have learned that there is a polynomial-time algorithm for all integers that both is deterministic and relies on no unproved conjectures!
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ In 2002 a long standing question was answered: can integers be prove prime in "polynomial time" (that is, with time bounded by a polynomial evaluated at the number of digits).
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

.Another formula is based on Wilson's theorem mentioned above, and generates the number 2 many times and all other primes exactly once.^ Euler's Totient Function is denoted by the Greek letter phi, and is defined as follows: phi(N) = how many numbers between 1 and N - 1 which are relatively prime to N. Thus: .
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ On the other hand, 17, which is prime, results in 1 every time: .
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ An illustration: At the time of my writing, one of the largest general numbers that has been independently factored was the number used as the modulus for the RSA-140 challenge.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.There are other similar formulas which also produce primes.^ The paging program in this article uses the output of the page 0 producing program as its input -- in other words, as its prime factors.

^ It is guaranteed that there is no other way to break 1176 into prime factors.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

Distribution  The Ulam spiral. Black pixels show prime numbers.
Given the fact that there is an infinity of primes, it is natural to seek for patterns or irregularities in the distribution of primes. .The problem of modeling the distribution of prime numbers is a popular subject of investigation for number theorists.^ MR 2000e:11160 HL23 G. H. Hardy and J. E. Littlewood , "Some problems of `partitio numerorum' : III: on the expression of a number as a sum of primes," Acta Math.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ No memory problems, no need to pre-estimate the number of primes.

^ A new class of prime numbers that involve the popular Google search engine is explained.

.The occurrence of individual prime numbers among the natural numbers is (so far) unpredictable, even though there are laws (such as the prime number theorem and Bertrand's postulate) that govern their average distribution.^ For example, to find all the odd primes less than or equal to 100 we first list the odd numbers from 3 to 100 (why even list the evens?
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ From there, if you really enjoy prime numbers, you can venture out on the net to find truly optimized algorithms.

^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

Leonhard Euler commented
.Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the mind will never penetrate.^ Already some people are using keys that, in order to factor with the Number Field Sieve, would require more energy than exists in the known universe.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ If it's not too late, here it is: INSERT INTO Primes (p) SELECT s1.seq FROM Sequence s1 WHERE NOT EXISTS (SELECT 1 FROM Sequence s2 WHERE s2.seq BETWEEN 2 AND SQRT (s1.seq) AND s1.seq % s2.seq = 0) .
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ Few are the mathematicians who study creatures like the prime numbers with the hope or even desire for their discoveries to be useful outside of their own domain.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]


In a 1975 lecture, Don Zagier commented
.There are two facts about the distribution of prime numbers of which I hope to convince you so overwhelmingly that they will be permanently engraved in your hearts.^ There are two useful facts from Number Theory: .
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ Two dice to produce prime numbers .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ What about the 200 trillion you could run in a year -- how many prime factors would you need?

.The first is that, despite their simple definition and role as the building blocks of the natural numbers, the prime numbers grow like weeds among the natural numbers, seeming to obey no other law than that of chance, and nobody can predict where the next one will sprout.^ Prime numbers less than 2^18 .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ First primes embedded in the smallest number .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

.The second fact is even more astonishing, for it states just the opposite: that the prime numbers exhibit stunning regularity, that there are laws governing their behavior, and that they obey these laws with almost military precision.^ Of course, there are even more exotic ways to store primes.

^ Called Carmichael numbers , they are far more rare than the prime numbers -- but, like the primes numbers, there are still an infinite number of them.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]

^ Few are the mathematicians who study creatures like the prime numbers with the hope or even desire for their discoveries to be useful outside of their own domain.
• Prime Number Hide-and-Seek: How the RSA Cipher Works 28 January 2010 1:41 UTC www.muppetlabs.com [Source type: FILTERED WITH BAYES]


Euler noted that the function
n2 + n + 41
gives prime numbers for n < 40 (but not necessarily so for bigger n), a remarkable fact leading into deep algebraic number theory, more specifically Heegner numbers. .The Ulam spiral depicts all natural numbers in a spiral-like way.^ Integers The Way of the Locust: Reflections on the Nature of Intelligence and Information A look at the locust and how it knows primes numbers!

Surprisingly, prime numbers cluster on certain diagonals and not others.

The number of prime numbers below a given number  A chart depicting π(n) (blue), n / ln (n) (green) and Li (n), the offset logarithmic integral (red).
.The prime-counting function π(n) is defined as the number of primes up to n.^ We learned that the frequency of prime numbers decreases as the numbers go up, but they decrease at a decreasing rate, leveling off somewhere around an average of 1 out of 25.

^ Function test prime tod etermine if number is prime or not.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ This makes a lot of sense, because as candidate numbers go up, marking more numbers as composite, and therefore lessening the frequency of primes.

.For example π(11) = 5, since there are five primes less than or equal to 11. There are known algorithms to compute exact values of π(n) faster than it would be possible to compute each prime up to n.^ I think it would be beneficial to have another column in the sequence table, that houses Prime candidates, so you can not process numbers that you know will not be Prime, such as even numbers greater than 2.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ At the extreme, if the list of “MOD (seq, )” expressions goes to a value equal or higher than the upper limit we are looking at, we get the answer immediately.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ These probable primality tests can be combined to create a very quick algorithm for proving primality for integers less than 340,000,000,000,000.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Values as large as π(1020) can be calculated quickly and accurately with modern computers.
.For larger values of n, beyond the reach of modern equipment, the prime number theorem provides an estimate: π(n) is approximately n/ln(n).^ Prime factors k · 2 n + 1 of larger Fermat numbers F m .

^ If a modulo value exists between the current number and the lesser number, the number is not prime.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ No memory problems, no need to pre-estimate the number of primes.

.In other words, as n gets very large, the likelihood that a number less than n is prime is inversely proportional to the number of digits in n.^ We can test 100,000,000 numbers for primeness in less than a minute.

^ My observation in the 100,000,000 neighborhood is that about 1/20 of the numbers are prime, and that as the range gets higher, the frequency of primes decreases slightly.

^ In other words, to find all primes under 1,000,000, we create an array of char 1,000,001 long, filled with ones.

.Even better estimates are known; see for example Prime number theorem#The prime-counting function in terms of the logarithmic integral.^ The third chapter cover the classical primality tests that have been used to prove primality for 99.99% of the numbers on the largest known prime list .
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ I think it would be beneficial to have another column in the sequence table, that houses Prime candidates, so you can not process numbers that you know will not be Prime, such as even numbers greater than 2.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ Function test prime tod etermine if number is prime or not.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

.If n is a positive integer greater than 1, then there is always a prime number p with n < p < 2n (Bertrand's postulate).^ Space Astronomy The Goldbach Conjecture We are unsure about whether prime numbers greater than two can be expressed as the sum of two primes.

^ Hi, i'm a c beginner and have to write a programme to count the number of prime numbers less than 100,1000,10000,100000,1000000 respectively.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ In fact, I feel that everything should be type int, since "prime number" only makes since with integers.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

Gaps between primes

A sequence of consecutive integers none of which is prime constitutes a prime gap. .There are arbitrarily long prime gaps: for any natural number n larger than 1, the sequence (for the notation n!^ Prime numbers less than 2^18 .
• The Prime Puzzles and Problems Connection 16 September 2009 1:47 UTC www.primepuzzles.net [Source type: Reference]

^ Of course u and v must each be larger than the factoring bound B. With the above notation we can now state our final classical theorems.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ In previous sections we have pointed out if the factored portion of n -1 or of n +1 is larger than the cube root of n , then we can prove n is prime.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

n! + 2, n! + 3, …, n! + n
is a sequence of n − 1 consecutive composite integers, since
n! + m = m · (n!/m + 1) = m · [(1 · 2 · … · (m − 1) · (m + 1) … n) + 1]
is composite for any 2 ≤ m ≤ n. On the other hand, the gaps get arbitrarily small in proportion to the primes: the quotient
(pi + 1pi) / pi,
where pi denotes the ith prime number (i.e., p1 = 2, p2 = 3, etc.), approaches zero as i approaches infinity.

Open questions

The Riemann hypothesis

To state the Riemann hypothesis, one of the oldest, yet, as of 2010, unproven mathematical conjectures, it is necessary to understand the Riemann zeta function (s is a complex number with real part bigger than 1) $\zeta(s)=\sum_{n=1}^\infin \frac{1}{n^s} = \prod_{p ext{ prime}} \frac{1}{1-p^{-s}}.$
.The second equality is a consequence of the fundamental theorem of arithmetics, and shows that the zeta function is deeply connected with prime numbers.^ Now the first number left is 5, the second odd prime--cross out all of its multiples.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ For example, to find all the odd primes less than or equal to 100 we first list the odd numbers from 3 to 100 (why even list the evens?
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

^ It took about 24 seconds to write out the primes in the first 100,000,000 numbers, and it took less than 5 seconds to read, convert, convert and write them back.

For example, the fact (see above) that there are infinitely many primes can be read off from the divergence of the harmonic series: $\zeta(1) = \sum_{n=1}^\infin \frac{1}{n} = \prod_{p} \frac{1}{1-p^{-1}} = \infty.$
Another example of the richness of the zeta function and a glimpse of modern algebraic number theory is the following identity (Basel problem), due to Euler, $\zeta(2) = \prod_{p} \frac{1}{1-p^{-2}}= \frac{\pi^2}{6}.$
Riemann's hypothesis is concerned with the zeroes of the ζ-function (i.e., s such that ζ(s) = 0). .The connection to prime numbers is that it essentially says that the primes are as regularly distributed as possible.^ For instance, let's say we're testing prime candidates in pages of one million, and we're now testing numbers between one million and two million.

From a physical viewpoint, it roughly states that the irregularity in the distribution of primes only comes from random noise. .From a mathematical viewpoint, it roughly states that the asymptotic distribution of primes (about 1/ log x of numbers less than x are primes, the prime number theorem) also holds for much shorter intervals of length about the square root of x (for intervals near x).^ We can test 100,000,000 numbers for primeness in less than a minute.

^ Or any number multiplied by a number greater than the square root of the limit...
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ The prime factors of a given number (n) cannot be greater than ceiling (√n).
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

This hypothesis is generally believed to be correct. .In particular, the simplest assumption is that primes should have no significant irregularities without good reason.^ This method is so fast that there is no reason to store a large list of primes on a computer--an efficient implementation can find them faster than a computer can read from a disk.
• How to find primes and prove primality (merged version) 16 September 2009 1:47 UTC primes.utm.edu [Source type: Academic]

Other conjectures

.Besides the Riemann hypothesis, there are many more conjectures about prime numbers, many of which are old: for example, all four of Landau's problems from 1912 (the Goldbach, twin prime, Legendre conjecture and conjecture about n2+1 primes) are still unsolved.^ What about the 200 trillion you could run in a year -- how many prime factors would you need?

^ When it comes to memory usage, the quickest and most obvious improvement comes with the realization that each candidate number either is or is not prime, and that's all you need to know.

^ This makes a lot of sense, because as candidate numbers go up, marking more numbers as composite, and therefore lessening the frequency of primes.

.Many conjectures deal with the question whether an infinity of prime numbers subject to certain constraints exists.^ If a modulo value exists between the current number and the lesser number, the number is not prime.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

It is conjectured that there are infinitely many Fibonacci primes and infinitely many Mersenne primes, but not Fermat primes. .It is not known whether or not there are an infinite number of prime Euclid numbers.^ It is known from Dirichlet that a + nd, where n ≥ 0 series contains infinite number of primes.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ From there, if you really enjoy prime numbers, you can venture out on the net to find truly optimized algorithms.

.A number of conjectures concern aspects of the distribution of primes.^ Christian Goldbach conjectured on this aspect of prime number theory.

^ Space Astronomy The Goldbach Conjecture We are unsure about whether prime numbers greater than two can be expressed as the sum of two primes.

It is conjectured that there are infinitely many twin primes, pairs of primes with difference 2 (twin prime conjecture). Polignac's conjecture is a strengthening of that conjecture, it states that for every positive integer n, there are infinitely many pairs of consecutive primes which differ by 2n. .It is conjectured there are infinitely many primes of the form n2 + 1. These conjectures are special cases of the broad Schinzel's hypothesis H.^ We could make 2 a special case and just print it, not include it in the list of primes, start our candidates with 3, and increment by 2 every time.

^ These 2 primes comes from the n=0 cases of the 6n+2 and 6n+3 series.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

.April 2009" style="white-space:nowrap;">[citation needed] Brocard's conjecture says that there are always at least four primes between the squares of consecutive primes greater than 2. Legendre's conjecture states that there is a prime number between n2 and (n + 1)2 for every positive integer n.^ My logic is that I start a loop of all the numbers between the start and end, and inside that loop I take every number below my number from the first loop, and divide them.
• Prime Number Program 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ For instance, let's say we're testing prime candidates in pages of one million, and we're now testing numbers between one million and two million.

^ Hi, i'm a c beginner and have to write a programme to count the number of prime numbers less than 100,1000,10000,100000,1000000 respectively.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

It is implied by the stronger Cramér's conjecture.
.Other conjectures relate the additive aspects of numbers with prime numbers: Goldbach's conjecture asserts that every even integer greater than 2 can be written as a sum of two primes, while the weak version states that every odd integer greater than 5 can be written as a sum of three primes.^ Christian Goldbach conjectured on this aspect of prime number theory.

^ Space Astronomy The Goldbach Conjecture We are unsure about whether prime numbers greater than two can be expressed as the sum of two primes.

^ Hi, i'm a c beginner and have to write a programme to count the number of prime numbers less than 100,1000,10000,100000,1000000 respectively.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

Applications

.For a long time, number theory in general, and the study of prime numbers in particular, was seen as the canonical example of pure mathematics, with no applications outside of the self-interest of studying the topic.^ Christian Goldbach conjectured on this aspect of prime number theory.

^ Prime Numbers Roots of Geometry: Euclid Gives an explanation of Euclid's life and his contribution to modern mathematics.

^ Prime Numbers Late August Offers Prime Planetary Views, Photo Opportunities Late August is a prime time for viewing and photographing the planets of the solar system.

In particular, number theorists such as British mathematician G. H. Hardy prided themselves on doing work that had absolutely no military significance. .However, this vision was shattered in the 1970s, when it was publicly announced that prime numbers could be used as the basis for the creation of public key cryptography algorithms.^ Let's try finding prime numbers to a billion using a list of primes from 2 to 5 million: .

^ Indeed, the easiest way to do the first 200 billion is to start with the standard bit array paging algorithm using a factor array of 15 million primes.

^ The prime number algorithms you find in this document won't break any records.

.Prime numbers are also used for hash tables and pseudorandom number generators.^ Let's try finding prime numbers to a billion using a list of primes from 2 to 5 million: .

^ I think it would be beneficial to have another column in the sequence table, that houses Prime candidates, so you can not process numbers that you know will not be Prime, such as even numbers greater than 2.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

^ For the first attempt, let’s load the Primes table with candidate numbers using math fact #2 from above.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

.Some rotor machines were designed with a different number of pins on each rotor, with the number of pins on any one rotor either prime, or coprime to the number of pins on any other rotor.^ When it comes to memory usage, the quickest and most obvious improvement comes with the realization that each candidate number either is or is not prime, and that's all you need to know.

^ In other words, to find all primes under 1,000,000, we create an array of char 1,000,001 long, filled with ones.

^ The factors could be stored either in a different bitarray, or in an array of prime numbers.

This helped generate the full cycle of possible rotor positions before repeating any position.
.The International Standard Book Numbers work with a check digit, which exploits the fact that 11 is a prime.^ Here's the chunk of my code that checks for prime numbers.
• Prime Number Program 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ That means if the machines divide the work evenly (big if), the ten machines can store 2 trillion proven prime numbers before human intervention becomes necessary.

^ For the first attempt, let’s load the Primes table with candidate numbers using math fact #2 from above.
• Celko's Summer SQL Stumpers: Prime Numbers 28 January 2010 1:41 UTC www.simple-talk.com [Source type: FILTERED WITH BAYES]

Arithmetic modulo a prime p

Modular arithmetic is a modification of usual arithmetic, by doing all calculations "modulo" a fixed number n. All calculations of modular arithmetic take place in the finite set
{0, 1, 2, ..., n − 1}.
Calculating modulo n means that sums, differences and products are calculated as usual, but then only the remainder after division by n is considered. For example, let n = 7. Then, in modular arithmetic modulo 7, the sum 3 + 5 is 1 instead of 8, since 8 divided by 7 has remainder 1. Similarly, 6 + 1 = 0 modulo 7, 2 − 5 = 4 modulo 7 (since −3 + 7 = 4) and 3 · 4 = 5 modulo 7 (12 has remainder 5). Standard properties of addition and multiplication familiar from the number system of the integers or rational numbers remain valid, for example
(a + b) · c = a · c + b · c (law of distributivity).
In general it is, however, not possible to divide in this setting. For example, for n = 6, the equation
3 · x = 2 (modulo 6),
a solution .x of which would be an analogue of 2/3, cannot be solved, as one can see by calculating 3 · 0, ..., 3 · 5 modulo 6. The distinctive feature of prime numbers is the following: division is possible in modular arithmetic if and only if n is a prime.^ How would the calculations go with 15 million prime factors?  See the following: .

^ Solve Beautiful Numbers A simple rendition of what one can say about math.

^ In fact, for all ranges below one trillion, we'd use only primes in the 0 to one million range.

For n = 7, the equation
3 · x = 2 (modulo 7)
has a unique solution, x = 3. Equivalently, n is prime if and only if all integers m satisfying 2 ≤ mn − 1 are coprime to n, i.e., their greatest common divisor is 1. Using Euler's totient function φ, n is prime if and only if φ(n) = n − 1.
The set {0, 1, 2, ..., n − 1}, with addition and multiplication is denoted Z/nZ for all n. In the parlance of abstract algebra, it is a ring, for any n, but a finite field if and only if n is prime. A number of theorems can be derived from inspecting Z/pZ in an abstract way. For example Fermat's little theorem, stating that ap − a is divisible by p for any integer a, may be proved using these notions. .A consequence of this is the following: if p is a prime number other than 2 and 5, 1/p is always a recurring decimal, whose period is p − 1 or a divisor of p − 1.^ It took about 24 seconds to write out the primes in the first 100,000,000 numbers, and it took less than 5 seconds to read, convert, convert and write them back.

^ Hi, i'm a c beginner and have to write a programme to count the number of prime numbers less than 100,1000,10000,100000,1000000 respectively.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

^ That's because a number bigger than the square of the highest test factor could have factors above the topmost prime factor.

.The fraction 1/p expressed likewise in base q (rather than base 10) has similar effect, provided that p is not a prime factor of q.^ I believe that because prime frequency seems to approach 1 in 25 rather than 1 in 65535, consecutive primes varying by more than 65535 would be exceedingly rare.

^ That's because a number bigger than the square of the highest test factor could have factors above the topmost prime factor.

Wilson's theorem says that an integer p > 1 is prime if and only if the factorial (p − 1)! + 1 is divisible by p. Moreover, an integer n > 4 is composite if and only if (n − 1)! is divisible by n.

Other mathematical occurrences of primes

.Many mathematical domains make great use of prime numbers.^ Let's try finding prime numbers to a billion using a list of primes from 2 to 5 million: .

^ This makes a lot of sense, because as candidate numbers go up, marking more numbers as composite, and therefore lessening the frequency of primes.

^ In fact, I feel that everything should be type int, since "prime number" only makes since with integers.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

An example from the theory of finite groups are the Sylow theorems: if G is a finite group and pn is the highest power of the prime p which divides the order of G, then G has a subgroup of order pn. Also, any group of prime order is cyclic (Lagrange's theorem).

Public-key cryptography

Several public-key cryptography algorithms, such as RSA and the Diffie-Hellman key exchange, are based on large prime numbers (for example with 512 bits). They rely on the fact that it is thought to be much easier (i.e., more efficient) to perform the multiplication of two (large) numbers x and y than to calculate x and y (assumed coprime) if only the product xy is known.

Prime numbers in nature

Inevitably, some of the numbers that occur in nature are prime. There are, however, relatively few examples of numbers that appear in nature because they are prime.
One example of the use of prime numbers in nature is as an evolutionary strategy used by cicadas of the genus Magicicada. These insects spend most of their lives as grubs underground. They only pupate and then emerge from their burrows after 13 or 17 years, at which point they fly about, breed, and then die after a few weeks at most. .The logic for this is believed to be that the prime number intervals between emergences make it very difficult for predators to evolve that could specialise as predators on Magicicadas.^ In fact, I feel that everything should be type int, since "prime number" only makes since with integers.
• Prime Number Counting. Help!! 28 January 2010 1:41 UTC p2p.wrox.com [Source type: General]

 If Magicicadas appeared at a non-prime number intervals, say every 12 years, then predators appearing every 2, 3, 4, 6, or 12 years would be sure to meet them. Over a 200-year period, average predator populations during hypothetical outbreaks of 14- and 15-year cicadas would be up to 2% higher than during outbreaks of 13- and 17-year cicadas. Though small, this advantage appears to have been enough to drive natural selection in favour of a prime-numbered life-cycle for these insects.
There is speculation that the zeros of the zeta function are connected to the energy levels of complex quantum systems.

Generalizations

The concept of prime number is so important that it has been generalized in different ways in various branches of mathematics. Generally, "prime" indicates minimality or indecomposability, in an appropriate sense. For example, the prime field is the smallest subfield of a field F containing both 0 and 1. It is either Q or the finite field with p elements, whence the name. Often a second, additional meaning is intended by using the word prime, namely that any object can be, essentially uniquely, decomposed into its prime components. For example, in knot theory, a prime knot is a knot which is indecomposable in the sense that it cannot be written as the knot sum of two nontrivial knots. Any knot can be uniquely expressed as a connected sum of prime knots. Prime models and prime 3-manifolds are other examples of this type.

Prime elements in rings

Prime numbers give rise to two more general concepts that apply to elements of any ring R, an algebraic structure where addition, subtraction and multiplication are defined: prime elements and irreducible elements. An element p of R is called prime if it is not a unit (i.e., does not have a multiplicative inverse) and the following property holds: given x and y in R such that p divides the product, then p divides at least one factor. Irreducible elements are ones which cannot be written as a product of two ring elements that are not units. In general, this is a weaker condition, but for any unique factorization domain, such as the ring Z of integers, the set of prime elements equals the set of irreducible elements, which for Z is :
{…, −11, −7, −5, −3, −2, 2, 3, 5, 7, 11, …}.
A common example is the Gaussian integers Z[i], that is, the set of complex numbers of the form a + bi with a and b in Z. This is an integral domain, its prime elements are known as Gaussian primes. Not every prime (in Z) is a Gaussian prime: in the bigger ring Z[i], 2 factors into the product of the two Gaussian primes (1 + i) and (1 − i). Rational primes (i.e. prime elements in Z) of the form 4k + 3 are Gaussian primes, whereas rational primes of the form 4k + 1 are not. Gaussian primes can be used in proving quadratic reciprocity, while Eisenstein primes play a similar role for cubic reciprocity.

Prime ideals

In ring theory, the notion of number is generally replaced with that of ideal. Prime ideals, which generalize prime elements in the sense that the principal ideal generated by a prime element is a prime ideal, are an important tool and object of study in commutative algebra, algebraic number theory and algebraic geometry. The prime ideals of the ring of integers are the ideals (0), (2), (3), (5), (7), (11), … The fundamental theorem of arithmetic generalizes to the Lasker-Noether theorem which expresses any ideal in a Noetherian commutative ring as the intersection of primary ideals, which are the appropriate generalizations of prime powers.
Prime ideals are the points of algebro-geometric objects, via the notion of the spectrum of a ring. Arithmetic geometry also benefits from this notion, and many concepts exist in both geometry and number theory. For example, factorization or ramification of prime ideals when lifted to an extension field, a basic problem of algebraic number theory, bears some resemblance with ramification in geometry.

Primes in valuation theory

In algebraic number theory, yet another generalization is used. A starting point for valuation theory is the p-adic valuations, where p is a prime number. It tells what highest power p divides a given number n. Using that, the p-adic norm is set up, which, in contrast to the usual absolute value, gets smaller when a number is multiplied by p. The completion of Q (the field of rational numbers) with respect to this norm leads to Qp, the field of p-adic numbers, as opposed to R, the reals, which are the completion with respect to the usual absolute value. To highlight the connection to primes, the absolute value is often called the infinite prime. These are essentially all possible ways to complete Q, by Ostrowski's theorem.
In an arbitrary field K, one considers valuations on K, certain functions from K to the real numbers R. Every such valuation yields a topology on K, and two valuations are called equivalent if they yield the same topology. A prime of K (sometimes called a place of K) is an equivalence class of valuations.
Arithmetic questions related to, global fields such as Q may, in certain cases, be transferred back and forth to the completed fields (known as local fields), a concept known as local-global principle. This again underlines the importance of primes to number theory.

In the arts and literature

Prime numbers have influenced many artists and writers. The French composer Olivier Messiaen used prime numbers to create ametrical music through "natural phenomena". In works such as La Nativité du Seigneur (1935) and Quatre études de rythme (1949–50), he simultaneously employs motifs with lengths given by different prime numbers to create unpredictable rhythms: the primes 41, 43, 47 and 53 appear in one of the études. According to Messiaen this way of composing was "inspired by the movements of nature, movements of free and unequal durations".
In his science fiction novel Contact, later made into a film of the same name, the NASA scientist Carl Sagan suggested that prime numbers could be used as a means of communicating with aliens, an idea that he had first developed informally with American astronomer Frank Drake in 1975.
Many films reflect a popular fascination with the mysteries of prime numbers and cryptography: films such as Cube, Sneakers, The Mirror Has Two Faces and A Beautiful Mind, the latter of which is based on the biography of the mathematician and Nobel laureate John Forbes Nash by Sylvia Nasar. Prime numbers are used as a metaphor for loneliness and isolation in the Paolo Giordano novel The Solitude of Prime Numbers, in which they are portrayed as "outsiders" among integers.

Notes

1. ^ (sequence A000040 in OEIS).
2. ^ http://primes.utm.edu/notes/proofs/infinite/euclids.html
3. ^ GIMPS Home; http://www.mersenne.org/
4. ^ Riesel 1994, p. 36
5. ^ Conway & Guy 1996, pp. 129–130
6. ^ Derbyshire, John (2003). "The Prime Number Theorem". Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics. Washington, D.C.: Joseph Henry Press. p. 33. ISBN 9780309085496. OCLC 249210614.
7. ^ Gowers 2002, p. 118 "The seemingly arbitrary exclusion of 1 from the definition of a prime … does not express some deep fact about numbers: it just happens to be a useful convention, adopted so there is only one way of factorizing any given number into primes."
8. ^ ""Why is the number one not prime?"". Retrieved 2007-10-02.
9. ^ ""Arguments for and against the primality of 1".
10. ^ The Largest Known Prime by Year: A Brief History Prime Curios!: 17014…05727 (39-digits)
11. ^ Hardy 1908, pp. 122–123
12. ^ Letter in Latin from Goldbach to Euler, July 1730.
13. ^ Ribenboim 2004, p. 4
14. ^ Furstenberg 1955
15. ^ (Ben Green & Terence Tao 2008).
16. ^ (Lehmer 1909).
17. ^ The Top Twenty: Primorial
18. ^ The Top Twenty: Factorial
19. ^ The Top Twenty: Twin Prime Search
20. ^ "Record 12-Million-Digit Prime Number Nets \$100,000 Prize". Electronic Frontier Foundation. October 14, 2009. Retrieved 2010-01-04.
21. ^ "EFF Cooperative Computing Awards". Electronic Frontier Foundation. Retrieved 2010-01-04.
22. ^ Havil 2003, p. 163
23. ^ Havil 2003, p. 171
24. ^ Caldwell, Chris, The Top Twenty: Lucas Number at The Prime Pages.
25. ^ E.g., see Guy 1981, problem A3, pp. 7–8
26. ^
27. ^ Hardy 1940 "No one has yet discovered any warlike purpose to be served by the theory of numbers or relativity, and it seems unlikely that anyone will do so for many years."
28. ^ Goles, E., Schulz, O. and M. Markus (2001). "Prime number selection of cycles in a predator-prey model", Complexity 6(4): 33-38
29. ^ Paulo R. A. Campos, Viviane M. de Oliveira, Ronaldo Giro, and Douglas S. Galvão. (2004). "Emergence of Prime Numbers as the Result of Evolutionary Strategy". Phys. Rev. Lett. 93: 098107. doi:10.1103/PhysRevLett.93.098107. Retrieved 2006-11-26.
30. ^ "Invasion of the Brood". The Economist. May 6, 2004. Retrieved 2006-11-26.
31. ^ Ivars Peterson (June 28, 1999). "The Return of Zeta". MAA Online. Retrieved 2008-03-14.
32. ^ Schubert, H. "Die eindeutige Zerlegbarkeit eines Knotens in Primknoten". S.-B Heidelberger Akad. Wiss. Math.-Nat. Kl. 1949 (1949), 57–104.
33. ^ Eisenbud 1995, section 3.3.
34. ^ Hill, ed. 1995
35. ^ Carl Pomerance, Prime Numbers and the Search for Extraterrestrial Intelligence, Retrieved on December 22, 2007
36. ^ The music of primes, Marcus du Sautoy's selection of films featuring prime numbers.
37. ^ "Introducing Paolo Giordano". Books Quarterly.

References

Further references

• Hill, Peter Jensen, ed. (1995), The Messiaen companion, Portland, Or: Amadeus Press, ISBN 978-0-931340-95-6
• Kelly, Katherine E., ed. (2001), The Cambridge companion to Tom Stoppard, Cambridge University Press, ISBN 978-0-521-64592-8
• Stoppard, Tom (1993), Arcadia, London: Faber and Faber, ISBN 978-0-571-16934-4

Simple English

File:Prime
As an illustration: The number 12 is not prime, because a rectangle can be made, with sides of lengths 4 and 3. This rectangle has the surface of 12; This cannot be done with 11. No matter how the rectangle is arranged, there will always be a rest - 11 must therefore be a prime number.

A prime number is a positive, whole number that has exactly two distinct whole numbers that divide it with no remainder. These divisors are the number itself and 1.

For example, 7 is a prime number, because the only numbers that divide it evenly are 1 and 7. 91 is not prime because 1, 7, 13, 91 all divide it. 1 is not a prime number, since there is only one number that divides it with no leftover.

All positive numbers that are not prime are called composite numbers.

There is no biggest prime number, as there are infinitely many prime numbers. The way they are placed among all whole numbers is not understood very well, although mathematicians have some understanding of it. See the Prime number theorem.

How to find (small) prime numbers

There is a simple method to find a list of prime numbers. It was created by Eratosthenes, and has the name Sieve of Eratosthenes, because it catches some numbers that are not prime (like a sieve) and the rest of them that can get through are prime:

• On a sheet of paper, write all the whole numbers from 2 up to the number being tested. Do not write down the number 1, because it is not a prime number. 1 is not prime because it can be divided only by itself, and not by two different numbers.
• At the start, all numbers are not crossed out.

The method is always the same:

2. 2 is the first number on the sheet (one is not prime), so it must be prime.
3. Cross out all multiples of the last prime number that was found. All numbers crossed out are composites (not prime), and do not need to be checked any further.
The first time (2), cross out numbers 4, 6, 8, and so on. The second time (3), cross out numbers 6, 9, 12, and so on.
4. Go back to the start of the list, the first number that is not crossed out is a prime number.
5. Go on checking until there are no more numbers on the list. The numbers not crossed out are the prime numbers.

As an example, if this is done up to the number 10, the numbers 2, 3, 5 and 7 are prime numbers, and 4, 6, 8, 9 and 10 are composite numbers.

This method or algorithm takes too long to find very large prime numbers, but it is less complicated than methods used for very large primes, like Fermat's primality test or the Miller-Rabin primality test.

What prime numbers are used for

Prime numbers are very important in mathematics and computer science. Some real-world uses are given below. Since prime numbers are hard to find, most of the time numbers that are probably prime are used.[needs proof]

• Most people have a bank card, where they can get money from their account, using an ATM. This card is protected by a secret access code. Since the code needs to be kept secret, it cannot be stored in cleartext on the card. Encryption is used to store the code in a secret way. This encryption uses multiplications, divisions, and finding remainders of large prime numbers. An algorithm called RSA is often used in practice. It uses the Chinese remainder theorem.
• If someone has a digital signature for their email, encryption is used. This makes sure that no one can fake an email from them. Before signing, a hash value of the message is created. This is then combined with a digital signature to produce a signed message. Methods used are more or less the same as in the first case above.
• Finding the largest prime known so far has become a sport of sorts. Testing if a number is prime can be difficult if the number is large. The largest primes known at any time are usually Mersenne primes because the fastest known test for primality is the Lucas-Lehmer test, which relies on the special form of Mersenne numbers. A group that searches for Mersenne primes is here.

Citable sentences

Up to date as of December 14, 2010

Here are sentences from other pages on Prime number, which are similar to those in the above article.