Factors, Multiples and Number Theory

☰ Contents

Once you can divide, one question follows immediately: which divisions come out exactly? Everything on this page is an answer to that question, from a seven-year-old sorting counters into equal rows to a proof that the primes never run out.

It is also the most practical branch of arithmetic that does not look practical. Simplifying a fraction is a factor question. Two buses that leave together and meet again is a multiple question. Whether a decimal stops or repeats forever is settled entirely by the prime factors of the denominator.

What is a factor, and what is a multiple?

A factor of a number divides it exactly, and a multiple is that number times a whole number. The factors of 20 are 1, 2, 4, 5, 10 and 20, and the list stops, since no factor is bigger than the number. The multiples of 20 are 20, 40, 60, 80 and so on, and that list never ends. The two words face opposite ways: 4 × 5 = 20, so 4 is a factor of 20 and 20 is a multiple of 4. Factors come in pairs that multiply to the number, so search upward from 1 and stop when the pairs start to repeat. A square number has one pair made of a number times itself, as 36 = 6 × 6, so it has an odd number of factors. The divisibility rules save trying every number. Multiplying each pair back checks the list: 1 × 20, 2 × 10 and 4 × 5 all make 20.

3 × 5 = 15

multiplication is commutative: 3 × 5 = 5 × 3

Make 24 as a rectangle, then find another factor pair

123456789101112
the factors of 12
12 has six factors: 1, 2, 3, 4, 6 and 12. Nothing else divides it exactly. Full lesson: Factors

Dividing Exactly is where "exactly" gets pinned down — no remainder, nothing left over — and Factors and Multiples name the two directions. Factor Pairs is the one that makes finding them reliable: factors come in pairs that multiply to the number, so hunting for 12 means checking 1 × 12, 2 × 6, 3 × 4 and then stopping, because after that the pairs repeat in the other order.

18 = 5 × 3 + 31 × 182 × 93 × 66 factors
Walk up from 1: every number that divides names its partner. Stop where they cross. Full lesson: Factor Pairs
The pairing is also the reason a square number has an odd count of factors. 36 pairs as 1 × 36, 2 × 18, 3 × 12, 4 × 9 and then 6 × 6 — where both halves of the pair are the same number, so it is counted once. Nine factors, not ten.

Divisibility without dividing

Divisibility Tests collects the checks that answer "does this go?" faster than the division would.

123456789101112131415161718192021222324252627282930
even numbers
A number divides by 2 when its last digit is even. Full lesson: Divisibility Tests

Every test, with the reason it works: the divisibility rules.

The digit-sum tests are the interesting ones, and they are not coincidence: every power of ten leaves a remainder of 1 when divided by 9, so a number and its digit sum leave the same remainder. That fact is worth more than the test — Casting Out Nines to Check Arithmetic turns it into a way of checking a long multiplication in a couple of seconds, and Modular Arithmetic on a Clock Face is the general idea behind it: arithmetic where only the remainder is kept, which is how clocks, calendars and checksums all work.

101001000is9 + 199 + 1999 + 1mod 9111
Each power of ten is a run of nines plus 1, so each leaves remainder 1. Full lesson: Casting Out Nines to Check Arithmetic

Now you

÷ 10what makes a number divide by 10?

A number divides by 10…

15, 14, 17which one divides by 2?

Which of these divides by 2?

What is a prime number?

A prime number is a whole number greater than 1 whose only factors are 1 and itself, so it has exactly two factors. The first primes are 2, 3, 5, 7, 11 and 13. Other whole numbers above 1 are composite, products of smaller numbers, as 15 = 3 × 5. To test whether a number is prime, try dividing it by the primes in order, and stop once the prime squared is bigger than the number. For 97, none of 2, 3, 5 or 7 divides it, and 11 × 11 = 121 is more than 97, so 97 is prime. You can stop there because factors come in pairs, and the smaller factor in a pair, multiplied by itself, is never bigger than the number. The number 1 is not prime, since it has only one factor, and 2 is the only even prime. A number such as 91 looks prime until you try 7: 91 = 7 × 13.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596030left× 2× 2

multiples of 2 struck, 30 numbers left: every number crossed out so far is k × p with p < itself

Strike the multiples of 2, 3, 5 and 7 and count what is left

The Sieve of Eratosthenes is the oldest way to find them, and it is a genuinely good algorithm rather than a classroom curiosity: write the numbers out, keep 2 and strike out every later multiple of 2, keep 3 and strike out its multiples, and continue. What survives is prime, and you never test a single number for divisibility.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910025left× 2, 3, 5, 7× 7
Cross out multiples of 2, then 3, then on. Whatever survives the sieve is prime. Full lesson: The Sieve of Eratosthenes

Prime Factorization is the payoff. Every whole number above 1 breaks into primes in exactly one way — 180 = 2² × 3² × 5 — and that unique fingerprint is what makes the next section work.

32224824
Split 24 as 3 × 8 and the same primes appear — the Fundamental Theorem of Arithmetic. Full lesson: Prime Factorization

HCF or LCM — which do you need?

Decide whether the question breaks things into equal groups or waits for things to line up. Equal groups need the highest common factor (HCF), the biggest number that divides both. Lining up needs the lowest common multiple (LCM), the smallest number both divide into. Suppose 24 red beads and 36 blue beads go into identical bags with none left over. The most bags you can fill is the HCF, 12, and each bag holds 2 red and 3 blue. If one bus leaves every 6 minutes and another every 8 minutes, they next leave together after the LCM, 24 minutes. Keywords can mislead, so ask whether the answer must fit into both numbers or be reached by both. When two numbers share no factor, the HCF is 1 and the LCM is their product, so 8 and 9 have an LCM of 72. The HCF times the LCM equals the two numbers multiplied, which checks both: 2 × 24 = 48 = 6 × 8.

243622233223HCF = 1LCM = 2 × 2 × 2 × 3 × 3 = 72

0 of the 3 shared factors are in the overlap, product 1 so far; everything drawn, each shared factor once, multiplies to 2 × 2 × 2 × 3 × 3 = 72 whatever is in the middle

Slide the shared factors into the overlap

Common Factors and The Highest Common Factor take the first direction: the largest number that divides both. 12 and 18 share 1, 2, 3 and 6, so the HCF is 6 — which is the largest tray you can pack both piles into without a gap.

UFactors of 12Factors of 184, 121, 2, 3, 69, 18
12 and 18 share 1, 2, 3 and 6. The largest is 6, the Highest Common Factor (HCF). Full lesson: The Highest Common Factor

Common Multiples and The Lowest Common Multiple take the other: the smallest number both divide into. 12 and 18 first meet at 36 — the first time a 12-minute bus and an 18-minute bus leave together again.

06121824
Counting in sixes: 6, 12, 18, 24. The first meeting point is 12. Full lesson: The Lowest Common Multiple

Choosing Between HCF and LCM exists because the arithmetic is rarely the hard part; picking the right one from a word problem is. The prime factorizations answer both at once: take the lowest power of each shared prime for the HCF, the highest power of every prime for the LCM.

This is also where fraction arithmetic gets its machinery. Simplifying a fraction divides top and bottom by their HCF; adding fractions with different bottoms needs a common multiple of the denominators. Anyone who finds fractions fiddly is usually finding factors fiddly — the guide to equivalent fractions and mixed numbers leans on everything in this section.

HCF and LCM from the prime factorizations

For numbers too big to list factors for, the factorizations do the work. Write both as products of primes, then read off both answers from the same pair of rows.

84 = 2² × 3 × 7 and 90 = 2 × 3² × 5.

12 = 2 × 2 × 3both carry a 2 and a 318 = 2 × 3 × 3HCF = 2 × 3 = 6
From primes: multiply what both lists carry — a 2 and a 3 — and 2 × 3 = 6. Full lesson: The Highest Common Factor

A useful check falls out of this: multiply the HCF by the LCM and you get the product of the two original numbers, every time. 6 × 1,260 = 7,560 = 84 × 90. Each prime is being counted once at its lower power and once at its higher, which between them is exactly the two numbers' worth.

Now you

givesdivides bothHCFboth divide itLCM

Lighthouses flashing every 9 and every 12 seconds. When do they agree?

givesdivides bothHCFboth divide itLCM

Ropes of 16 m and 24 m cut into equal lengths. Longest piece?

Do the primes ever run out?

No, and the proof is short. Euclid’s Proof That Primes Never Run Out starts by supposing someone has a complete list of every prime. Multiply all the primes on the list together and add 1. The new number leaves a remainder of 1 when divided by any prime on the list, so none of them is a factor. But every whole number above 1 has a prime factor, so some prime is missing from the list, and no finite list can be complete. With the list 2, 3, 5 and 7, the new number is 2 × 3 × 5 × 7 + 1 = 211, which is itself prime. The new number need not be prime: 2 × 3 × 5 × 7 × 11 × 13 + 1 = 30,031 = 59 × 509. Its prime factors are still missing from the list. And 13 × 2,310 = 30,030 confirms the remainder of 1 when dividing by 13.

2 × 3 × 5 + 1 = 3131 ÷ 2remainder 131 ÷ 3remainder 131 ÷ 5remainder 131 is primea prime ≠ any on the listk = 3

31 = (2 × 3 × 5) + 1 leaves remainder 1 when divided by each of them, so none is a factor, and 31 is itself a prime that was not on the list

Take the first six primes and read what their product + 1 is

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. Full lesson: Euclid’s Proof That Primes Never Run Out
This is a proof by contradiction, and it is one of the cleanest in mathematics: it does not build a new prime, it shows that the assumption of completeness destroys itself. Around 300 BC, and not improved on since.

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?

Which fractions have decimals that stop?

A fraction has a decimal that stops when its denominator, in lowest terms, has no prime factors other than 2 and 5. Why Every Fraction Terminates or Recurs gives the reason: decimals count in tenths, hundredths and thousandths, and every power of ten is built only from 2s and 5s, since 10 = 2 × 5. For 7/20, the denominator is 2 × 2 × 5, so multiply top and bottom by 5 to get 35/100, which is 35 hundredths. A denominator with any other prime factor can never reach a power of ten, so the division never ends, and the digits repeat instead. 1/8 = 0.125 stops; 1/3 = 0.333… cannot. Always simplify first, because a factor that cancels does not count: 6/15 has a 3 in its denominator, but 6/15 = 2/5, which stops. To check a stopping decimal, write it as a fraction over a power of ten: 1/8 = 125/1000.

10.90.990.9990.99990.999990.9999991 − 0.999 = 10⁻³

0.999 > your number, so it is not between 0.999… and 1

Find a number that sits strictly between 0.999… and 1.

1/6 = 0.16…repeats every 16 = 2 × 33 divides no power of 10, so 1/d ≠ tenths, hundredths, …d = 6

1/6 never stops: 6 has the factor 3, which divides no power of 10, so the remainders cycle and the digits repeat every 1

Slide d to 16 and read why 1/16 stops

8576built from2·2·2572·3digitsstopstoprecurrecur
10 is 2 × 5, so powers of ten absorb 2s and 5s. Any other factor never clears. Full lesson: Why Every Fraction Terminates or Recurs

The repeat is also guaranteed rather than merely likely: dividing by 7 can only ever leave remainders 1 to 6, so within seven steps a remainder must repeat, and once a remainder repeats the digits do too.

Turning Recurring Decimals into Fractions runs the process backwards with one trick — multiply by a power of ten to line the repeating block up with itself, then subtract. x = 0.272727…, so 100x = 27.2727…, and 99x = 27, giving x = 27/99 = 3/11.

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. Full lesson: Turning Recurring Decimals into Fractions

The same subtraction settles the argument people have about Why 0.999… Equals Exactly One: x = 0.999…, 10x = 9.999…, so 9x = 9 and x = 1. Not almost one. There is no number in between, and two numbers with nothing between them are one number.

999910x−0999x90009x
Subtract: each nine wipes a nine, leaving 9x = 9 — so x = 1. Full lesson: Why 0.999… Equals Exactly One

Now you

21.000

Does 1/2 stop or recur?

111.000

Does 1/11 stop or recur?

What is an irrational number?

An irrational number is a number that cannot be written as a fraction with whole numbers on the top and bottom. Rational and Irrational Numbers draws the line using decimals: every fraction has a decimal that either stops or repeats, so a decimal that goes on forever without repeating cannot be a fraction. The best-known examples are √2 and π. No fraction squares to exactly 2. You can get close, since (7/5)² = 49/25, which is just under 2, and (3/2)² = 9/4, which is over 2, but a proof shows that no fraction lands exactly on it. The square root of a perfect square is a whole number, so √49 is 7, and the square root of 9/4 is 3/2. A long decimal on a calculator does not prove a number is irrational either, because the screen stops after a few digits. What decides it is whether the number can be written exactly as one whole number divided by another.

5/757/125/74/13

numerator = 5, and every greedy step has to leave it smaller

Keep taking the biggest unit fraction that fits, until nothing is left over.

as a fractionits decimal0.753/4stops0.333…1/3repeats√2nonenever repeats
No fraction at all equals √2, so it is called irrational. Full lesson: Rational and Irrational Numbers

The Square Root of Two Is Irrational proves that at least one such number exists, and does it by contradiction again. Write √2 = a/b in lowest terms. Squaring gives a² = 2b², so a² is even, so a is even. Write a = 2c and the same equation becomes b² = 2c², so b is even too. But a fraction in lowest terms cannot have both parts even. The assumption is impossible, so no such fraction exists.

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. Full lesson: The Square Root of Two Is Irrational

Two older ideas round the branch out. Egyptian Fractions and the Greedy Algorithm looks at a notation that only allowed unit fractions — 3/7 = 1/3 + 1/11 + 1/231 — and at the greedy method that always terminates, which is a real theorem hiding in a curiosity. Continued Fractions writes a number as a nest of reciprocals and produces the best possible fractional approximations: it is where 355/113 comes from, a value for π correct to seven digits with three-digit numbers.

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?

The three mistakes worth naming

Where this leads next

Factors are the engine under fraction arithmetic — see fractions, equivalence and mixed numbers — and the terminating-or-recurring question hands straight over to the decimals guide. Powers, roots and surds continue the irrational thread in algebraic expressions, indices and surds.

Related guides: Arithmetic Methods.

Your turn

Three to try — tap what you get.

The highest common factor of 12 and 18

Which of these is prime?

The lowest common multiple of 4 and 6

Questions and answers

What is the difference between a factor and a multiple?
A factor divides a number exactly; a multiple is what you get by multiplying it. The factors of 12 are 1, 2, 3, 4, 6 and 12, and they stop. The multiples of 12 are 12, 24, 36, 48 and onwards without end. The same relationship read from opposite ends: 3 is a factor of 12 exactly when 12 is a multiple of 3.
How can you tell if a number is divisible by 3?
Add its digits; if the total is divisible by 3, so is the number. For 4,713 the digits add to 15, and 15 is divisible by 3, so 4,713 is too. The test works because every power of ten is one more than a multiple of 3 - 10, 100 and 1000 leave remainder 1 - so each digit contributes only itself to the remainder.
What is the difference between HCF and LCM?
The highest common factor is the largest number that divides both; the lowest common multiple is the smallest number both divide into. For 12 and 18 the HCF is 6 and the LCM is 36. Cutting something into equal pieces needs the HCF; two repeating cycles meeting again needs the LCM. Asking whether you are breaking down or building up settles which.
Do prime numbers ever run out?
No, and Euclid proved it around 300 BC. Suppose there were a complete list of primes. Multiply them all together and add one. The new number leaves remainder 1 when divided by every prime on the list, so no listed prime divides it - yet every number above 1 has a prime factor. That factor is missing from the list, so no list can be complete.
Is 0.999… actually equal to 1?
Yes, exactly - not nearly. If x = 0.999…, then 10x = 9.999…, and subtracting gives 9x = 9, so x = 1. There is no number between 0.999… and 1, and two numbers with nothing between them are the same number. The recurring notation is a second name for one, in the way that 2/4 is a second name for a half.
Why is the square root of 2 irrational?
Because assuming it is a fraction leads to a contradiction. Write root two as a fraction in lowest terms and square both sides: the numerator squared is twice the denominator squared, which forces the numerator to be even, then forces the denominator to be even too. But a fraction in lowest terms cannot have both even. No such fraction exists.
Mr. Chalk