Jump to content

Prime number

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by AxelBoldt (talk | contribs) at 10:32, 2 April 2002 (detail about sum of reciprocals of primes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A prime number, or prime for short, is a natural number larger than 1 that has as its only positive divisors (factors) 1 and itself. The first 20 prime numbers are

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71.

If a number greater than one is not a prime number then it is called a composite number. Integers are considered to be prime if they are either a prime natural number or the negative of one.

Representing natural numbers as products of primes

An important result is the fundamental theorem of arithmetic, which states that every natural number can be written as a product of primes, and in essentially only one way. Primes are thus the "basic building blocks" of the natural numbers. For example, we can write

23244 = 22 · 3 · 13 · 149.

How many prime numbers are there?

There are infinitely many prime numbers. The oldest known proof for this statement dates back to the Greek mathematician Euclid:

Assume that there is only a finite number of primes. If you multiply all the primes together, and add one, the resulting number, when divided by any of the primes, has a remainder of one. Therefore it cannot be divided by any of what were supposedly all the primes, and it must be another prime, or divisible by a prime that we have omitted from our list of all the primes. We arrive at a contradiction, so our original assumption (that there is a finite number of primes) must be false. So there are an infinite number of primes.

Some mathematicians gave their own proofs as for example Kummer, probably the most elegant one and Furstenberg with topological terms.

Even though the total number of primes is infinite, one could still ask "how many primes are there below 100,000" or "How likely is a random 100-digit number to be prime?" Questions like these are answered by the prime number theorem.

Finding prime numbers

An efficient way to compute a list of all the prime numbers up to a given limit is the algorithm called the "Sieve of Eratosthenes". To find all prime numbers between 1 and n:

  1. Write down the numbers 2, 3, 4, ... n. We will eliminate composites by marking them. Initially all numbers are unmarked.
  2. Find the smallest number in the list that has not yet been identified as composite or prime. (The first number so found is 2.) Call it m and mark it as prime.
  3. Mark all multiples of m (2m, 3m, 4m, ...) as composite.
  4. Go back to step 2 and repeat with the next smallest number. Stop if every number in the list has been marked composite or prime.

A large random number (say, up to a few thousand digits), can be partly tested for primality with Fermats little theorem or the Miller-Rabin test. Other primality tests are also possible. These probabilistic tests typically work by picking a random number (a witness), and checking some formula involving the witness and the potential prime. These tests are not perfect. For a given test, there may be some composite numbers that will be declared "probably prime" no matter what witness is chosen. Such numbers are called pseudoprimes for that test.

Some properties of primes

  • If p is a prime number and p divides a product ab of integers, then p divides a or p divides b.
  • The ring Zn (see modular arithmetic) is a field if and only if n is a prime.
  • The characteristic of every field is either zero or a prime number.
  • If p is prime and a is any integer, then ap - a is divisible by p (Fermat's little theorem).
  • 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. (Sylow theorems)
  • If p is prime and G is a group with pn elements, then G contains an element of order p.
  • An integer p>1 is prime if and only if the factorial (p-1)! + 1 is divisible by p (Wilson's theorem). Conversely, an integer n>4 is composite if and only if (n-1)! is divisible by n.
  • If n is a positive integer, then there is always a prime number p with n < p ≤ 2n (Bertrand's postulate).
  • Adding the reciprocals of all primes together results in a sum of infinity. More precisely, if S(x) denotes the sum of the reciprocals of the prime number ≤ x, then S(x) = Θ(ln(ln(x))) for x → ∞ (see Big O notation).

Some special types of primes

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 · 11 · ... of all the primes ≤ n. A prime is called factorial if it is of the form n! ± 1. The first factorial primes are:

n!+1 is prime for n = 3, 4, 6, 7, 12, 14, 30, 32, 33, 38, 94, 166,...
n!-1 is prime for n = 1, 2, 3, 11, 13, 27, 37, 41, 73, 77, 116, 154...

The largest known primorial prime is Π(24029) + 1, found by Caldwell in 1993. The largest known factorial prime is 3610! - 1 [Caldwell, 1993]. It is not known if there are infinitely many primorial or factorial primes.

The base-ten digit sequence of a prime can be a palindrome, as in the prime 1031512 + 9700079 · 1015753 + 1.


Prime gaps

The gap between the n-th prime pn and the n+1-st prime pn+1 is defined to be the number of composite numbers between them, i.e. gn = pn+1 - pn - 1 (slightly different definitions are sometimes used). We have g1 = 0 and g2 = 1. The sequence (gn) of prime gaps has been extensively studied by many mathematicians, starting with Euclid.

We say that gn is a maximal gap if gm < gn for all m < n. The largest known maximal gap is 1131, found by T. Nicely and B. Nyman in 1999. It is the 64th biggest maximal gap.

Formulas yielding prime numbers

The curious polynomial f(n) = n2 - n + 41 yields primes for n = 0,..., 40, but f(41) is composite. There is no polynomial which only yields prime numbers in this fashion.

There exists a polynomial in 26 variables with integer coefficients such that, if you plug in integers for the variables, the set of positive values is equal to the set of prime numbers. However, for some values of the variables, the result is negative and can then be composite.

The following function yields all the primes, and only primes, for natural numbers n:

      f(n) = 2 + ((2(n!+1)2-2)  mod (n+1))

This formula is based on Wilson's theorem mentioned above; two is generated many times and all other primes are generated exactly once by this function.

Using the floor function [x] (defined to be the largest integer less than or equal to the real number x), one can construct several formulas for the n-th prime. These formulas are also based on Wilson's theorem and have little practical value: the methods mentioned above under "Finding prime numbers" are much more efficient.

Define

             m    sin2(π*(j-1)!2/j)
      π(m) = ∑   ------------------- 
            j=2      sin2(π/j)

or alternatively

             m
      π(m) = ∑ [ ((j-1)! + 1)/j - [(j-1)!/j] ]
            j=2

or alternatively

                   m
      π(m) = 1  +  ∑ ( (j-2)! - j[(j-2)!/j] )
                  j=3

All these definitions are equivalent, and the n-th prime number pn can then be written as

              2n
      pn = 1 + ∑  [ [ n/(1 + π(m)) ]1/n ]
              m=1

Another approach does not use factorials and Wilson's theorem, but also heavily employs the floor function: first define

                     k         [√j]
     G(k) = k - 1 +  ∑  [ (2 + 2 ∑ ([(j-1)/s] - [j/s]) ) / j ]                 
                    j=2         s=1

and then

               2([nln(n)]+1)
      pn = 1   +     ∑     ( 1 -  [G(k)/n]).
                    k=1

The largest known prime

The largest known prime is 213466917-1 (this number is 4,053,946 digits long). It is the 39th Mersenne prime M13466917 found by a collaborative effort known as GIMPS on November 14 2001 and announced in early December 2001 after double checking.

The next largest known is 26972593-1, (this number is 2,098,960 digits long), also a Mersenne prime, found by GIMPS on June 1 1999.

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]. In fact, as a publicity stunt against the Digital Millennium Copyright Act and other WIPO Copyright Treaty implementations, some people have applied this to various forms of DeCSS code, creating the set of illegal prime numbers. Such numbers, when converted to binary and executed as a computer program, perform acts encumbered by applicable law in one or more jurisdictions.


Applications

Extremely large prime numbers (that is, greater than 10100) make public key cryptography possible. Primes are also used for hash tables and pseudorandom number generators.

Open Questions

There are many open questions about prime numbers. For example:


Generalizations

The concept of prime number is so important that it has been generalized in different ways in various branches of mathematics. In number theory itself, one talks of pseudoprimes, integers which, by virtue of having passed a certain test, are considered probable primes but are in fact composite (such as Carmichael numbers). To model some of the behavior of prime numbers, one defines prime and irreducible polynomials. More generally, one can define prime and irreducible elements in every integral domain. Prime ideals are an important tool and object of study in commutative algebra and algebraic geometry.


See also