# Prime number

**Prime numbers**are those natural numbers that are divisible by only 1 and itself. The only even prime number is 2. There is no upper limit to the quantity of primes, but there is no known formula for deriving the nth prime. Leonhard Euler once 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.

The probability that a random integer N is prime is roughly 1/ln(N), where ln(N) is the natural logarithm (base *e*) of N.^{[1]} This is a formulation of a more general statement known as the prime number theorem.

## Contents

## The Prime Numbers

The smallest prime numbers are 2, 3, 5, 7, 11, 13... . An example of a composite number is 6, which is evenly divisible by both 2 and 3.

It is easy to prove that there are an infinite number of primes using Euclid's second theorem. If there were a finite number of primes, you could multiply them all together and add 1. The resulting number would show the existence of a new prime, since it would not be divisible by any smaller prime (it would always have a remainder of 1).

To construct a table of all prime numbers less than *n*, you would use a method called the Sieve of Eratosthenes. Simply write down an ordered list of all counting numbers greater than 1. Beginning with 2*2 = 4, cross out every second number:

- 2 3
~~4~~5~~6~~7~~8~~9~~10~~11 ...

then beginning with 3*3 = 9 cross out every third number:

- 2 3
~~4~~5~~6~~7~~8 9 10~~11 ...

Beginning with 5*5 = 25, cross out every fifth number, then repeat for the primes 7, 11, 13, etc. until .

## Unique Factorization

It was proved by Carl Friedrich Gauss that every positive integer has a unique factorization into prime numbers, this result is known as the fundamental theorem of arithematic.

## Primality testing

To determine whether a number is prime, you can use the trial division method, provided the number you are testing is not too large. Let *N* be the number being tested and *s* be its square root. Divide *N* by each number in the prime table, beginning with 2. If there is no remainder, stop--N is composite. Otherwise, test again with the next largest prime in the table. If the next largest prime is greater than *s*, stop--*N* is prime.

For larger values of *N*, a method based on Fermat's theorem can be used, though it usually requires a computer. Start with the number 1, and double it *N-1* times. Divide this number by *N*, keeping only the remainder. If the remainder is greater than 1, *N* is composite. Unfortunately, the converse is not true--if the remainder is 1, *N* is *probably* prime, but not necessarily. Algorithms which improve on this method exist, and primality testing is today an active subject of mathematical research.

## The Largest Known Prime

The largest known prime is *2 ^{32582657}-1*; it was discovered by the

**Great Internet Mersenne Prime Search**(

**GIMPS**)

^{[2]}, a distributed computing project launched by George Woltman in early 1996.

^{[3]}

## Mersenne Prime

A **Mersenne prime** is a prime number *M* that is of the form *M = 2 ^{n} − 1*, where

*n*is some

**prime number**

^{[4]}. As of April, 2007, only 44 Mersenne Primes have been found. The largest known prime

*2*, is a Mersenne Prime. The concept of a Mersenne Prime was discovered by the French theologian, philosopher and mathematician Marin Mersenne.

^{32582657}-1## Riemann hypothesis

Most mathematicians believe a proof of the Riemann hypothesis is the best hope for discovering some pattern in the distribution of prime numbers. *The Clay Mathematics Institute* has offered a one million dollar prize for a proof of the Riemann hypothesis.^{[5]}

## Cryptography

The security of public-key cryptography schemes such as RSA depend on the difficulty of prime factorization, if a pattern in the distribution of prime numbers is discovered, then such cryptographic schemes could become vulnerable to attack.

## References

- ↑ http://home.att.net/~numericana/answer/primes.htm
- ↑ http://www.mersenne.org/
- ↑ http://primes.utm.edu/largest.html
- ↑ Mersenne Prime from Wolfram
- ↑ http://www.claymath.org/millennium/Riemann_Hypothesis/