arithmetic

Prime Number

A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself — that is, a number with exactly two distinct factors. The first primes are 2, 3, 5, 7, 11 and 13.

A prime number is a whole number greater than 11 whose only positive divisors are 11 and itself — equivalently, a number with exactly two distinct positive factors. 77 is prime because none of 2,3,4,5,62, 3, 4, 5, 6 divides it evenly. 88 is not, because 22 and 44 divide it as well, giving it four factors: 1,2,4,81, 2, 4, 8.

The primes below 100. There are exactly 2525 of them:

2,  3,  5,  7,  11,  13,  17,  19,  23,  29,  31,  37,  41,  43,  47,  53,  59,  61,  67,  71,  73,  79,  83,  89,  972,\; 3,\; 5,\; 7,\; 11,\; 13,\; 17,\; 19,\; 23,\; 29,\; 31,\; 37,\; 41,\; 43,\; 47,\; 53,\; 59,\; 61,\; 67,\; 71,\; 73,\; 79,\; 83,\; 89,\; 97

22 is the only even prime: every other even number is divisible by 22 in addition to 11 and itself, so it has at least three factors. Every prime after 22 is therefore odd — but the converse fails badly, since 99, 1515, 2121 and 5151 are all odd composites.

Why 11 is not a prime number. This is the single most common point of confusion. 11 has only one positive divisor — itself — not two, so it fails the definition outright. The deeper reason is the fundamental theorem of arithmetic: every integer greater than 11 factors into primes in exactly one way, apart from the order of the factors. For example

360=23×32×5.360 = 2^3 \times 3^2 \times 5.

If 11 counted as prime, that uniqueness would collapse: 360=1×23×32×5=12×23×32×5360 = 1 \times 2^3 \times 3^2 \times 5 = 1^2 \times 2^3 \times 3^2 \times 5, and so on without end. Excluding 11 is precisely what makes "the prime factorisation" a well-defined object. Mathematicians classify 11 separately as a unit.

Prime vs composite. A composite number is an integer greater than 11 that is not prime: it has at least one divisor other than 11 and itself, so it can be written as a product of two smaller positive integers. Every integer greater than 11 is either prime or composite, never both. 11 is neither prime nor composite, and 00 and the negative integers fall outside the classification entirely.

How to test a small number. Trial division is enough by hand: divide by each prime in turn and stop once the trial divisor exceeds n\sqrt{n}. The cut-off is valid because if n=a×bn = a \times b with both factors larger than n\sqrt{n}, their product would already exceed nn — so a composite number always has a factor at or below its square root.

Take n=97n = 97. Since 979.85\sqrt{97} \approx 9.85, you only need to test 2,3,5,72, 3, 5, 7. None of them divides 9797, so 9797 is prime.

Two shortcuts settle most cases quickly: a number is divisible by 22 if its last digit is even, and by 33 if its digits sum to a multiple of 33. That is why 5151 is not prime — 5+1=65 + 1 = 6 is a multiple of 33, and indeed 51=3×1751 = 3 \times 17. The same trap catches 91=7×1391 = 7 \times 13 and 87=3×2987 = 3 \times 29, both of which look prime at a glance. For larger inputs, the prime number checker runs the test and reports the divisor it finds.

There are infinitely many primes. Euclid proved this more than two thousand years ago. Suppose you had a finite list p1,p2,,pkp_1, p_2, \dots, p_k containing all the primes, and form

N=p1p2pk+1.N = p_1 p_2 \cdots p_k + 1.

Dividing NN by any prime on the list leaves a remainder of 11, so none of them divides NN. But N>1N > 1, so NN has at least one prime factor — and that factor cannot be on the list. No finite list can ever be complete. Note the careful wording: NN itself need not be prime. Using the first six primes, 2×3×5×7×11×13+1=30031=59×5092 \times 3 \times 5 \times 7 \times 11 \times 13 + 1 = 30031 = 59 \times 509; both of those primes were simply missing from the list.

Primes do thin out as numbers grow. The prime number theorem states that the count of primes below xx is approximately x/lnxx / \ln x, so primes near xx occur with density roughly 1/lnx1 / \ln x — sparser and sparser, but never exhausted.

Where primes matter. Prime factorisation is the machinery behind reducing fractions to lowest terms, computing greatest common divisors and least common multiples, and simplifying radicals. In computing, the difficulty of factoring a large number back into its primes is the security assumption underneath RSA encryption, and primes are used as moduli in hash tables and pseudorandom generators. The open questions about them — the twin prime conjecture, Goldbach's conjecture, the Riemann hypothesis — remain among the most famous unsolved problems in mathematics.