PART IX — PATTERNS, LOGIC & OLYMPIAD MATHEMATICS
Primes and Factorisation, Divisor Counts and Sums, Perfect Numbers, Modular Arithmetic, Last Digits, Remainders of Powers and Fermat’s Little Theorem
1. Use unique prime factorisation.
2. Count and add the divisors of a number.
3. Recognise perfect numbers.
4. Use HCF × LCM = product of two numbers.
5. Work with congruences (mod n).
6. Find last digits of large powers.
7. Find remainders of large powers.
8. Use Fermat’s little theorem.
9. Solve simple linear congruences.
10. Prove divisibility results.
96.1 Primes and Divisors
Every whole number > 1 is a product of primes in exactly one way (Fundamental Theorem of
Arithmetic).
| There are infinitely many primes (Euclid): if p₁, …, p were all, p₁…p + 1 would have a new ₙ | ₙ |
prime factor.
N = p^a q^b … has (a + 1)(b + 1)… divisors.
A PERFECT number equals the sum of its proper divisors: 6, 28, 496, 8128.
| n | Factorisation | Number of divisors | Sum of all divisors |
|---|---|---|---|
| 12 | 2² × 3 | 6 | 28 |
| 28 | 2² × 7 | 6 | 56 (so 28 is perfect) |
| n | Factorisation | Number of divisors | Sum of all divisors |
|---|---|---|---|
| 72 | 2³ × 3² | 12 | 195 |
| 100 | 2² × 5² | 9 | 217 |
96.2 Modular Arithmetic
| CONGRUENCE | a ≡ b (mod n) means n divides a − b |
Step 1: Add, subtract and multiply congruences freely.
Step 2: Find a small power that is ≡ 1, then reduce the exponent.
Step 3: Fermat: if p is prime and p does not divide a, then a^(p − 1) ≡ 1 (mod p).
| Base | Last-digit cycle | Cycle length |
|---|---|---|
| 2 | 2, 4, 8, 6 | 4 |
| 3 | 3, 9, 7, 1 | 4 |
| 7 | 7, 9, 3, 1 | 4 |
| 4 | 4, 6 | 2 |
| 9 | 9, 1 | 2 |
| 5, 6 | 5; 6 | 1 |
⚠ Common Mistake: To use a cycle of length 4, divide the exponent by 4 and use the
REMAINDER (remainder 0 means the 4th term of the cycle).
WORKED EXAMPLES
Section A: Easy Problems
Problem 1: Prime factorisation of 360?
✔ Solution
2³ × 3² × 5.
Problem 2: Number of divisors of 72?
✔ Solution
(3 + 1)(2 + 1) = 12.
Problem 3: Is 28 perfect?
✔ Solution
1 + 2 + 4 + 7 + 14 = 28 → yes.
Problem 4: Last digit of 7² ²⁶?⁰
✔ Solution
2026 = 4 × 506 + 2 → second term of 7, 9, 3, 1 → 9.
Problem 5: HCF and LCM of 12 and 18; check HCF × LCM.
✔ Solution
6 and 36; 216 = 12 × 18 .✓
Problem 6: Remainder when 47 is divided by 5?
✔ Solution
2 (47 ≡ 2 mod 5).
Section B: Medium Problems
Problem 7: Remainder of 2¹ ÷ 7?⁰⁰
✔ Solution
2³ ≡ 1, 100 = 3 × 33 + 1 → 2.
Problem 8: Remainder of 3¹ ÷ 5?⁰⁰
✔ Solution
3⁴ = 81 ≡ 1 → 1.
Problem 9: Smallest number with exactly 10 divisors?
✔ Solution
10 = 5 × 2 → 2⁴ × 3 = 48 (smaller than 2 × 3⁴ or 2⁹).
Problem 10: Trailing zeros of 100!?
✔ Solution
20 + 4 = 24.
Problem 11: Solve 3x ≡ 4 (mod 7).
✔ Solution
3 × 6 = 18 ≡ 4 → x ≡ 6.
Problem 12: Verify Fermat’s theorem for a = 2, p = 13.
✔ Solution
2¹² = 4,096 = 13 × 315 + 1 .✓
Section C: Challenge Problems
Challenge Problem 13: Prove that n³ − n is divisible by 6 for every whole number n.
✔ Solution
n³ − n = (n − 1)n(n + 1), a product of three consecutive integers: one is even and one is a multiple of 3.
Challenge Problem 14: Show that a perfect square leaves remainder 0 or 1 when divided by 4.
✔ Solution
(2k)² = 4k²; (2k + 1)² = 4k² + 4k + 1.
Challenge Problem 15: Show 1729 is the sum of two cubes in two ways.
✔ Solution
1³ + 12³ = 9³ + 10³ = 1,729 (Ramanujan’s taxicab number).
Challenge Problem 16: Prove there are infinitely many primes.
✔ Solution
See 96.1: any finite list misses a prime factor of their product plus 1.
OLYMPIAD CORNER
Olympiad Problem O-1: Show that 2ⁿ + 1 is never divisible by 7.
✔ Solution
2ⁿ mod 7 is 1, 2 or 4, so 2ⁿ + 1 is 2, 3 or 5 mod 7 — never 0.
Olympiad Problem O-2: Find the last two digits of 7¹ .⁰⁰
✔ Solution
7⁴ = 2,401 ≡ 1 (mod 100), so 7¹ = (7⁴)²⁵ ends in 01.⁰⁰
Olympiad Problem O-3: Is there a whole number n with n² + 1 divisible by 3?
✔ Solution
n² ≡ 0 or 1 (mod 3), so n² + 1 ≡ 1 or 2 — never.
BRAIN TEASERS
Brain Teaser 1
Is 1 a prime?
Answer: No — a prime has exactly two divisors.
Brain Teaser 2
Only even prime?
Answer: 2.
Brain Teaser 3
Can a perfect square end in 2?
Answer: No.
Srinivasa Ramanujan made astonishing discoveries in number theory, including the partition formula with G. H. Hardy.
The largest known primes are Mersenne primes of the form 2ᵖ − 1, with millions of digits.
1. Unique prime factorisation; infinitely many primes.
2. Divisors of p^a q^b: (a + 1)(b + 1).
3. Find a power ≡ 1 to reduce large exponents.
4. Fermat: a^(p − 1) ≡ 1 (mod p).
PRACTICE EXERCISE 96.A — Easy
1. Factorise 360
2. Divisors of 100
3. Last digit of 3²⁵
4. HCF × LCM of 12 and 18
5. 47 mod 5
6. Is 91 prime?
PRACTICE EXERCISE 96.B — Medium
1. 2⁵ mod 3⁰
2. Last two digits of 7⁴ and 7¹⁰⁰
3. Sum of divisors of 18
4. Trailing zeros of 50!
5. Solve 5x ≡ 3 (mod 7)
6. Smallest number with 6 divisors
PRACTICE EXERCISE 96.C — Challenge
1. Prove n³ − n is divisible by 6
2. 10¹ mod 9⁰⁰
3. Prove 2ⁿ + 1 is never divisible by 7
4. n² + 1 divisible by 3?
ANSWER KEY — CHAPTER 96
Exercise 96.A
1. 2³ × 3² × 5 2. 9 3. 25 = 4 × 6 + 1 → 3 4. 216 5. 2 6. No: 7 × 13
Exercise 96.B
1. 2 ≡ −1 → (−1)⁵ = 1 2. 01 and 01 3. 39 4. 12 5. x ≡ 2 6. 12⁰
Exercise 96.C (notes)
1. Product of 3 consecutive integers 2. 1 3. 2ⁿ mod 7 {1, 2, 4} 4. Never∈
CHAPTER 96 — NEW TERMS FOR GLOSSARY
| Term | Definition |
|---|---|
| Prime | A number with exactly two divisors. |
| Perfect Number | Equal to the sum of its proper divisors. |
| Congruence | a ≡ b (mod n): same remainder on division by n. |
| Fermat’s Little Theorem | a^(p − 1) ≡ 1 (mod p) for prime p not dividing a. |