1.1.8 · D1Arithmetic & Number Systems

Foundations — Prime numbers — Sieve of Eratosthenes, primality testing

1,754 words8 min readBack to topic

This page assumes nothing. Before we can even read the parent note, we need to agree on what each little symbol means and looks like. We build them in order — each one uses only the ones before it.


1. Natural numbers and the symbol

Why a letter? Because we want to say something true for every counting number at once, without writing them all out. When we write , picture a box holding one specific-but-unnamed number of pebbles.


2. Divides, factor, divisor — the heart of everything

This is the single most important idea, so we give it a picture.

Figure — Prime numbers — Sieve of Eratosthenes, primality testing

Look at the figure. On the left, dots split cleanly into rows of — no dot is stranded. So and . On the right, dots into rows of leaves a broken last row — does not divide (written ).


3. Building a number as a rectangle:

Figure — Prime numbers — Sieve of Eratosthenes, primality testing

4. The inequality symbols , , ,

The parent note writes things like and . These are just size comparisons.


5. Square root and why the topic loves it

The trick is the parent's key optimisation, so we define from the rectangle idea.

Figure — Prime numbers — Sieve of Eratosthenes, primality testing

6. The floor symbol

The parent writes . What is that odd bracket?


7. Big-O notation — measuring effort

See Time complexity Big-O for the full story — here you only need "smaller inside the = less work."


8. Symbols summary table

Recall The full symbol dictionary (peek only after trying)
  • ::: a stand-in for one natural (counting) number.
  • ::: " divides " — dots split into equal groups of , no leftover.
  • ::: " does not divide " — there is a leftover.
  • ::: dots form a rectangle tall, wide.
  • ::: sits left of or on on the number line.
  • ::: side of the square with area ; the balance point of factor pairs.
  • ::: round down to a whole number.
  • ::: how fast the work grows as input grows.

Prerequisite map

Counting numbers and the letter n

Divides d mid n equal groups no leftover

Factor and divisor same thing

n equals a times b as a rectangle

Prime is a line Composite is a fatter rectangle

Order symbols less than and less or equal

Smaller factor a less or equal sqrt n

Square root as the balance side

Floor round down to whole

Trial division up to floor sqrt n

Sieve start crossing at p squared

Big O growth of work

Cost O sqrt n

Prime numbers and the Sieve

Each foundation feeds exactly the part of the parent it unlocks: the rectangle picture powers the prime/composite split, the square root powers the bound, floor makes it testable, and Big-O measures the payoff.


Equipment checklist

Self-test: can you answer each before revealing?

What does mean in dot-picture words?
dots split into equal groups of with no dot left over — remainder zero.
Draw/describe the difference between a prime and a composite number of dots.
A prime forms only a single line; a composite also forms a fatter rectangle with both sides .
What does represent geometrically?
The side length of a square whose area is — the balance point where a factor pair has equal halves.
Why can the smaller factor never exceed ?
If and , pushing above forces below it, breaking ; so .
Compute and say why the topic rounds down.
; divisors must be whole numbers, so we test integers up to and including the floor.
In plain words, what does tell you versus ?
The work grows like — far slower than ; e.g. steps instead of for .
What does describe on a number line?
A divisor strictly between the posts and — proof the number is composite.

Connections