A prime number is a positive integer whose only positive divisors are and . The first ten prime numbers are . In contrast, is a composite number because it has a positive divisor strictly between one and itself. The integer one is neither a prime number nor a composite number: the lower bound is part of the definition. Equivalently, the divisor function satisfies for a prime number, whereas and for every composite number .
Prime numbers are the building blocks of positive integers under multiplication. The fundamental theorem of arithmetic says that every integer greater than one is a product of prime numbers, with a unique collection of factors when their order is ignored. For example, and . Their common factors reveal the greatest common divisor , and the combined maximum powers reveal the least common multiple . A complicated divisibility question becomes a comparison of prime exponents.
There is also a useful finite test. If a composite number equals with , then . Therefore some prime factor is at most , and trial division only needs to check prime numbers up to that square root. For , checking suffices; none divides , so it is a prime number. For , the same test finds , giving . To find many prime numbers together, the sieve of Eratosthenes reuses the work by marking multiples.
The division with remainder calculations for make the test explicit:
Since , these are all the prime numbers at most its square root, and every remainder is nonzero. Thus the calculation certifies a prime number, without testing the integers individually. In contrast, gives a prime factor and proves that is a composite number.
The definition has a long history. Book VII of Euclid's Elements distinguishes prime numbers from composite numbers through their possible measures; Book IX, Proposition 20 establishes that no finite list exhausts the prime numbers. The modern argument under Euclid's theorem needs only divisibility, so it proves an infinite conclusion without estimating how frequently prime numbers occur. [ref] [ref].
A prime quadruplet is a set of four primes . For example, form a prime quadruplet. Testing candidates uses integer congruences to discard starting values for which one of the four entries has a small prime factor.
Two primes whose difference is , for example and . The name refers to the Latin word for six. The primes need not be consecutive.
A prime number expressible as for specified consecutive or nearly consecutive positive integers. The first kind has and therefore the form ; the second kind has and therefore the form . The first kind arises when a difference of two cubes is itself prime: the factorization forces for .
A prime number that remains prime after successively deleting digits from a specified end of its positional notation. Left truncation, right truncation, and requiring both are distinct conditions. For example, is truncatable from both ends: and consist entirely of prime numbers.
A prime number for which every cyclic rotation of its numerical digits is also a prime number. In decimal representation, is an example because are all prime numbers. A multi-digit circular prime can contain only : any other digit can be rotated into the units position and force divisibility by or .
Primality is the property of a positive integer being a prime number. Primality testing determines this property; integer factorization asks for factors and is a different computational task.
Trial division searches for divisors of an integer by testing candidate divisions. For primality testing of an integer , testing the prime numbers up to suffices: any composite number has a prime factor in that range. After finding a prime factor, repeated division removes its prime power, and testing the remaining quotient gives an elementary integer factorization method. This is useful for small inputs, but the number of candidates can grow rapidly with the input's digit count.
The sieve of Eratosthenes finds all prime numbers at most an integer . Start with the integers marked as candidates. For each surviving candidate in increasing order, mark the multiples up to as composite numbers. Stop processing candidates once : the surviving candidates are exactly the prime numbers. Starting at saves work because any smaller proper multiple of already has a smaller prime factor. [ref].
For a complete run with , the only prime numbers at most are , since . Exclude one before starting; it is not a prime number. The four marking passes are:
  • : mark , removing 29 candidates.
  • : mark . The nine newly removed candidates are ; the even integers were already marked.
  • : mark . Only are newly removed.
  • : mark . Only is newly removed.
There are surviving prime numbers:
The next surviving candidate is , and , so no further marking pass is necessary. A prime number used for marking remains a candidate: starting at never marks itself.
Figure 1.
Four passes of the sieve of Eratosthenes through 60 leave seventeen prime numbers
. Blue cells are newly marked composite numbers; gray cells were removed earlier. White cells are candidates in the first three panels, and green cells are the final prime numbers. The outlined cell identifies the prime number used for that pass. One is excluded throughout. Details.
The saving from starting at is justified by the smaller multiplier: if with , then has a prime factor , so has already marked . For , the earlier multiples have already been marked using or . The first new possibility is .
For , only the prime numbers need marking passes. They remove all the composite numbers, leaving 25 prime numbers. The diagram colors each composite number by its smallest prime factor, so it shows which marking pass removes it first. The excluded integer one is shown separately.
Figure 2.
The sieve of Eratosthenes leaves 25 prime numbers among the integers from one to 100
. Each colored composite number is assigned to its smallest prime factor, one of . The green survivors are prime numbers; one is neither a prime number nor a composite number. Details.
Why does the algorithm work? A surviving candidate cannot be a composite number, since its smaller prime factor would already have removed it. Conversely, marking proper multiples never removes a prime number. Every composite number at most has a prime factor at most , so no later pass is needed. The sieve of Eratosthenes is useful when an entire bounded list is wanted; primality testing of one large integer is a different computational task.
The historical name is supported by a surviving primary account: Nicomachus, in Book I, chapter 13 of Introduction to Arithmetic, names Eratosthenes and describes separating prime numbers from composite numbers by marking multiples among the odd integers beginning with three. That passage documents the sieve tradition; the bounded algorithm above and its starting rule are the formulation explained here, rather than instructions quoted from Euclid's Elements. [ref]
Assume that with implies . For a finite list of primes in that residue class, let be their product. Every prime divisor of is greater than three and satisfies that quadratic modular congruence, hence has residue one modulo six. None is listed because modulo a listed prime.
// Target: combinatorics.bigb
For any finite list of such prime numbers, let be their product. The integer has no listed prime divisor, nor the divisors . Its remaining prime factors have residues modulo six, and at least one has residue because their product has that residue. Thus no finite list is exhaustive.
// Target: number-theory.bigb
For every integer , there is a prime number strictly between and . This supplies cyclic prime moduli comparable to an integer interval's length in additive combinatorics.
Two primes differing by two form a twin-prime pair, for example or . The twin-prime upper bound using Bombieri–Vinogradov limits their number without proving there are infinitely many.
The conjecture asserts that infinitely many prime numbers have prime. The Hardy–Littlewood twin-prime asymptotic conjecture predicts their quantitative frequency and is stronger. The Selberg sieve supplies an upper bound of the predicted order but does not prove infinitude.
The local-density prediction for twin primes is the displayed asymptotic, with the twin-prime constant . It is stronger than infinitude alone. The Selberg sieve proves the correct order of magnitude as an upper bound, but the parity problem in sieve theory prevents its elementary majorant from proving this conjectured asymptotic.
// Target: analytic-number-theory.bigb
This positive convergent product corrects for the dependence of primality of and at each odd prime. The associated singular series is : the factor at two is two, and at an odd prime the local correction is . It appears in the Hardy–Littlewood twin-prime asymptotic conjecture and in upper bounds from the Selberg sieve.
// Target: analytic-number-theory.bigb
The sum of reciprocals of twin primes converges, whether or not there are infinitely many twin primes. The twin-prime upper bound from a quadratic sieve and reciprocal-sum convergence from a counting bound prove it. This contrasts with the Euler proof that the sum of reciprocals of primes diverges.
Apply the Selberg upper-bound sieve to the numbers with prime. For odd squarefree integers , the local count is and the density is . With sieve level , the normalizing sum is by the truncated Euler-product lower bound. The Selberg least-common-multiple weights have absolute values at most . The weighted arithmetic-progression error bound and Bombieri–Vinogradov theorem make their total error . Consequently the number of twin prime pairs with smaller member at most is .
There are infinitely many prime numbers. Indeed, for any finite list of prime numbers , the integer has a prime factor, by the fundamental theorem of arithmetic. None of the listed prime numbers divides , since each divides and a common divisor would divide . Thus no finite list contains all prime numbers. The constructed need not itself be a prime number.
For example, the first six prime numbers give
Both prime factors lie outside the original list, although is a composite number. The construction defeats a proposed complete list; it is not a formula guaranteed to produce a prime number. Book IX, Proposition 20 of Euclid's Elements explicitly considers both possibilities, prime and composite. [ref].
There are infinitely many primes in each of the classes one and three modulo four. For the first, a hypothetical finite list is contradicted by any prime divisor of : it is odd, not on the list, and admits a square root of minus one, so . For the second, is three modulo four; its prime factorization must include a prime that is three modulo four, and none of the listed primes divides it. These special congruence classes therefore admit elementary product-plus-or-minus-one arguments without the general theorem on primes in arithmetic progressions.
An odd prime is a prime number that is an odd integer. The only even number that is a prime number is , since every other positive even number has as a proper divisor. Thus every prime number greater than is an odd prime. There are infinitely many odd primes, by Euclid's theorem.
A Fermat prime is a Fermat number that is also a prime number:
The defining form alone does not imply primality. For example, is a Fermat prime, while is a Fermat number with proper divisors. For , every Fermat prime is one modulo four and two modulo three. Pépin's test gives an exact primality testing criterion for these candidates, rather than relying on their form.
For , Pépin's test says that the Fermat number is a prime number exactly when the displayed modular congruence holds. Modular exponentiation evaluates it by exponentiation by squaring without constructing the enormous ordinary power. The index restriction excludes , where the base itself is divisible by the candidate.[ref]
For a proof outline of sufficiency, any prime factor of a passing candidate gives multiplicative order exactly , a power of two: its half-power is , rather than . Fermat's little theorem forces , so , and hence . Conversely, for a prime candidate, ; quadratic reciprocity and Euler's criterion give the required half-power. At , the check is .
For a Fermat prime , the multiplicative group modulo has order . Its primitive roots are all quadratic nonresidues; since there are also nonresidues, the two sets coincide.
Every integer is a product of prime numbers, uniquely up to reordering the factors. More precisely, there are unique distinct prime numbers and unique positive integer exponents such that
In the header's displayed form, is the prime valuation, the exponent of in this prime factorization; it is zero when does not divide . Reordering or regrouping the prime factors does not give a different prime factorization.
For , repeated division gives , , , then , , and . Thus
Its nonzero prime valuations are , and . Recording only the distinct prime factors would lose the difference between and .
This turns divisibility into coordinatewise comparison of nonnegative exponents. A positive divisor of chooses an exponent from for , from for , and from for , giving positive divisors. The greatest common divisor takes the smaller exponent at each prime number; the least common multiple takes the larger. The theorem is a structural description, not an assertion that finding the factors of every large integer is computationally easy.
In general, for positive integers , the exact divisibility criterion is
For example, divides , with quotient , whereas does not: it requires four factors of two, but supplies only three. Both use only prime factors of , so membership in that list alone does not establish divisibility. Every positive divisor of is uniquely with , , . Sorted, all 24 positive divisors are
Thus the divisor function gives . These include divisors that are composite numbers, as well as the prime factors and one.
For another positive integer , the prime valuations give exact formulas for the greatest common divisor and least common multiple:
With and , their prime valuations at are and . The smaller exponents give , and the larger give , hence
Indeed, , , and . The same rules also explain : the smaller and larger exponents sum to the two original exponents. Here .
Figure 1. . The upper table compares exponents at the prime numbers for and , then takes their columnwise minimum and maximum. The lower tables enumerate for and ; each cell gives one positive divisor. Details.
The useful change of viewpoint is that multiplication becomes addition of prime valuations, , and divisibility becomes comparison. Many different-looking calculations therefore share one representation. The prime valuations are coordinates for multiplication, rather than digits in positional notation: they do not turn ordinary addition of integers into coordinatewise addition.
Different intermediate splits lead to the same prime ingredients. Starting with gives and ; starting with gives and . Continuing to split the composite numbers produces the same multiset of prime factors: three twos, two threes, and one five. The factorization tree records choices in the calculation, while the prime factorization records the invariant result.
Figure 2.
Two factorization trees for give the same prime factorization
. Details.
The proof outline explains the uniqueness. Existence follows by splitting a composite number into smaller factors until only prime numbers remain. For uniqueness, Euclid's lemma says that a prime factor of one product must divide one factor of any other prime product equal to it. That factor must be the same prime number; cancel it and repeat. The crucial divisibility step appears in Book VII, Proposition 30 of Euclid's Elements. [ref]
The ancient text supplies specific precursors to the modern statement: Book VII, Proposition 31 establishes that every composite number has a prime factor, and Book IX, Proposition 14 excludes any new prime factor from the least common multiple of given prime numbers. These are the propositions being cited, rather than the complete modern exponent formulation of the fundamental theorem of arithmetic. [ref] [ref]
Excluding one from the prime numbers keeps uniqueness meaningful: otherwise would give different collections of supposed prime factors. For , the natural convention is the empty product, equal to one, with no prime factors and all prime valuations zero.
For an integer with prime factorization , this is the sum of its prime factors with each repeated times. For example, . It differs from the sum of distinct prime factors.
The prime signature of is the multiset of positive prime exponents , conventionally sorted. For example, and both have signature . Quantities such as the divisor function and the number of ordered factorizations depend on this signature rather than the particular primes.
A factorization tree is a rooted tree whose root is an integer . Each nonleaf label is a composite number split into two factors greater than one whose product equals that label; the leaves are prime numbers. Multiplying the leaves recovers . Many factorization trees can have the same root, but the fundamental theorem of arithmetic gives them the same leaf multiset.
A prime factor of a nonzero integer is a prime number satisfying . For , the distinct prime factors are , while counting repeated factors gives six prime entries. A prime factorization retains their multiplicities: knowing only the distinct prime factors does not distinguish from . A negative integer has the same prime factors as its absolute value.
A prime power is a positive integer of the form , where is a prime number and is a nonnegative integer.

Ancestors (4)

  1. Number theory
  2. Area of mathematics
  3. Mathematics
  4. Home

Synonyms (1)

Discussion (0) New discussion

There are no discussions about this article yet.

Articles by others on the same topic (2)

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In other words, a prime number is only divisible by 1 and the number itself, meaning it cannot be divided evenly by any other integers. For example, the numbers 2, 3, 5, 7, 11, and 13 are all prime numbers.