Prime Numbers
A prime number is a whole number greater than 1 that has exactly two positive divisors: 1 and itself. Primes are the building blocks of all integers through multiplication.
Definition and Basic Properties
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Equivalently, its only positive divisors are 1 and the number itself.
The first several primes are 2, 3, 5, 7, 11, 13, 17, and 19. The number 2 is the only even prime; every other even number is divisible by 2 and therefore composite.
Why Primes Matter
Every integer greater than 1 can be written as a product of primes in exactly one way (ignoring order). This is the Fundamental Theorem of Arithmetic.
Primes appear throughout mathematics and computing: cryptography relies on large primes, sieve algorithms find them efficiently, and primality tests determine whether a number is prime without listing all factors.
Testing for Primality
To check whether a number n is prime, test divisibility by all primes up to √n. If none divide n evenly, n is prime.
For large numbers, specialized tests such as the Miller-Rabin test are used instead of trial division because checking every candidate divisor becomes impractical.
Examples
- 7 is prime because its only divisors are 1 and 7.
- 15 is not prime because 15 = 3 × 5.
- The prime factorization of 30 is 2 × 3 × 5.
FAQ
Is 1 a prime number?
No. By definition, primes must have exactly two positive divisors. The number 1 has only one positive divisor (itself), so it is neither prime nor composite.
Are there infinitely many primes?
Yes. Euclid proved around 300 BCE that no finite list of primes can include every prime. New primes continue to be discovered, especially through distributed computing projects.