ExamShortcut
high importance~2 Q in Tier 133 formulas⚡ 18 shortcuts6 subtopics

Factors, prime factorisation & trailing zeros

🔒 Log in to track

Write N=paqbrcN = p^a q^b r^c (prime factorisation). Everything about factors comes from the exponents.

  • Number of factors =(a+1)(b+1)(c+1)= (a+1)(b+1)(c+1)
  • Odd factors: ignore the power of 2. Even factors = total − odd (or give 2 an exponent from 1 to its max).
  • Perfect-square factors: each exponent can only take even values 0, 2, 4, …
  • Sum of factors: multiply (1+p+⋯+pa)(1 + p + \dots + p^a) for each prime.

Trailing zeros of a product = number of (2, 5) pairs = number of 5s (5s are scarcer). In n!, count 5s by successive division by 5.

Detailed notes

Factors and multiples

A factor (divisor) of a number divides it exactly. Factors of 12 are 1, 2, 3, 4, 6, 12. A multiple is the opposite: 12, 24, 36 … are multiples of 12. Every question on "how many factors" starts with prime factorisation — writing the number as a product of primes.

Prime factorisation

Keep dividing by the smallest prime that works. 720=2×360=2×2×180=⋯=24×32×5720 = 2 \times 360 = 2 \times 2 \times 180 = \dots = 2^4 \times 3^2 \times 5. Write it in power form: N=pa×qb×rcN = p^a \times q^b \times r^c.

Number of factors

A factor of 24×32×52^4 \times 3^2 \times 5 can take the power of 2 as 0, 1, 2, 3 or 4 (5 choices), the power of 3 as 0, 1 or 2 (3 choices), and the power of 5 as 0 or 1 (2 choices). Number of factors=(a+1)(b+1)(c+1)\text{Number of factors} = (a+1)(b+1)(c+1) For 720: 5×3×2=305 \times 3 \times 2 = 30 factors.

Odd, even and special factors

  • Odd factors: ignore the 2 completely. 3600=24×32×523600 = 2^4 \times 3^2 \times 5^2 → odd factors =3×3=9= 3 \times 3 = 9.
  • Even factors = total − odd. For 3600: 45−9=3645 - 9 = 36.
  • Factors that are multiples of kk: divide NN by kk and count the factors of N/kN/k. For 1440 and k=12k = 12: 1440/12=120=23×3×51440/12 = 120 = 2^3 \times 3 \times 5 → 4×2×2=164 \times 2 \times 2 = 16.
  • Perfect-square factors: each power can only be even (0, 2, 4 …). Perfect-cube factors: powers 0, 3, 6 …

Sum of factors

Sum=(1+p+⋯+pa)(1+q+⋯+qb)…\text{Sum} = (1 + p + \dots + p^a)(1 + q + \dots + q^b)\dots For 360=23×32×5360 = 2^3 \times 3^2 \times 5: (1+2+4+8)(1+3+9)(1+5)=15×13×6=1170(1+2+4+8)(1+3+9)(1+5) = 15 \times 13 \times 6 = 1170. Sum of even factors: drop the 1 from the bracket of 2: (2+4+8)×…(2+4+8) \times \dots

Product of factors

If NN has dd factors, the product of all its factors is Nd/2N^{d/2}. Factors pair up as (1,N),(2,N/2),…(1, N), (2, N/2), \dots — each pair multiplies to NN.

Writing N as a product of two factors

  • Number of ways =d/2= d/2 (if NN is not a perfect square), or (d+1)/2(d+1)/2 if it is (the square root pairs with itself).
  • As a product of two co-prime factors: 2k−12^{k-1}, where kk = number of different primes in NN.

Trailing zeros

A zero at the end comes from a factor 10 = 2 × 5. In n!n! there are always more 2s than 5s, so count the 5s: zeros in n!=⌊n5⌋+⌊n25⌋+⌊n125⌋+…\text{zeros in } n! = \left\lfloor \frac{n}{5} \right\rfloor + \left\lfloor \frac{n}{25} \right\rfloor + \left\lfloor \frac{n}{125} \right\rfloor + \dots 125! → 25 + 5 + 1 = 31 zeros. Quick way: keep dividing by 5 and add the quotients. Careful with products like 5×10×15×⋯×1005 \times 10 \times 15 \times \dots \times 100: here 5s are plenty and 2s are fewer, so count both and take the smaller.

Highest power of a prime in n!

Same successive division, but by the prime pp: power of 3 in 100! =33+11+3+1=48= 33 + 11 + 3 + 1 = 48. For a composite like 12 = 22×32^2 \times 3: find the power of 2 (divide by 2 because of the square) and the power of 3; the answer is the smaller.

Quick revision

  • Factors: (a+1)(b+1)(c+1)(a+1)(b+1)(c+1); odd factors → drop 2.
  • Multiples of kk among factors → factors of N/kN/k.
  • Sum: product of (1+p+⋯+pa)(1 + p + \dots + p^a) brackets.
  • Product of factors =Nd/2= N^{d/2}.
  • Zeros in n!n! = successive division by 5.
  • Highest power of pp in n!n! = successive division by pp.

Types of questions asked

Every way this subtopic shows up in exams — how to recognise it, the formula or logic to use, and a solved example.

Type 1: Number of factors (total, odd, even)very common2 practice Q
How to spot it:

'How many factors / divisors does 720 have?', 'how many odd (or even) factors …'.

N=paqbrc⇒d(N)=(a+1)(b+1)(c+1)N = p^a q^b r^c \Rightarrow d(N) = (a+1)(b+1)(c+1)
  1. Prime-factorise NN.
  2. Total: multiply (each power + 1).
  3. Odd: leave out the power of 2. Even: total − odd.

Why: each factor is built by choosing a power for every prime independently.

Example: How many factors does 252 have?

252=22×32×7252 = 2^2 \times 3^2 \times 7 → 3×3×2=183 \times 3 \times 2 = 18 factors.

Type 2: Special factors: perfect squares/cubes, multiples of kcommon2 practice Q
How to spot it:

'How many factors of N are perfect cubes?', 'how many factors of 1440 are divisible by 12?'.

#{factors divisible by k}=d(N/k)\#\{\text{factors divisible by } k\} = d(N/k)
  1. Perfect squares: count only even powers for each prime (0, 2, 4, …). Cubes: 0, 3, 6, …
  2. Multiples of kk: divide NN by kk and count the factors of the quotient.

Why: a factor divisible by kk is kk times a factor of N/kN/k.

Example: How many factors of 25×332^5 \times 3^3 are perfect squares?

Powers of 2: 0, 2, 4 (3 choices). Powers of 3: 0, 2 (2 choices). Answer 3×2=63 \times 2 = 6.

Type 3: Sum of factors (all, odd or even)common2 practice Q
How to spot it:

'Find the sum of all factors of 360', 'sum of even factors of 72'.

σ(N)=∏pa+1−1p−1=(1+p+⋯+pa)(1+q+⋯+qb)\sigma(N) = \prod \frac{p^{a+1}-1}{p-1} = (1+p+\dots+p^a)(1+q+\dots+q^b)
  1. Prime-factorise.
  2. Write a bracket (1+p+p2+… )(1 + p + p^2 + \dots) for each prime and multiply.
  3. Even factors: bracket for 2 starts from 2. Odd factors: drop the bracket of 2.

Why: expanding the product gives every factor exactly once.

Example: Find the sum of all factors of 60.

60=22×3×560 = 2^2 \times 3 \times 5 → (1+2+4)(1+3)(1+5)=7×4×6=168(1+2+4)(1+3)(1+5) = 7 \times 4 \times 6 = 168.

Type 4: Trailing zeros in a factorial or productvery common2 practice Q
How to spot it:

'How many zeros are there at the end of 125!?' or at the end of a product like 5×10×⋯×1005 \times 10 \times \dots \times 100.

Z(n!)=⌊n5⌋+⌊n25⌋+⌊n125⌋+…Z(n!) = \left\lfloor \tfrac{n}{5} \right\rfloor + \left\lfloor \tfrac{n}{25} \right\rfloor + \left\lfloor \tfrac{n}{125} \right\rfloor + \dots
  1. For n!n!: divide nn by 5, divide the quotient by 5 again, … and add all quotients.
  2. For other products: count 2s and 5s separately; zeros = the smaller count.

Why: each zero needs one 2 and one 5.

Example: How many zeros are at the end of 80!?

80÷5=1680 \div 5 = 16, 16÷5=316 \div 5 = 3. Zeros =16+3=19= 16 + 3 = 19.

Type 5: Highest power of a prime (or composite) dividing n!common2 practice Q
How to spot it:

'Find the largest n such that 3n3^n divides 100!', or 'highest power of 12 in 50!'.

Ep(n!)=∑k≥1⌊npk⌋E_p(n!) = \sum_{k \ge 1} \left\lfloor \frac{n}{p^k} \right\rfloor
  1. For a prime pp: successive division of nn by pp, add quotients.
  2. For a composite, split into prime powers (12=22×312 = 2^2 \times 3), find each exponent, divide by the power needed, take the smallest.

Why: ⌊n/p⌋\lfloor n/p \rfloor counts multiples of pp, ⌊n/p2⌋\lfloor n/p^2 \rfloor adds the extra pp from multiples of p2p^2, and so on.

Example: Highest power of 7 in 100!?

100÷7=14100 \div 7 = 14, 14÷7=214 \div 7 = 2. Answer 14+2=1614 + 2 = 16.

Type 6: Product of factors; ways to write N as a product of two factorsoccasional3 practice Q
How to spot it:

'Find the product of all factors of 36', 'in how many ways can 360 be written as a product of two (co-prime) factors?'.

∏d=Nd(N)/2,pairs=d(N)2,co-prime pairs=2k−1\prod d = N^{d(N)/2},\quad \text{pairs} = \frac{d(N)}{2},\quad \text{co-prime pairs} = 2^{k-1}
  1. Count factors d(N)d(N).
  2. Product of factors =Nd/2= N^{d/2}.
  3. Ways as a product of two factors =d/2= d/2 ((d+1)/2(d+1)/2 for a perfect square).
  4. Co-prime pairs: each distinct prime goes wholly to one side → 2k2^k ordered splits, 2k−12^{k-1} unordered.

Why: factors pair up as (f,N/f)(f, N/f).

Example: Find the product of all factors of 12.

1212 has 6 factors → product =126/2=123=1728= 12^{6/2} = 12^3 = 1728. Check: 1×2×3×4×6×12=17281 \times 2 \times 3 \times 4 \times 6 \times 12 = 1728 ✓.

Formulas

Number of factors
d(N)=(a+1)(b+1)(c+1)d(N) = (a+1)(b+1)(c+1)
Sum of factors
σ(N)=pa+1−1p−1⋅qb+1−1q−1⋅rc+1−1r−1\sigma(N) = \frac{p^{a+1}-1}{p-1} \cdot \frac{q^{b+1}-1}{q-1} \cdot \frac{r^{c+1}-1}{r-1}
Even factors
a⋅(b+1)(c+1)a \cdot (b+1)(c+1)

when p = 2 with exponent a

Product of all factors
Nd(N)/2N^{d(N)/2}
Trailing zeros in n!
⌊n5⌋+⌊n25⌋+⌊n125⌋+⋯\left\lfloor \frac{n}{5} \right\rfloor + \left\lfloor \frac{n}{25} \right\rfloor + \left\lfloor \frac{n}{125} \right\rfloor + \cdots
Highest power of prime p in n!
∑k≥1⌊npk⌋\sum_{k \ge 1} \left\lfloor \frac{n}{p^k} \right\rfloor

Shortcut tricks

⚡ Even factors: force one 2

If N=2a×(odd part)N = 2^a \times (\text{odd part}), even factors =a×= a \times (factors of odd part).

Example: How many even factors does 360 have?

360=23×32×5360 = 2^3 \times 3^2 \times 5 ⇒ even factors =3×3×2=18= 3 \times 3 \times 2 = 18.

⚡ Successive division by 5

Keep dividing by 5 (dropping remainders) and add the quotients.

Example: How many zeros are at the end of 1000!?

1000→200→40→8→11000 \to 200 \to 40 \to 8 \to 1. Sum =200+40+8+1=249= 200+40+8+1 = 249.

⚡ Sum of factors as bracket product

Write one bracket per prime: (1 + p + p² + …). Multiply.

Example: Find the sum of all factors of 72.

72=23×3272 = 2^3 \times 3^2 ⇒ (1+2+4+8)(1+3+9)=15×13=195(1+2+4+8)(1+3+9) = 15 \times 13 = 195.

Where students lose marks

  • Counting only n/5 for trailing zeros and missing the extra 5s from 25, 125, …

  • Adding exponents instead of multiplying (a + 1)(b + 1)(c + 1).

  • Forgetting that 1 and N are themselves factors.

  • For trailing zeros of a SUM (e.g. 100! + 200!) adding the zeros — the sum has the smaller count.

Practice sets — 17 questions

Sets of 10, mixed across the question types above. Each answer comes with a step-by-step explanation.

Topic test · 10 questions

Suggested time 8 min · wrong answers go to your mistake notebook automatically.