
The idea that prime numbers had few applications outside of pure mathematics was shattered in the 1970s when public-key cryptography and the RSA cryptosystem were invented, using prime numbers as their basis. The search for ever larger primes has generated interest outside mathematical circles, through the Great Internet Mersenne Prime Search and other distributed computing projects. Since 1951 all the largest known primes have been found using these tests on computers. 1878), the Lucas–Lehmer primality test (originated 1856), and the generalized Lucas primality test. Methods that are restricted to specific number forms include Pépin's test for Fermat numbers (1877), Proth's theorem (c. Many mathematicians have worked on primality tests for numbers larger than those where trial division is practicably applicable. Another important 19th century result was Dirichlet's theorem on arithmetic progressions, that certain arithmetic progressions contain infinitely many primes. Although the closely related Riemann hypothesis remains unproven, Riemann's outline was completed in 1896 by Hadamard and de la Vallée Poussin, and the result is now known as the prime number theorem.

Ideas of Bernhard Riemann in his 1859 paper on the zeta-function sketched an outline for proving the conjecture of Legendre and Gauss. A simple but slow method of checking the primality of a given number n, proved in 1852 by Pafnuty Chebyshev. The property of being prime is called primality.

Primes are central in number theory because of the fundamental theorem of arithmetic: every natural number greater than 1 is either a prime itself or can be factorized as a product of primes that is unique up to their order. However, 4 is composite because it is a product ( 2 × 2) in which both numbers are smaller than 4. For example, 5 is prime because the only ways of writing it as a product, 1 × 5 or 5 × 1, involve 5 itself. A natural number greater than 1 that is not prime is called a composite number.

Composite numbers can be arranged into rectangles but prime numbers cannotĪ prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers.
