PPrime Number

Prime Numbers: Definition, Examples and How to Test Them

Prime Numbernoun

A prime number is a whole number greater than 11 whose only positive factors are 11 and itself, like 22, 33, 55 and 77.
p>1 and d∣p⇒d=1 or d=pp > 1 \text{ and } d \mid p \Rightarrow d = 1 \text{ or } d = p

A prime number is a whole number greater than 11 that can be divided evenly only by 11 and by itself.

That short rule sorts every whole number from 22 upward into two groups: primes, which cannot be broken into smaller factors, and the rest, which can. The sections below cover what the word means, why 11 is left out, how to test a number, and where primes quietly hold up modern life.

What is a prime number?

Take the number 77. Its only positive factors are 11 and 77, so it is prime. Take 99: it factors as 1×91 \times 9 and also 3×33 \times 3, so it has three factors and is not prime. In symbols, a prime pp satisfies the rule that if dd divides pp, then d=1d = 1 or d=pd = p.

The word comes from the Latin numerus primus, “first number.” The idea is that primes come first in the sense of being the original pieces: every other whole number above 11 is built by multiplying primes together. The ancient Greeks used a word with the same meaning, and the habit of calling them “first” has stuck for more than two thousand years.

The study of primes belongs to number theory, the branch of math about whole numbers and their patterns. Anything that is not prime and is larger than 11 is a composite number, which has at least one extra factor besides 11 and itself.

Why isn’t 1 a prime number?

The number 11 has exactly one positive factor, itself, and a prime needs exactly two. That is the quick answer. The deeper reason is that math works better without it. If 11 were prime, then 12=2×2×312 = 2 \times 2 \times 3 and 12=1×2×2×312 = 1 \times 2 \times 2 \times 3 would be different prime factorizations, and the clean statement “every number has exactly one prime factorization” would need an awkward exception.

Some textbooks and tables from the 1800s and early 1900s did count 11 as prime. Modern math settled the other way, and every current curriculum excludes it.

Two misconceptions go with this. The first is “all primes are odd.” The number 22 is prime and even, and it is the only even prime, because every larger even number is divisible by 22 and so has at least three factors. The second is “all odd numbers are prime.” Counterexamples such as 99, 1515, 2121 and 2727 show that oddness does not make a number prime.

Quick check

A whole number has exactly three positive factors. Which number could it be?

Prime numbers from 1 to 100

There are 25 prime numbers up to 100. Grouped by tens, they look like this:

  • 1 to 10: 2, 3, 5, 7
  • 11 to 20: 11, 13, 17, 19
  • 21 to 30: 23, 29
  • 31 to 40: 31, 37
  • 41 to 50: 41, 43, 47
  • 51 to 60: 53, 59
  • 61 to 70: 61, 67
  • 71 to 80: 71, 73, 79
  • 81 to 90: 83, 89
  • 91 to 100: 97

Primes thin out as numbers grow: four in the first ten, only one in the last ten. Still, there are 168168 primes below 10001000. A handy pattern is that numbers ending in 0, 2, 4, 6 or 8 are even, and those ending in 0 or 5 are divisible by 5, so every prime above 55 ends in 11, 33, 77 or 99. That narrows the search but does not finish it, since 2121, 2727, 3333 and 4949 end in those digits and are composite.

Some primes have extra personalities. The prime 77 is a happy number too: 7→49→97→130→10→17 \to 49 \to 97 \to 130 \to 10 \to 1, squaring and adding digits at each step.

Twin primes

Two primes that differ by 22 are called twin primes, such as 1111 and 1313, or 4141 and 4343. Nobody has yet proved whether there are infinitely many pairs.

Prime vs composite vs coprime: what is the difference?

Three words get mixed up constantly. A prime has exactly two factors. A composite number has more than two. “Coprime” is not a type of number at all: it describes a pair of numbers that share no factor except 11.

Term Meaning Example
Prime Exactly two positive factors 1313 (factors 11, 1313)
Composite Three or more positive factors 1212 (factors 1,2,3,4,6,121, 2, 3, 4, 6, 12)
Coprime pair Greatest common factor is 11 88 and 1515
Neither Zero or one factor pattern that fits no group 11 (and 00)

The pair 88 and 1515 shows why the distinction matters: neither number is prime, yet together they are coprime, because 8=238 = 2^3 and 15=3×515 = 3 \times 5 share no prime. Two different primes are always coprime, but coprime numbers do not have to be prime. Most confusion about “prime” questions on tests comes from treating these as the same idea.

How do you check whether a number is prime?

Number line showing primes to test up to the square root of 221 and factor 13 found
For 221, the prime 13 lies below √221 ≈ 14.9, so the test finds the factor pair 13 × 17 without checking larger divisors.

You do not need to test every smaller number. If a number nn factors as a×ba \times b, then at least one of aa or bb is at most n\sqrt{n}, because two factors both above n\sqrt{n} would multiply to more than nn. So you only try prime divisors up to the square root of nn.

  1. Estimate n\sqrt{n}.
  2. List the primes up to that estimate.
  3. Check whether nn is divisible by each one. Any exact division proves nn composite.
  4. If none divides it, nn is prime.

Three worked examples:

  • Is 91 prime? 91≈9.5\sqrt{91} \approx 9.5, so try 2,3,5,72, 3, 5, 7. Divisibility by 22, 33 and 55 fails, but 7×13=917 \times 13 = 91. It is composite, and it fools many people because it looks prime.
  • Is 101 prime? 101≈10.05\sqrt{101} \approx 10.05, so try 2,3,5,72, 3, 5, 7. It is odd, its digit sum is 22, it does not end in 00 or 55, and 7×14=987 \times 14 = 98 leaves remainder 33. It is prime.
  • Is 221 prime? 221≈14.9\sqrt{221} \approx 14.9, so try up to 1313. The tests for 22, 33, 55, 77 and 1111 all fail, but 13×17=22113 \times 17 = 221. Composite.

Try this: Decide whether 143143 is prime. Work out 143\sqrt{143}, list the primes below it, and test each one before checking the answer (11×1311 \times 13).

Quick check

To test whether 149149 is prime, what is the largest prime divisor you need to try?

Prime factorization: why primes are the building blocks

Every whole number above 11 is either prime or a product of primes, and the product is unique apart from order. This is the fundamental theorem of arithmetic. For example:

360=23×32×5360 = 2^3 \times 3^2 \times 5

You can check it: 8×9=728 \times 9 = 72 and 72×5=36072 \times 5 = 360. No other set of primes multiplies to 360360. A factor tree is the usual way to find such a breakdown: split the number into any two factors, then keep splitting until every branch ends in a prime.

Uniqueness is what makes primes useful. Writing numbers as products of primes lets you simplify fractions, find greatest common factors, and work out common multiples by comparing which primes each number contains. This is why the theorem, rather than the definition alone, explains why mathematicians care about primes.

Are there infinitely many prime numbers?

Yes, and Euclid proved it around 300 BCE in his Elements. The idea is a proof by contradiction (see reductio ad absurdum). Suppose the primes were a finite list. Multiply them all together and add 11. The result leaves remainder 11 when divided by any prime on the list, so its prime factors must be primes the list missed. That contradicts the assumption, so the list can never be complete. You can read more about the man behind it on the page for Euclid.

A common misconception is that the number built this way is itself prime. It often is not. Multiply the first six primes and add one:

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

The number 3003130031 is composite, yet its factors 5959 and 509509 are both new primes, which is all the proof needs.

Because primes never run out, there is no largest one, only a largest known one. At the time of writing it is 2^136,279,841 − 1, with 41,024,320 decimal digits, found by Luke Durant in October 2024. There is also no known simple formula that separates primes from composite numbers, which is why record hunters use special forms like Mersenne primes.

Long gaps between primes

The primes 113113 and 127127 are neighbors, with thirteen composite numbers (114114 through 126126) between them. Gaps between consecutive primes can be made as long as you like.

Quick check

Multiplying the first six primes and adding one gives 30031=59×50930031 = 59 \times 509. What does this show about Euclid's argument?

How are prime numbers written in textbooks?

There is no single symbol for “prime number.” Letters like pp and qq stand for an unspecified prime. The nnth prime gets a subscript: p1=2p_1 = 2, p2=3p_2 = 3, p3=5p_3 = 5, p4=7p_4 = 7. The set of all primes is often written P\mathbb{P}, or with set-builder notation as the set of natural numbers n>1n > 1 with exactly two positive divisors.

Two more pieces of notation appear in later courses. The statement p∣np \mid n reads ”pp divides nn.” The prime-counting function π(x)\pi(x) gives the number of primes less than or equal to xx, so π(100)=25\pi(100) = 25. This π\pi has nothing to do with the circle constant.

Terms vary by region too. US books say “greatest common factor” where UK books say “highest common factor,” and “relatively prime” is a second name for coprime. In abstract algebra, “prime” is stretched to include negative numbers: −3-3 counts as a prime element of the integers, though school math never uses that.

Where do prime numbers show up in real life?

Online security depends on them. RSA encryption multiplies two very large primes to make a public key. Multiplying is easy: 61×53=323361 \times 53 = 3233. Recovering the two primes from a product with hundreds of digits is so slow that it protects bank transfers and messages. Primes also set the sizes of hash tables in software, because prime sizes spread data evenly.

Nature has a possible example. Some cicadas emerge every 1313 or 1717 years, both prime. One explanation is that a prime cycle rarely lines up with the shorter cycles of predators, though this remains a hypothesis rather than a settled fact.

Here is the surprising part: the smallest prime, 22, and the largest known prime are linked by the same rule, and the rule is just two factors. Everything from a classroom factor tree to a 41-million-digit record comes from that one idea.

Common questions

Is 1 a prime number?

No. A prime needs exactly two different positive factors, and 11 has only one. Excluding it also keeps prime factorization unique, because otherwise 6=2×3=1×2×36 = 2 \times 3 = 1 \times 2 \times 3 would count as different factorizations.

What are the first 10 prime numbers?

The first ten primes are 2,3,5,7,11,13,17,19,23,292, 3, 5, 7, 11, 13, 17, 19, 23, 29. The next ones are 31,37,41,43,4731, 37, 41, 43, 47.

Why is 2 the only even prime number?

Every even number greater than 22 is divisible by 22, so it has at least three factors: 11, 22 and itself. Only 22 itself has just the two factors 11 and 22.

How many prime numbers are there between 1 and 100?

There are 2525. They run from 22 up to 9797, and 9797 is the last prime before 100100.

Is there a largest prime number?

No, there are infinitely many primes, so no largest one exists. The largest prime anyone has found so far is a Mersenne prime with 41,024,320 digits, discovered in October 2024.

See also