Step 3 / 64

Middle school

Prime numbers

A prime is at least two and has no positive divisors except one and itself.

Start with a concrete example

Arrange 6 sweets in equal rows: 1×6 and 2×3 both work. For 5 sweets, only 1×5 works (apart from reversing the rows). That is why 5 is prime and 6 is not.

A small check: try the idea

Think with the concrete example above. You can try again.

Is 6 prime?

Read the answer and reasoning

No; 6=2×3. Six sweets fit in two rows of three. A prime has no such factorization with both factors greater than 1.

Build the idea in three steps

  1. A divisor divides a number exactly, without a remainder.
  2. A prime has exactly two positive divisors: one and itself. It must therefore be at least two.
  3. Splitting an exponent into prime factors helps reduce FLT to fewer kinds of cases; the exponent-four case also has a separate role.

A small example

5 is prime. 6 is not: 6 = 2 × 3. One is not prime.

Lean definition · original excerpt

Mathlib · db584cd · Defs.lean

def Prime (p : ℕ) :=  Irreducible p 

How to read this Lean

The library defines Nat.Prime through the predicate Irreducible on natural numbers. Here that means a number with no nontrivial multiplicative factorization; it is distinct from irreducibility of a representation.

Where this idea is used

1. The impossible order2. The case of three3. Too many suspects4. The suitcase diet5. The suspicious parcel6. The scissors incident7. The veterans’ cabinet8. The secret duet9. Two doors to the concert10. A three-note audition11. Borrow a better passport12. The workshops agree13. Pip’s impossible quilt14. The shrinking reservation15. The concert of absolute silence16. The room with no room
I’m lost · Help

Mika’s help desk

Prime numbers

One thing at a time

Read the three explanation steps first. The Lean source is there for a closer look afterwards; you do not have to read it first.

In simpler words

A prime is at least two and has no positive divisors except one and itself.

Earlier ideas are listed under “Start with these ideas” on this page.

A small clue

5 is prime. 6 is not: 6 = 2 × 3. One is not prime.

Close this panel to return to the exact place you were reading. These are prepared hints for this page.

Start with the first small story →