What makes a number prime
A prime is a whole number greater than 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11, 13 and so on. Every other whole number above 1 is composite and can be written as a product of primes in exactly one way, the fundamental theorem of arithmetic: 2026 = 2 × 1013, and 360 = 2³ × 3² × 5. The number 1 is neither prime nor composite, and 2 is the only even prime.
How to test by hand
To test n, try dividing by every prime up to √n. If none divides evenly, n is prime. For 97, √97 ≈ 9.8, so only 2, 3, 5 and 7 need checking, and none divides 97. This calculator uses the same trial division, which is exact and fast up to about 16 digits.
Facts about primes
Euclid proved around 300 BC that there are infinitely many primes. They thin out as numbers grow: about 1 in 7 numbers below 1,000 is prime, about 1 in 23 below a billion. Large primes secure the internet: RSA encryption relies on the fact that multiplying two large primes is easy, while factoring the product back is practically impossible.