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.

Characteristics 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:

  1. Sieves (e.g., sieve of Eratosthenes) to list primes up to a bound.
  2. Trial division for small cases and initial filtering.
  3. 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.