Number Theory

Stage 8 of 23 Strand 8 of 8 9 lessons

9 illustrated lessons, each teaching the why before the how.

Start with Euclid’s Proof That Primes Never Run Out in the app →
Revise Number Theory with flashcards →

Jump to a lesson

Euclid’s Proof That Primes Never Run Out

Any finite list can be used to build a new one.

Any finite list of primes can be used to build a prime it does not contain

Read the full lesson →

02468101214

Euclid starts by supposing the primes ran out, with every one on a single list.

suppose 2, 3, 5, 7 were all the primesbuild one more number2·3·5·7 + 1 = 211it leaves remainder 1 every time211 divides by none of them

Multiply every one together and add 1. Nothing on the list divides it.

the new number has a prime factoreach leaves remainder 1and it is none of the listed onesso no finite list can hold them all

Each one leaves remainder 1, so this number hides a prime you missed.

Now you

2 × 3 × 5 × 7 × 11 + 1what does this come to?

Multiply 2 × 3 × 5 × 7 × 11 and add 1. What do you get?

2 × 3 × 5 × 7 + 1what does this come to?

Multiply 2 × 3 × 5 × 7 and add 1. What do you get?

Modular Arithmetic on a Clock Face

Remainders bend the number line into a circle.

Working with remainders turns a number line into a circle

Read the full lesson →

121234567891011

9 o’clock plus 5 hours is 2 o’clock, not 14.

121234567891011

The clock keeps only the remainder after dividing by 12: we write 14 mod 12 = 2.

01234

The number after mod is the modulus. Here it is 5, so the circle holds 0 to 4.

Now you

13 mod 5what does this come to?

What is 13 mod 5?

31 mod 12what does this come to?

What is 31 mod 12?

Casting Out Nines to Check Arithmetic

A digit sum keeps the same remainder.

Adding the digits of a number leaves the same remainder as the number itself does

Read the full lesson →

101001000is9 + 199 + 1999 + 1mod 9111

Each power of ten is a run of nines plus 1, so each leaves remainder 1.

473 = 4·100 + 7·10 + 3from the row above100 and 10 each leave 1so 473 leaves what 4 + 7 + 3 leaves

Split 473 into 4·100 + 7·10 + 3. Each power carries 1, so only the digits are left.

47314mod 955

473 and its digit sum 14 leave exactly the same remainder, 5.

473+218691

Now check a sum: 473 + 218 = 691. Do the remainders on both sides agree?

473218691digit sum141116mod 9527

The remainders 5 and 2 add to 7, and 691 leaves 7 too, so the answer checks out.

Now you

829its digits add to 19

What is 829 mod 9?

447its digits add to 15

What is 447 mod 9?

Why Every Fraction Terminates or Recurs

Only so many remainders are available.

Every fraction either stops or falls into a repeating cycle, and never does anything else

Read the full lesson →

81.0000.125

1/8 stops after 3 digits, because 8 is built only from 2s.

remainders of 1 ÷ 812512400.125bring down a 0, divide, keep the rest

Kept as remainders it runs 1, 2, 4, then 0 — and 0 is where the digits stop.

remainders of 1 ÷ 71428571326450.142857142857…six remainders, and 0 is never one of them

Divide by 7 and 0 never comes. Only six remainders exist, so one must repeat.

8576built from2·2·2572·3digitsstopstoprecurrecur

10 is 2 × 5, so powers of ten absorb 2s and 5s. Any other factor never clears.

Now you

21.000

Does 1/2 stop or recur?

111.000

Does 1/11 stop or recur?

Why 0.999… Equals Exactly One

Two names for the very same number.

An endless run of nines after the point is exactly the number 1

Read the full lesson →

00.40.81.2

Each extra nine closes the gap, and no gap is ever left over.

0999x999910x

Call it x and multiply by 10. Every nine lines up under a nine.

999910x−0999x90009x

Subtract: each nine wipes a nine, leaving 9x = 9 — so x = 1.

Now you

00.250.50.751

0.666… recurring is which fraction?

00.250.50.751

0.333… recurring is which fraction?

Turning Recurring Decimals into Fractions

Shift a block, subtract, done.

Shifting a recurring decimal by its repeat length and subtracting frees the fraction

Read the full lesson →

x = 0.474747…two repeating digits, so × 100100x = 47.4747…the endless tails cancel100x − x = 47
99x = 47, so

Multiply until the tails line up, subtract, and the endless part wipes itself out.

x = 0.555…one digit, so one shift10x − x = 5
9x = 5, so

One repeating digit needs only × 10: 9x = 5, so 5/9 — the move that proved 0.999… = 1.

x = 0.8333…shift past the 8, then once more10x = 8.333…, 100x = 83.333…90x = 75100x − 10x = 75

A non-repeating head: shift past it first, then subtract the two shifted copies.

0.4747…0.555…0.8333…fraction47/995/95/6

Every repeating decimal falls to this method — that is why each one is rational.

Now you

x = 0.888…now subtract x10x = 8.888…

0.888… recurring is which fraction?

x = 0.555…now subtract x10x = 5.555…

0.555… recurring is which fraction?

Egyptian Fractions and the Greedy Algorithm

Any fraction as a sum of distinct unit ones.

Every fraction can be written as a sum of different fractions with one on top

Read the full lesson →

712

The Egyptians wrote every fraction, like this 7/12, as unit fractions — all different.

take the biggest unit fraction that fits
so it terminates
and is already a unit fraction

Take the biggest unit fraction that fits, then repeat on what is left.

take the biggest unit fraction that fitsevery timethe remainder has a SMALLER numeratorso it must reach 1 and stop

Being greedy always works here, and the remainder shrinks every time.

Now you

take the biggest bite that fits

What is the biggest unit fraction that fits inside 2/3?

take the biggest bite that fits

What is the biggest unit fraction that fits inside 3/4?

The Square Root of Two Is Irrational

Assume it is a fraction, and it falls apart.

Assuming the square root of two is a fraction leads to a contradiction

Read the full lesson →

, in lowest terms
square both sides

Suppose it were a fraction, already canceled down as far as it goes.

odd² is odd
is even, so a is even

Squaring gives a² = 2b², so a² is even, and only even numbers square to even.

a = 2k, so
, so b is even too
contradiction
a and b both even, yet the fraction was lowest
so is not a fraction

Write a = 2k and b comes out even too — so it was never in lowest terms.

Now you

a is oddwhat follows from this?

If a is odd, what follows?

is even
what follows from this?

If a² is even, what follows?

Continued Fractions

The endless fraction that closes in on root two.

A number that no fraction can equal can still be written as a fraction that never ends

Read the full lesson →

√2 =1 +12 +12 +12 + …

√2 is not equal to any fraction. It is equal to this.

√2 =1 +12 +12 +12 + …

Below the top, every level is the same 2, so the pattern repeats without end.

1 +12 +12

Stop the tower early and an ordinary fraction falls out. Fold it from the bottom.

the level above sits over it

Bottom first: 2 + 1/2 is 5/2, one over that is 2/5, and 1 + 2/5 = 7/5.

1.391.517/5√23/2

Every extra level lands nearer, jumping above and below the true value.

Now you

1 +12 +12

Work this continued fraction out

Continue your journey in the app — save your progress