Intuition The one core idea
A prime is a number of dots you can only arrange in a single straight line — never a full rectangle wider than one dot. Everything in this topic (the sieve, the n shortcut, unique factorisation) is just a clever way to find these "un-rectangle-able" numbers, or to use them as the building blocks of every other number.
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.
Definition Natural number
The natural numbers are the plain counting numbers: 1 , 2 , 3 , 4 , 5 , … — the ones you use to count objects. A single unknown one of them we call a letter , usually n .
Why a letter? Because we want to say something true for every counting number at once, without writing them all out. When we write n , picture a box holding one specific-but-unnamed number of pebbles.
n looks like
Think of n as a pile of n identical dots. The whole topic is about the shapes you can pour that pile into.
This is the single most important idea, so we give it a picture.
Definition Divides / factor / divisor
We say d divides n (written d ∣ n ) when you can share n dots into equal groups of d with nothing left over . Then d is a divisor (also called a factor ) of n .
Look at the figure. On the left, 12 dots split cleanly into 3 rows of 4 — no dot is stranded. So 3 ∣ 12 and 4 ∣ 12 . On the right, 12 dots into rows of 5 leaves a broken last row — 5 does not divide 12 (written 5 ∤ 12 ).
Intuition Why "remainder" matters
When the last group is broken, the leftover count is the remainder . "d divides n " is exactly the statement "remainder = 0 ." In the parent note, every "97/7 → rem 6, No" line is checking this leftover.
Definition Multiplication as a rectangle
a × b means "a rows of b dots." The result is the total dot count. So writing n = a × b is a promise: the n dots fit into a perfect rectangle a tall and b wide.
Intuition Prime vs composite, in one picture
If n dots can only form a 1 × n line (or the n × 1 turn of it), n is prime .
If n dots can also make a fatter rectangle (both sides > 1 ), n is composite .
This is why 12 (a real rectangle) is composite and 7 (only a line) is prime. The parent's whole "hidden factor" language is just: does a non-line rectangle exist?
The parent note writes things like 1 < d < n and a ≤ b . These are just size comparisons .
a < b : "a is strictly smaller than b " (never equal).
a ≤ b : "a is smaller than or equal to b ."
a > b , a ≥ b : the same, flipped.
Intuition Picture: a number line
Put the numbers on a ruler running left→right. a < b means a sits to the left of b . So "1 < d < n " means d is trapped strictly between the posts 1 and n — that is exactly a divisor that is neither 1 nor n , i.e. proof of composite-ness.
The n trick is the parent's key optimisation, so we define from the rectangle idea.
n is the side length of a square whose area is n . In symbols, n is the number s with s × s = n .
Intuition WHY square root, not something else?
Among all rectangles with area n , the square is the "balance point": one side equals the other. Slide to a non-square rectangle and one side goes below n while its partner goes above . That is the entire secret of the n bound: in any factor pair a × b , the smaller one can never climb past n . So we only ever hunt for the small factor, and it always hides at or below the square's side.
The parent writes ⌊ n ⌋ . What is that odd bracket?
Worked example Floor in action
⌊ 9.8 ⌋ = 9 and ⌊ 5.5 ⌋ = 5 .
Why the topic needs it: you can't test "d = 9.8 " as a divisor — divisors are whole. So 97 ≈ 9.8 becomes "test d up to ⌊ 97 ⌋ = 9 ."
Definition Big-O, in one line
O ( something ) is a shorthand for roughly how the amount of work grows as the input gets big. O ( n ) = "work grows in step with n ." O ( n ) = "work grows like n — far slower."
Intuition Picture: two ramps
Imagine two ramps you must climb: one rises straight (O ( n ) ), one is a gentle curve that flattens (O ( n ) ). For n = 10 , 000 , the first is 10 , 000 steps; the second only 100 . That flattening is why the n trick is worth caring about.
See Time complexity Big-O for the full story — here you only need "smaller inside the O = less work."
Recall The full symbol dictionary (peek only after trying)
n ::: a stand-in for one natural (counting) number.
d ∣ n ::: "d divides n " — n dots split into equal groups of d , no leftover.
d ∤ n ::: "d does not divide n " — there is a leftover.
n = a × b ::: n dots form a rectangle a tall, b wide.
a ≤ b ::: a sits left of or on b on the number line.
n ::: side of the square with area n ; the balance point of factor pairs.
⌊ x ⌋ ::: round x down to a whole number.
O ( ⋅ ) ::: how fast the work grows as input grows.
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
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 n bound, floor makes it testable, and Big-O measures the payoff.
Self-test: can you answer each before revealing?
What does d ∣ n mean in dot-picture words? n dots split into equal groups of d 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 1 × n line; a composite also forms a fatter rectangle with both sides > 1 .
What does n represent geometrically? The side length of a square whose area is n — the balance point where a factor pair has equal halves.
Why can the smaller factor never exceed n ? If
a ≤ b and
a × b = n , pushing
a above
n forces
b below it, breaking
a ≤ b ; so
a ≤ n .
Compute ⌊ 9.8 ⌋ and say why the topic rounds down. 9 ; divisors must be whole numbers, so we test integers up to and including the floor.
In plain words, what does O ( n ) tell you versus O ( n ) ? The work grows like
n — far slower than
n ; e.g.
100 steps instead of
10 , 000 for
n = 10 , 000 .
What does 1 < d < n describe on a number line? A divisor d strictly between the posts 1 and n — proof the number is composite.