Prime Numbers
The definition, and two common exceptions
A prime numberis a natural number greater than 1 whose only positive divisors are 1 and itself. A number greater than 1 that isn't prime is composite.
0 is neither prime nor composite: every number times 0 is 0, so 0 would have infinitely many factors, and primality requires a finite, specific set of divisors.
1 is also neither: a prime needs exactly two distinct divisors (1 and itself), but 1's only divisor is 1 itself, just one.
Worked example: checking primality
Is prime?
Solution: It's enough to test divisibility by every prime up to (2, 3, 5, and 7), since any factor larger than the square root would have to pair with one smaller than it, already caught. is odd (not divisible by 2), its digit sum 10 isn't divisible by 3, it doesn't end in 0 or 5 (not divisible by 5), but , so 91 is composite, not prime.
Twin primes
A pair of primes exactly 2 apart is called a twin prime pair, like or . The very first few pairs are .