Concept stop · What is it?

Primes and Composites

In the Chinese book: 素数与合数

Sieve out multiples round by round; what is left is prime. Stop at √N.

📖 §1.2 of 《整除、同余与不定方程》M13 Prime Factor Analysis line

Before this stop, visit:Divisibility: Definitions and Basic Properties (Concept)

Hands first, words secondPress “Cross out multiples of …” again and again. After how many presses does the button say “Done”?

Loading figure…

Try this

  1. Sieving with crosses out a huge chunk. Then sieve with : among the numbers crossed out for the first time in this round, which is the smallest? What about sieving with and with ?
  2. The smallest number crossed out for the first time is always . Why are the smaller multiples , , … already gone?
  3. After sieving with , the button stops working. The next prime is , but is already past .
  4. Set to and sieve again. Which extra prime did you need this time? Why only that one?

An integer greater than whose only positive divisors are and itself is called a prime; otherwise it is called composite. is neither.

Predict first

To decide whether is prime by dividing by primes, what is the largest prime you need to try?

Choose an answer first; then you can see the result.

Why

“You only need to go up to ” rests on this small fact.

A composite n has a prime factor no bigger than √n

Step 1 / 5
Loading figure…
  1. A composite splits into two numbers

    Let be composite. It has a divisor other than and , so with .

Do the primes ever run out?

Can the sieve go on forever? Or is there some point after which there are no more primes?

Predict first

Multiply the first six primes and add : . Is it prime?

Choose an answer first; then you can see the result.

Practice

Exercise 1Basic

List all the primes between and .

Exercise 2Basic

How many of the four numbers , , , are prime?

Exercise 3Advanced

is a prime such that and are also prime. Find .

Exercise 4Challenge

Find all positive integers such that is prime.

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

Calling 1 a prime

The wrong step: is divisible only by and itself, so is prime.
What went wrong? Think first, then open

Diagnosis A prime must have exactly two different positive divisors, and has only one. More importantly: if counted as a prime, then , and factorization would no longer be unique.

The right step: The positive integers fall into three groups: ; the primes (greater than , with only the two positive divisors and itself); and the composites. is a group of its own.

“1 is neither prime nor composite”

Exhibit

Trying only 2, 3 and 5

The wrong step: is odd, its digit sum is not divisible by , and it does not end in or , so is prime.
What went wrong? Think first, then open

Diagnosis , and the primes up to that are . The was never tried, and .

The right step: To decide whether is prime, try every prime up to .

“Go all the way up to the square root, and skip none”

Exhibit

Thinking “product of primes plus 1” is always prime

The wrong step: is not divisible by the first six primes, so it is prime.
What went wrong? Think first, then open

Diagnosis . It is only guaranteed not to be divisible by . Nobody promised it is not divisible by a bigger prime.

The right step: Euclid's argument only says that the prime factors of this number are not on the original list. That is already enough to show the list is incomplete.

“Claim only what your proof actually uses”