Pareto Academy
Number System

Number System I: Factors, Divisibility, HCF and LCM formulas

At a glance

prime test: divide by primes up to √n;  primes > 3 are 6k ± 1
squares end in 0, 1, 4, 5, 6, 9;  n consecutive integers → divisible by n!
8: last 3 digits;  11: alternate-digit difference;  7: tens + 5 × units
N = pᵃ qᵇ rᶜ  →  (a + 1)(b + 1)(c + 1) factors
sum of factors = (1 + … + pᵃ)(1 + … + qᵇ)(1 + … + rᶜ)
φ(N) = N(1 − 1/p)(1 − 1/q)…;  co-prime factor pairs = 2^(m − 1)
HCF: lower powers of common primes   LCM: higher powers of all
HCF × LCM = A × B (two numbers)
repeat and meet → LCM    cut into equal pieces → HCF
zeros of n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …

Kinds of numbers

The names CAT uses for numbers.
KindWhat it meansExamples
Naturalcounting numbers 1, 2, 3, …1, 7, 250
Wholenatural numbers and 00, 1, 2, …
Integerswhole numbers and their negatives−3, 0, 12
Rationalcan be written p/q with integers p, q and q ≠ 0; decimal ends or repeats−2, 3/4, 0.1666…
Irrationalcannot be written as p/q; decimal never ends or repeats√2, π, 2 + √3
Primeexactly two factors: 1 and itself2, 3, 5, 7, 11
Compositemore than two factors4, 9, 91
Co-primea pair with HCF 1 (neither needs to be prime)8 and 15

1 is neither prime nor composite. 0 is even, and an integer, but not natural.

Two notations and four number facts.
n! = 1 × 2 × … × n,   0! = 1,   5! = 120
|x| = x if x ≥ 0, −x if x < 0  (distance from 0 on the number line)
a perfect square ends only in 0, 1, 4, 5, 6 or 9
a perfect square is 3k or 3k + 1, and 4k or 4k + 1
every prime above 3 is 6k − 1 or 6k + 1
a product of n consecutive integers is divisible by n!

Shortcut: To test n, divide only by primes up to √n. If none divides it, n is prime. Also, every prime above 3 is of the form 6k ± 1 (but not every 6k ± 1 is prime: 25 = 6 × 4 + 1).

Shortcut: A number ending in 2, 3, 7 or 8 is never a square, and neither is one that leaves remainder 2 by 3 or remainder 2 or 3 by 4. So 5,555 is out at once: its last two digits, 55, leave 3 by 4.

Divisibility rules

The rules worth knowing cold.
DivisorTestExample
2last digit even3,758
3digit sum divisible by 34,812: 4 + 8 + 1 + 2 = 15
4last two digits divisible by 47,316: 16
5last digit 0 or 52,345
6passes the tests for 2 and 34,812
8last three digits divisible by 85,832: 832 = 8 × 104
9digit sum divisible by 95,832: 5 + 8 + 3 + 2 = 18
10last digit 04,560
11(sum of odd-place digits) − (sum of even-place digits) is 0 or a multiple of 118,712: (2 + 7) − (1 + 8) = 0
12, 72, …split into co-prime parts and test each: 12 = 3 × 4, 72 = 8 × 92,736 passes 8 and 9, so 72 divides it
7tens + 5 × units (or tens − 2 × units); repeat until small4,823 → 482 + 15 = 497 → 49 + 35 = 84 = 7 × 12
13tens + 4 × units; repeat3,211 → 321 + 4 = 325 → 32 + 20 = 52 = 13 × 4
19tens + 2 × units; repeat2,185 → 218 + 10 = 228 → 22 + 16 = 38 = 19 × 2
7, 11, 13alternating sum of 3-digit groups from the right (1001 = 7 × 11 × 13)123,123: 123 − 123 = 0, so all three divide it

'tens' means the number with its last digit removed (497 → 49). These tests tell you whether the number divides, not what the remainder is.

Shortcut: Write N = 10t + u. For 7, multiply by 5: 50t + 5u, and 50 = 7 × 7 + 1, so N is a multiple of 7 exactly when t + 5u is. The same trick uses 40 = 3 × 13 + 1 for 13 and 20 = 19 + 1 for 19.

Prime factorisation: the factor tree

Shortcut: A number is a perfect square when every power in its factorisation is even, and a perfect cube when every power is a multiple of 3.

How many factors, and their sum

Every factor of 72 = 2³ × 3²: 4 powers of 2 × 3 powers of 3
Every factor of 72 = 2³ × 3²: 4 powers of 2 × 3 powers of 3
Factor results for N = pᵃ × qᵇ × rᶜ (p, q, r different primes).
QuantityFormulaFor 72 = 2³ × 3²
number of factors d(N)(a + 1)(b + 1)(c + 1)4 × 3 = 12
sum of factors(1 + p + … + pᵃ)(1 + q + … + qᵇ)(1 + r + … + rᶜ)15 × 13 = 195
odd factors (p = 2)(b + 1)(c + 1)3
even factors (p = 2)a(b + 1)(c + 1) = total − odd12 − 3 = 9
factors that are multiples of pa(b + 1)(c + 1)multiples of 3: 4 × 2 = 8
product of all factorsN^(d(N)/2)72⁶
ways to write N = x × y (order ignored)d(N)/2, or (d(N) + 1)/2 if N is a perfect square6
ways as a product of two co-prime factors2^(m − 1), m = number of different primes2: 1 × 72, 8 × 9
Euler's totient φ(N): numbers 1 to N co-prime to NN(1 − 1/p)(1 − 1/q)(1 − 1/r)72 × ½ × ⅔ = 24
sum of numbers below N co-prime to NN × φ(N) / 272 × 24 / 2 = 864

Shortcut: Odd factors ignore the 2 entirely. Even factors = total − odd. For 72: odd factors are 1 × 3 = 3, so even factors are 12 − 3 = 9.

HCF and LCM from prime powers

HCF is the overlap of the prime Venn, LCM is the whole
HCF is the overlap of the prime Venn, LCM is the whole
72 = 2³ × 3²     120 = 2³ × 3 × 5
HCF = 2³ × 3 = 24      LCM = 2³ × 3² × 5 = 360
HCF × LCM = A × B   (two numbers only)
HCF of fractions = HCF of numerators / LCM of denominators
LCM of fractions = LCM of numerators / HCF of denominators

Bells, tiles and remainders

Spot the pattern in the question's words.
largest number dividing a, b, c exactly      →  HCF(a, b, c)
largest number leaving remainders r₁, r₂     →  HCF(a − r₁, b − r₂)
largest number leaving the same remainder    →  HCF(b − a, c − b)
smallest number divisible by a, b, c         →  LCM(a, b, c)
smallest leaving remainder r with each       →  LCM + r

Trailing zeros of n!

zeros at the end of n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …
100!:  20 + 4 = 24

Shortcut: Keep dividing by 5 and adding the whole-number parts: 250 → 50 → 10 → 2, so 250! ends in 50 + 10 + 2 = 62 zeros.

Highest power of a prime in n!

power of p in n! = ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + …
3 in 50!:  16 + 5 + 1 = 22

Shortcut: For a composite like 12 = 2² × 3, count each prime, divide by its power in 12, and take the smaller result. Usually the largest prime is the scarce one, but check when it carries a power.

Formulas stick when you use them

The Number System I: Factors, Divisibility, HCF and LCM lesson has worked problems and quick checks for every formula here. Free to start.

Start free