Prime number
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. This article explains definitions, properties, history, tests, distribution and applications.
A prime number is a positive integer greater than 1 that cannot be formed by multiplying two smaller positive integers. In other words, a prime has exactly two distinct positive divisors: 1 and the number itself. Numbers greater than 1 that are not prime are called composite numbers, while 1 is neither prime nor composite. The smallest prime is 2, which is also the only even prime; the next primes include 3, 5, 7, 11 and 13. For a basic list of small primes, see the examples below.
Image gallery
9 ImagesCharacteristics and basic facts
Primes are the building blocks of the positive integers because every integer greater than 1 can be expressed as a product of primes. This statement is formalized in the Fundamental theorem of arithmetic. That theorem ensures uniqueness of prime factorization up to the order of the factors. Some widely noted elementary properties include:
- 2 is the only even prime; all other primes are odd.
- If a number n has a divisor d with 1 < d < n, then n is composite; conversely, if no such d exists, n is prime.
- There is no largest prime: primes continue indefinitely, a fact first proved by Euclid.
Primality testing and distribution
Deciding whether a given large integer is prime is an important task in both pure and applied mathematics. Simple methods such as trial division test possible divisors up to the square root of the number. More efficient procedures include the sieve of Eratosthenes for generating many small primes and modern deterministic or probabilistic algorithms for large numbers. Commonly referenced tests include Fermat-based checks, the Miller–Rabin probabilistic test, and deterministic algorithms such as the AKS test. The study of how primes are distributed among the integers is a major topic: the prime number theorem gives an approximate density, saying roughly that the probability a random large integer n is prime is about 1 / log n.
History, conjectures and notable problems
Primes have been studied since antiquity. Euclid's proof of infinitely many primes is classical; later results include work on arithmetic progressions, twin primes, and special families like Mersenne primes. Some famous open questions remain: for example, the Goldbach conjecture asserts every even integer larger than 2 is the sum of two primes, and the twin prime conjecture predicts infinitely many prime pairs differing by 2. Large-scale searches continue to find ever-larger prime examples, especially among numbers with special forms.
Examples, methods and applications
Commonly used small primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Practical algorithms often rely on prime-related ideas: modern public-key cryptography depends on the difficulty of factoring large composite numbers into primes, and primes play roles in hashing, pseudo-random number generation, error-correcting codes and number-theoretic constructions. To find primes or test primality one might use:
- Sieves (e.g., sieve of Eratosthenes) to list primes up to a bound.
- Trial division for small cases and initial filtering.
- Probabilistic and deterministic primality tests for large numbers.
Because primes both underlie fundamental number theory and enable practical technologies, they remain central to mathematics. Readers who want a formal introduction to natural numbers and related terminology can consult resources on natural numbers and positive integers for background.
Further reading and technical treatments are available through specialized texts and online resources that survey prime distribution, factorization algorithms and historical developments.


Properties of prime numbers
Within the set of the natural numbers in that each of them has exactly two natural numbers as divisors.
With the exception of the number 2, all prime numbers odd, because all larger even numbers can be divided by (at least) 2 in addition to themselves and 1. Thus every prime number except 2 has the form
with a natural number
.
Each prime assigned to one of the two classes "prime of the form
" or "prime of the form
", where
is a natural number. Each prime
can also be assigned to one of the two classes "prime of the form
form
, where
is a natural number. Furthermore, any prime number has the
form p = 6
= 6
where
is a natural number. Furthermore, every prime number ends in
one of the four decimal digits 1 , 3
{\displaystyle According to the Dirichlet prime number theorem, there are infinitely many primes in each of these classes.
Every natural number of the form with a non-negative integer
contains at least one prime factor of the form
. A corresponding statement about numbers of the form
or prime factors of the form
is not possible.
A prime number written in the form a 2 +
integers a , b exactly when p {\displaystyle
form 4 k +
two-square theorem). In this case, the representation is essentially unambiguous, i.e. except for the order and sign of
. This representation corresponds to the prime factorisation
in the ring of whole Gaussian numbers.
The number -1 is a quadratic remainder modulo any prime number of the form and quadratic non-remainder modulo any prime number of the form
.
Moreover, a prime number written uniquely in the form a 2 +
integers a , b exactly when p {\displaystyle p}
form 3 k +
If a number any prime number 2 ≤ , then n {\displaystyle is
prime number (see section Prime number tests and article Trial division).
The little theorem of Fermat
→ Main article: Small Fermatian theorem
Let be a prime number. For every integer which is
not
divisible by holds (for notation see congruence):
For numbers not divisible by
the following formulation is equivalent:
There are numbers which are not prime numbers but nevertheless behave
like prime numbers to a base , i.e. it is
. Such
are called Fermatian pseudoprimes to base
. An which
is a Fermat pseudoprime with respect to all bases alien to it is called a Carmichael number.
In this context, the problem of Fermatian pseudoprimes becomes apparent: they are mistaken for prime numbers by a prime number test that uses Fermat's small theorem (Fermatian prime number test). However, if an encryption method such as RSA uses a composite number instead of a prime number, the encryption is no longer secure. Therefore, better prime number tests must be used for such procedures.
Euler and the Legendre Symbol
A simple consequence of Fermat's little theorem is the following statement: For every odd prime number and every integer
which is not
divisible by , either
or
One can show that the first case occurs exactly when there is a square number congruent to
modulo }
, see Legendre symbol.
Binomial coefficient
For primes and
together with the binomial theorem it follows
For integers this statement also follows directly from Fermat's little theorem, but it is also applicable, for example, to polynomials with integer coefficients; in the general context it corresponds to the fact that the mapping
in rings of characteristic
is a homomorphism, the so-called Frobenius homomorphism.
From Wilson's theorem ( is a prime number if and only if
) it follows that for every prime number
and every natural number
the congruence
is fulfilled.
Charles Babbage proved in 1819 that for every prime number congruence holds:
The mathematician Joseph Wolstenholme (1829-1891) then proved in 1862 that for every prime following congruence holds:
Giuga
From Fermat's little theorem it follows that for a prime number holds:
Example :
Giuseppe Giuga assumed that the reverse conclusion also applies, i.e. that a number with this property is always prime. It has not been clarified whether this assumption is correct. It is known, however, that a counterexample would have to have more than 10,000 decimal places. In connection with Giuga's conjecture, the Giuga numbers are examined.
Linear recursions
Fermat's little theorem can also be read in the form: In the sequence the
-th sequence member for a prime number is
always
divisible by Similar properties are possessed by other sequences of exponential character, such as the Lucas sequence (
) and the Perrin sequence (
). For other linear recursions, analogous but more complicated statements hold, for example for the Fibonacci sequence
If
a prime number, then
divisible
by ; where
the Legendre symbol.
Divergence of the sum of the reciprocals
→ Main article: Euler's theorem (prime numbers)
The series of reciprocals of the prime numbers is divergent. Thus applies:
.
This is equivalent to saying that the sequence defined by has no finite limit, which in turn means that for a sufficiently large chosen
any conceivable real number can be surpassed. This is perplexing at first, since the prime number gaps keep increasing on average. Mertens' theorem makes a statement about the exact growth behaviour of this divergent series.
Primality tests
→ Main article: Prime number test
Whether any natural number is prime can be found out with a prime number test. There are several such methods that rely on special properties of prime numbers. In practice, the Miller-Rabin test is most frequently used, which has an extremely short runtime but delivers false-positive results with a small probability. With the AKS prime number test, it is possible to decide on the primality without risk of error in polynomial running time. However, in practice it is significantly slower than the Miller-Rabin test.
Prime certificate
Finding out whether a natural number is prime or not can be very time-consuming. For every prime number, however, a chain of assertions can be given, which are all directly comprehensible, together prove the primality and whose total length is at most proportional to the square of the length of the prime number. Such a proof is called a primality certificate.
In the case of the composite (non-primal) nature of a number, the difference between proof and finding a proof is even more obvious: Two factors whose product gives the composite number are sufficient as proofs; finding a real divisor, however, can take a lot of effort.
Largest known prime number
In the fourth century BC, the Greek Euclid logically concluded that there are an infinite number of prime numbers; this statement is known as Euclid's theorem. Euclid gave a contradictory proof of the correctness of this theorem (Elements, Book IX, § 20): Starting from the assumption that there are only finitely many prime numbers, another number can be constructed that has a previously unknown prime number as a divisor or is itself a prime number, which is a contradiction of the assumption. Thus, a finite set can never contain all prime numbers, so there are infinitely many. Today, we know a whole series of proofs for Euclid's theorem.
Euclid's theorem states that there is no largest prime number. However, there is no known method that efficiently generates arbitrarily large prime numbers - that is why there has always been one largest known prime number ever since people have been concerned with prime numbers. Currently (as of December 2018), it is a number with 24,862,048 (decimal) digits, calculated on 7 December 2018. The discoverer Patrick Laroche received 3,000 US dollars for the find from the Great Internet Mersenne Prime Search project, which searches for Mersenne primes using distributed computing.
The largest known prime number was almost always a Mersenne prime, i.e. of the form since in this special case the Lucas-Lehmer test can be applied, a very fast prime number test compared to the general situation. When searching for large prime numbers, therefore, only numbers of this or a similarly suitable type are examined for primality.
List of record primes by year
| Number | Number of | Year | Discoverer (computer used) |
| 217−1 | 6 | 1588 | Cataldi |
| 219−1 | 6 | 1588 | Cataldi |
| 231−1 | 10 | 1772 | Euler |
| (259−1)/179951 | 13 | 1867 | Landry |
| 2127−1 | 39 | 1876 | Lucas |
| (2148+1)/17 | 44 | 1951 | Ferrier |
| 180·(2127−1)2+1 | 79 | 1951 | Miller & Wheeler (EDSAC1) |
| 2521−1 | 157 | 1952 | Robinson (SWAC) |
| 2607−1 | 183 | 1952 | Robinson (SWAC) |
| 21.279−1 | 386 | 1952 | Robinson (SWAC) |
| 22.203−1 | 664 | 1952 | Robinson (SWAC) |
| 22.281−1 | 687 | 1952 | Robinson (SWAC) |
| 23.217−1 | 969 | 1957 | Trickle (BESK) |
| 24.423−1 | 1.332 | 1961 | Hurwitz (IBM7090) |
| 29.689−1 | 2.917 | 1963 | Gillies (ILLIAC 2) |
| 29.941−1 | 2.993 | 1963 | Gillies (ILLIAC 2) |
| 211.213−1 | 3.376 | 1963 | Gillies (ILLIAC 2) |
| 219.937−1 | 6.002 | 1971 | Tuckerman (IBM360/91) |
| 221.701−1 | 6.533 | 1978 | Noll & Nickel (CDC Cyber 174) |
| 223.209−1 | 6.987 | 1979 | Noll (CDC Cyber 174) |
| 244.497−1 | 13.395 | 1979 | Nelson & Slowinski (Cray 1) |
| 286.243−1 | 25.962 | 1982 | Slowinski (Cray 1) |
| 2132.049−1 | 39.751 | 1983 | Slowinski (Cray X-MP) |
| 2216.091−1 | 65.050 | 1985 | Slowinski (Cray X-MP/24) |
| 391581·2216.193−1 | 65.087 | 1989 | "Amdahl Six" (Amdahl 1200) |
| 2756.839−1 | 227.832 | 1992 | Slowinski & Gage (Cray 2) |
| 2859.433−1 | 258.716 | 1994 | Slowinski & Gage (Cray C90) |
| 21.257.787−1 | 378.632 | 1996 | Slowinski & Gage (Cray T94) |
| 21.398.269−1 | 420.921 | 1996 | Armengaud, Woltman (GIMPS, Pentium 90 MHz) |
| 22.976.221−1 | 895.932 | 1997 | Spence, Woltman (GIMPS, Pentium 100 MHz) |
| 23.021.377−1 | 909.526 | 1998 | Clarkson, Woltman, Kurowski (GIMPS, Pentium 200 MHz) |
| 26.972.593−1 | 2.098.960 | 1999 | Hajratwala, Woltman, Kurowski (GIMPS, Pentium 350 MHz) |
| 213.466.917−1 | 4.053.946 | 2001 | Cameron, Woltman, Kurowski (GIMPS, Athlon 800 MHz) |
| 220.996.011−1 | 6.320.430 | 2003 | Shafer (GIMPS, Pentium 4 2 GHz) |
| 224.036.583−1 | 7.235.733 | 2004 | Findley (GIMPS, Pentium 4 2.4 GHz) |
| 225.964.951−1 | 7.816.230 | 2005 | Nowak (GIMPS, Pentium 4 2.4 GHz) |
| 230.402.457−1 | 9.152.052 | 2005 | Cooper, Boone (GIMPS, Pentium 4 3 GHz) |
| 232.582.657−1 | 9.808.358 | 2006 | Cooper, Boone (GIMPS, Pentium 4 3 GHz) |
| 243.112.609−1 | 12.978.189 | 2008 | Smith, Woltman, Kurowski et al. (GIMPS, Core 2 Duo 2.4 GHz) |
| 257.885.161−1 | 17.425.170 | 2013 | Cooper, Woltman, Kurowski et al. (GIMPS, Core2 Duo E8400 @ 3.00 GHz) |
| 274.207.281−1 | 22.338.618 | 2016 | Cooper, Woltman, Kurowski et al. (GIMPS, Intel i7-4790 @ 3.60 GHz) |
| 277.232.917−1 | 23.249.425 | 2017 | Jonathan Pace et al. (GIMPS, Intel i5-6600 @ 3.30 GHz) |
| 282.589.933−1 | 24.862.048 | 2018 | Patrick Laroche et al. (GIMPS, Intel i5-4590T @ 2.0 GHz) |
Distribution and growth
Pi function and prime number theorem
→ Main article: Prime number set
To examine the distribution of prime numbers, one considers, among other things, the function
,
which specifies the number of prime numbers ≤ and is also called the prime number counting function. For example
.
This function and its growth behaviour is a popular subject of research in number theory. Over time, some approximation formulas have been developed and improved.
The prime number theorem states that
holds, i.e. the quotient of the left and right sides for tends towards 1:
(see Asymptotic Analysis)
The Dirichlet prime number theorem, on the other hand, restricts the consideration to residue classes: Let be a natural number. If
an integer which is
not divisible from , then the arithmetic sequence
contain at most one prime number, because all sequence members are divisible by the greatest common divisor of
and
But if divisible by
then Dirichlet's prime number theorem states that the sequence contains infinitely many primes. For example, there are infinitely many primes of the form
and infinitely many of the form
(
passes through each of the non-negative natural numbers).
This statement can be further specified in the following form: It applies
where φ the Eulerian phi function. In this sense, therefore, for a fixed
in the residue classes
with
each case "equally many" prime numbers.
See also: Ulam spiral
Barriers
Bonse's inequality (proven) guarantees that the square of a prime number is smaller than the product of all smaller primes (from the fifth prime onwards).
According to the (unproven) Andrica's conjecture, the difference between the roots of the -th and the
-th prime is less than 1.
Prime number gaps
→ Main article: Prime number gap
The difference between two neighbouring prime numbers is called the prime number gap. This difference varies, and there are prime number gaps of any size. But there are also restrictions on the size of the gap depending on its location:
Bertrand's theorem ensures the existence of a prime number between any natural number and its double
.
According to Legend's (unproven) conjecture, there is always at least one prime number between and
.
Estimates of prime numbers and conclusions from the prime number theorem
In the following, let the sequence of prime numbers be denoted by .
Assessments
For indices following estimates apply
(1a)
(1b)
≥
(1c)
≥
(1d)
(1e)
≥
Conclusions from the prime number theorem
The prime number theorem gives the following results:
(2a)
(2b)
67 {\displaystyle
(2c)
For every positive real number there exists a sequence
of prime numbers with
.
(2d)
The set of quotients formed from all prime numbers is a dense subset of the set of all positive real numbers. I.e.: For any positive real numbers with
always prime numbers p , q {\displaystyle ,
such that
is fulfilled.
Generation of prime numbers
→ Main article: Prime number generator
One of the oldest algorithms for determining prime numbers is the sieve of Eratosthenes. To date, no efficient prime number generator is known. However, there are formulas for which there is a certain probability that the numbers generated are prime. Such numbers must be subsequently tested for their primality.
Special prime numbers and prime number constellations
- Prime number tuples
- Ulam spiral
Other special types of prime numbers can be found in Category:Prime number.
Generalisation
In ring theory, the concept of prime is generalised to the elements of any commutative unitary ring. The corresponding terms are prime element and irreducible element.
The prime numbers and their negatives are then exactly the prime elements and also exactly the irreducible elements of the ring of integers. In factorial rings, i.e. rings with unique prime factorisation, the terms prime element and irreducible element coincide; in general, however, the set of prime elements is only a subset of the set of irreducible elements.
Especially in the number-theoretically significant case of Dedekind rings, prime ideals take on the role of prime numbers.
Prime factorisation
→ Main article: Prime factorisation
The fundamental theorem of arithmetic applies: Every integer greater than one can be represented as a product of prime numbers, and this representation is unambiguous except for the order of the factors. They are called the prime factors of the number.
Because every natural number greater than zero can be represented by multiplying prime numbers, the prime numbers occupy a special atomic position in mathematics; in a sense, they "generate" all other natural numbers - one as an empty product. Alexander K. Dewdney described them as largely similar to the elements of chemistry.
From this it also becomes clear why it is inexpedient to define one as a prime number: It is the neutral element of multiplication and thus cannot produce any other numbers multiplicatively. It is not needed for the representation of numbers as a product of prime factors. If one were to count 1 as a prime number, the uniqueness of the prime factorisation would be lost, because one can append any number of ones to any decomposition without changing the value of the number.
A number of factorisation methods have been developed to determine the prime factors of general numbers or numbers of special form as quickly as possible. However, there is as yet no known method for efficiently factorising arbitrary numbers, i.e. in a time that grows at most polynomially with the length of the given number. The factorisation assumption states that such a method does not exist either.
Prime numbers in computer science
Prime numbers play an important role in information security and especially in the encryption of messages (see cryptography). They are often used in asymmetriccryptosystems such as public key encryption methods. Important examples are the Diffie-Hellman key exchange, the RSA cryptosystem, which is used in OpenPGP, among others, the Elgamal cryptosystem and the Rabin cryptosystem. Here, the keys are calculated from large, randomly generated prime numbers that must remain secret.
Such algorithms are based on one-way functions that can be executed quickly, but whose inversion is practically impossible to calculate with the currently known technology. However, new information technologies, for example quantum computers, could change this. The unsolved P-NP problem is related to this.
Prime numbers in nature
Some animal and plant species (e.g. certain cicadas or spruces) reproduce particularly strongly in cycles of prime numbers (approximately every 11, 13 or 17 years) to make it more difficult for predators to adapt to the mass occurrence.
Why 1 is not a prime number
For hundreds of years, mathematicians have been discussing whether the number is a prime number or not. The important mathematician Godfrey Harold Hardy, for example, called the number 1 a prime number as late as 1908, but no longer so by 1929 at the latest. In general, since the 20th century, most mathematicians have agreed that the number 1 should not be counted as a prime number.
The argument for 1 being a prime number is the following:
- 1 is only divisible by itself and 1.
Arguments against 1 not being a prime number are the following:
- A particularly important theorem in mathematics is the uniqueness of prime factorisation. For example, if
were a prime number, the composite number would have
many different prime factorizations, for example
.
Suddenly, every number would have an infinite number of different prime factorizations and one would have to formulate the prerequisites for this important theorem differently so that unambiguity is given again. The ambiguity results specifically in this context from the fact that the number 1 is the neutral element of multiplication, which makes its use here nonsensical.
- According to the definition, if you multiply two prime numbers together, you get a compositenumber, i.e. a number that consists of at least two (prime) factors. If 1 were a prime number, you could, for example, multiply it by a prime number and the product would again be a prime number and not a composite number. The definition of a composite number would therefore have to be much more complicated.
- Every prime number has exactly two divisors: the number 1 and itself.
has only one divisor and obviously does not fulfil this property, making this number different from all other primes.
- The sieve of Eratosthenes would not work, because one would first have to delete all multiples of 1, which would leave no other number except 1.
- For all primes
the Eulerian Phi function φ
. However, for
φ
. The theorem would therefore have to be reformulated and make 1 the exception.
- For all primes
the divisor function σ
. But for
σ
. It is also true σ
. But for
σ
. So the number 1 would be a big exception for this function(s) as well.
- The definition of prime elements would have to be reformulated if 1 were a prime number. The new definition would be more complicated.
- For every prime power there is a finite body that has exactly as many elements. If 1 were a prime number, there would also have to be a finite body with a single element. But this does not exist. You would have to change the definition of finite bodies.
There are other mathematical theorems about prime numbers that would also have to be reformulated if the number were a prime number.
The examples show that the set of prime numbers without a 1 is urgently needed - more urgently than the concept of prime numbers including the 1. Since there are always degrees of freedom in definitions, for the sake of economy of concepts, one has decided to exclude (besides the 0) the 1 (and somewhat more generally all units) from the prime numbers (or prime elements).
See also
- Prime factorisation
- Prime number test
- Gilbreath's guess
- Illegal prime number
- Permutable prime number
- Relatively primary
- Fast prime numbers
Questions and answers
Q: What is a prime number?
A: A prime number is a natural number that cannot be divided by any other natural numbers except for 1 and itself.
Q: What is the smallest composite number?
A: The smallest composite number is 4, because 2 x 2 = 4.
Q: What are the next prime numbers after 2?
A: The next prime numbers after 2 are 3, 5, 7, 11, and 13.
Q: Is there a largest prime number?
A: No, there is no largest prime number. The set of prime numbers is infinite.
Q: What does the fundamental theorem of arithmetic state?
A: The fundamental theorem of arithmetic states that every positive integer can be written as a product of primes in a unique way.
Q: What is Goldbach's conjecture?
A: Goldbach's conjecture is an unsolved problem in mathematics which states that every even integer greater than two can be expressed as the sum of two primes.
Q: Who recorded proof that there was no largest prime number?
A: Euclid recorded proof that there was no largest prime number.
Related articles
Author
AlegsaOnline.com Prime number Leandro Alegsa
URL: https://en.alegsaonline.com/art/79128

