Chapter

Divisibility and Prime Factorisation

The module introduces the precise language of divisibility, primes, factorisation, divisor counting, and first olympiad techniques: consecutive integers, parameters, and factorial constructions.
Log in to track solved progress and bookmarks.

Theory

Key Idea

Divisibility in olympiad number theory is not quick division; it is a way to see integer structure. The notation \(a\mid b\) means that \(b=ak\) for some integer \(k\).

Prime factorisation turns a number into a list of prime exponents. Many problems then become questions about which prime factors, and which powers of them, must be present.

Basic Facts

  • If \(d\mid a\) and \(d\mid b\), then \(d\mid xa+yb\) for all integers \(x,y\).
  • If \(a\mid b\) and \(b\mid c\), then \(a\mid c\).
  • Every integer \(n>1\) has a unique factorisation into prime powers.
  • If \(n=p_1^{\alpha_1}\cdots p_s^{\alpha_s}\), then the number of positive divisors is \((\alpha_1+1)\cdots(\alpha_s+1)\).
  • If \(p\) is prime and \(p\mid ab\), then \(p\mid a\) or \(p\mid b\).
  • Among \(k\) consecutive integers, one is divisible by \(k\), but divisibility by \(k!\) requires careful collection of prime powers.

When to Use This Method

  • The statement contains "divisible", "divisor", "prime", "factorisation", or "number of divisors".
  • You need to prove a divisibility statement for all integers \(n\).
  • You need to find all parameters for which one expression divides another.
  • You need to construct a number with prescribed divisors or a prescribed number of divisors.
  • You need to disprove a false divisibility claim by a single counterexample.

How to Recognise the Method

If the divisor contains a variable, try reducing the variable modulo that divisor. For example, under \(n+3\mid f(n)\), it is natural to write \(n\equiv -3\pmod{n+3}\).

If the expression resembles a product of nearby numbers, factor it into consecutive terms. If the problem is about the number of divisors, move immediately to prime exponents.

Typical Mistakes

  • From \(ab\mid c\) or \(d\mid ab\), incorrectly concluding divisibility of individual factors.
  • Calling \(1\) prime, which breaks uniqueness of prime factorisation.
  • Proving divisibility by \(2\), \(3\), \(5\), but forgetting that pairwise coprimality is needed to combine them.
  • When counting divisors, forgetting the zero exponent choice.
  • In "for all \(n\)" problems, checking examples instead of proving the statement.

Mini-Checklist

  • Can the divisibility be written as \(b=ak\)?
  • Can the expression be reduced modulo the variable divisor?
  • Should the expression be factorised?
  • Which prime powers must divide the number?
  • If the greatest universal divisor is asked for, which small \(n\) gives an upper bound?

Examples

Example 1. Divisibility as an Exact Equality

The first skill is translating \(a\mid b\) into an equality with an integer factor.

Problem. Suppose \(12\mid n\). Prove that \(3\mid n\) and \(4\mid n\).

Solution.

From \(12\mid n\), we have \(n=12k\) for some integer \(k\). Then \(n=3(4k)\), so \(3\mid n\). Also \(n=4(3k)\), so \(4\mid n\).

Comment. No approximate division is needed; everything uses an integer factor.

Example 2. A Linear Combination

One of the main properties of divisibility: from two divisible expressions we can build new ones.

Problem. If \(7\mid a\) and \(7\mid b\), prove that \(7\mid 5a-3b\).

Solution.

Write \(a=7x\), \(b=7y\). Then \(5a-3b=35x-21y=7(5x-3y)\). Since \(5x-3y\) is an integer, \(7\mid 5a-3b\).

Comment. This idea later becomes the language of GCD and the Euclidean algorithm.

Example 3. Factorisation and Divisors

The number of divisors is counted not by listing divisors, but by choosing prime exponents.

Problem. Find the number of positive divisors of \(1260\).

Solution.

Factorise: \(1260=126\cdot 10=2^2\cdot 3^2\cdot 5\cdot 7\). A divisor has the form \(2^a3^b5^c7^d\), where \(a=0,1,2\), \(b=0,1,2\), \(c=0,1\), \(d=0,1\). Therefore the number of divisors is \(3\cdot 3\cdot 2\cdot 2=36\).

Comment. A zero exponent means that the corresponding prime is absent from the divisor.

Example 4. Three Consecutive Integers

A product of nearby integers usually contains the needed prime factors.

Problem. Prove that \(6\mid n(n+1)(n+2)\) for every integer \(n\).

Solution.

Among three consecutive integers, one is divisible by \(3\). Among any two consecutive integers, one is even, so among three there is also an even number. Hence the product is divisible by both \(2\) and \(3\). Since \(2\) and \(3\) are coprime, the product is divisible by \(6\).

Comment. It is important to explicitly combine divisibility by coprime factors.

Example 5. A False Claim

In olympiad problems it is useful to quickly see where a divisibility property cannot be used.

Problem. Is it true that \(6\mid ab\) implies \(6\mid a\) or \(6\mid b\)?

Solution.

No. Take \(a=2\), \(b=3\). Then \(ab=6\), so \(6\mid ab\). But \(6\nmid 2\) and \(6\nmid 3\). The claim is false.

Comment. A similar statement is true for a prime divisor \(p\), but not for the composite number \(6\).

Example 6. A Variable Divisor

When the divisor contains \(n\), it is often best to replace \(n\) by a convenient remainder.

Problem. Find all integers \(n\) for which \(n+3\mid n^2+n+1\).

Solution.

Modulo \(n+3\), we have \(n\equiv -3\). Hence \(n^2+n+1\equiv 9-3+1=7\pmod{n+3}\). Therefore \(n+3\mid 7\). Thus \(n+3\in\{\pm1,\pm7\}\), and \(n\in\{-2,-4,4,-10\}\). All these values work.

Comment. This is a typical move: the remainder of the expression becomes a small constant.

Example 7. Greatest Universal Divisor

For a statement that holds for all \(n\), we need both a lower and an upper bound.

Problem. Find the greatest \(m\) such that \(m\mid n(n+1)(n+2)\) for every integer \(n\).

Solution.

From the previous example, \(6\) always divides the product of three consecutive integers. Thus \(m=6\) is possible.

On the other hand, at \(n=1\), the product is \(1\cdot2\cdot3=6\). Hence any universal divisor \(m\) must divide \(6\). Therefore the greatest possible \(m\) is \(6\).

Comment. A small value of \(n\) often gives an upper bound for the answer.

Example 8. A Long Block of Composite Numbers

A factorial can build many divisors into a construction in advance.

Problem. Prove that there exist \(10\) consecutive composite positive integers.

Solution.

Consider the numbers \(11!+2,11!+3,\ldots,11!+11\). The number \(11!+k\) is divisible by \(k\), because \(11!\) is divisible by \(k\) for \(2\le k\le 11\). Also \(11!+k>k\). Hence each of these numbers has a nontrivial divisor \(k\) and is composite. We have obtained \(10\) consecutive composite numbers.

Comment. The same construction gives a block of any prescribed length.

Problems

Problems

#1.1
#1.1

Checking Exact Divisibility

Divisibility Grade 7 Grade 8 ★☆☆☆☆

Determine which statements are true: \(9\mid 153\), \(11\mid 154\), \(13\mid 221\). Briefly justify your answer.

Details
Problem: NT-B1-M01-P001
Difficulty: Level 1 of 5
Tag: Divisibility
Grade: Grade 7, Grade 8
#1.2
#1.2

Linear Combination

Divisibility Grade 7 Grade 8 ★☆☆☆☆

If \(5\mid a\) and \(5\mid b\), prove that \(5\mid 7a+4b\).

Details
Problem: NT-B1-M01-P002
Difficulty: Level 1 of 5
Tag: Divisibility
Grade: Grade 7, Grade 8
#1.3
#1.3

Factorisation of 1260

Prime Factorisation Grade 7 Grade 8 ★☆☆☆☆

Factorise \(1260\) into primes.

Details
Problem: NT-B1-M01-P003
Difficulty: Level 1 of 5
Tag: Prime Factorisation
Grade: Grade 7, Grade 8
#1.4
#1.4

Divisors of 840

Prime Factorisation Grade 7 Grade 8 ★☆☆☆☆

Find the number of positive divisors of \(840\).

Details
Problem: NT-B1-M01-P004
Difficulty: Level 1 of 5
Tag: Prime Factorisation
Grade: Grade 7, Grade 8
#1.5
#1.5

Odd Number of Divisors

Divisor Counting Grade 7 Grade 8 ★☆☆☆☆

Prove that a positive integer has an odd number of positive divisors if and only if it is a perfect square.

Details
Problem: NT-B1-M01-P005
Difficulty: Level 1 of 5
Tag: Divisor Counting
Grade: Grade 7, Grade 8
#1.6
#1.6

Three Consecutive Integers

Consecutive Integers Grade 7 Grade 8 ★★☆☆☆

Prove that \(6\mid n(n+1)(n+2)\) for every integer \(n\).

Details
Problem: NT-B1-M01-P006
Difficulty: Level 2 of 5
Tag: Consecutive Integers
Grade: Grade 7, Grade 8
#1.7
#1.7

Four Consecutive Integers

Consecutive Integers Grade 7 Grade 8 ★★☆☆☆

Prove that \(24\mid n(n+1)(n+2)(n+3)\) for every integer \(n\).

Details
Problem: NT-B1-M01-P007
Difficulty: Level 2 of 5
Tag: Consecutive Integers
Grade: Grade 7, Grade 8
#1.8
#1.8

Transitivity of Divisibility

Divisibility Grade 7 Grade 8 ★★☆☆☆

Let \(a,b,c\) be positive integers. Prove: if \(a\mid b\) and \(b\mid c\), then \(a\mid c\).

Details
Problem: NT-B1-M01-P008
Difficulty: Level 2 of 5
Tag: Divisibility
Grade: Grade 7, Grade 8
#1.9
#1.9

A Divisor with a Parameter

Divisibility Grade 8 Grade 9 ★★☆☆☆

Find all integers \(n\) such that \(n+3\mid n^2+n+1\).

Details
Problem: NT-B1-M01-P009
Difficulty: Level 2 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9
#1.10
#1.10

Three Primes in an Arithmetic Progression

Prime Factorisation Grade 8 Grade 9 ★★☆☆☆

Find all primes \(p\) such that \(p\), \(p+4\), and \(p+8\) are all prime.

Details
Problem: NT-B1-M01-P010
Difficulty: Level 2 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9
#1.11
#1.11

Smallest Number with 12 Divisors

Prime Factorisation Grade 8 Grade 9 ★★☆☆☆

Find the smallest positive integer with exactly \(12\) positive divisors.

Details
Problem: NT-B1-M01-P011
Difficulty: Level 2 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9
#1.12
#1.12

Even Divisors

Parity Grade 8 Grade 9 ★★☆☆☆

How many positive even divisors does \(2^5\cdot3^2\cdot5\) have?

Details
Problem: NT-B1-M01-P012
Difficulty: Level 2 of 5
Tag: Parity
Grade: Grade 8, Grade 9
#1.13
#1.13

Five Consecutive Factors

Consecutive Integers Grade 8 Grade 9 ★★★☆☆

Prove that \(120\mid n(n^2-1)(n^2-4)\) for every integer \(n\).

Details
Problem: NT-B1-M01-P013
Difficulty: Level 3 of 5
Tag: Consecutive Integers
Grade: Grade 8, Grade 9
#1.14
#1.14

Greatest Divisor of Three Consecutive Terms

Consecutive Integers Grade 8 Grade 9 ★★★☆☆

Find the greatest positive \(m\) such that \(m\mid n(n+1)(n+2)\) for every integer \(n\).

Details
Problem: NT-B1-M01-P014
Difficulty: Level 3 of 5
Tag: Consecutive Integers
Grade: Grade 8, Grade 9
#1.15
#1.15

Greatest Divisor of Four Consecutive Terms

Consecutive Integers Grade 8 Grade 9 ★★★☆☆

Find the greatest positive \(m\) such that \(m\mid n(n+1)(n+2)(n+3)\) for every integer \(n\).

Details
Problem: NT-B1-M01-P015
Difficulty: Level 3 of 5
Tag: Consecutive Integers
Grade: Grade 8, Grade 9
#1.16
#1.16

Divisibility of a Quadratic Expression

Divisibility Grade 8 Grade 9 ★★★☆☆

Find all positive integers \(n\) such that \(2n+1\mid n^2+n+3\).

Details
Problem: NT-B1-M01-P016
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9
#1.17
#1.17

Prime Square Minus One

Divisibility Grade 8 Grade 9 ★★★☆☆

Prove that if \(p>3\) is prime, then \(24\mid p^2-1\).

Details
Problem: NT-B1-M01-P017
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9
#1.18
#1.18

When \(p^2+2\) Is Prime

Prime Factorisation Grade 8 Grade 9 ★★★☆☆

Find all primes \(p\) for which \(p^2+2\) is also prime.

Details
Problem: NT-B1-M01-P018
Difficulty: Level 3 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9
#1.19
#1.19

Square Divisibility

Divisibility Grade 8 Grade 9 ★★★☆☆

Let \(a,b\) be positive integers. Prove that if \(a^2\mid b^2\), then \(a\mid b\).

Details
Problem: NT-B1-M01-P019
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9
#1.20
#1.20

Exactly Three Divisors

Prime Factorisation Grade 8 Grade 9 ★★★☆☆

Prove that a positive integer has exactly \(3\) positive divisors if and only if it is the square of a prime.

Details
Problem: NT-B1-M01-P020
Difficulty: Level 3 of 5
Tag: Prime Factorisation
Grade: Grade 8, Grade 9
#1.21
#1.21

A Pair with Divisibility

Divisibility Grade 8 Grade 9 Grade 10 ★★★★☆

From the set \(\{1,2,\ldots,2n\}\), \(n+1\) numbers are chosen. Prove that among the chosen numbers there are two such that one divides the other.

Details
Problem: NT-B1-M01-P021
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9, Grade 10
#1.22
#1.22

Fifteen Divisors and Divisibility by 12

Optimization Grade 8 Grade 9 Grade 10 ★★★★☆

Find the smallest positive integer that is divisible by \(12\) and has exactly \(15\) positive divisors.

Details
Problem: NT-B1-M01-P022
Difficulty: Level 4 of 5
Tag: Optimization
Grade: Grade 8, Grade 9, Grade 10
#1.23
#1.23

Greatest Divisor of \(n^5-n\)

Divisibility Grade 8 Grade 9 Grade 10 ★★★★☆

Find the greatest positive \(m\) such that \(m\mid n^5-n\) for every integer \(n\).

Details
Problem: NT-B1-M01-P023
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 8, Grade 9, Grade 10
#1.24
#1.24

Arbitrarily Many Composite Numbers in a Row

Divisibility Grade 9 Grade 10 ★★★★★

Prove that for every positive integer \(k\), there exist \(k\) consecutive positive integers, each of which is composite.

Details
Problem: NT-B1-M01-P024
Difficulty: Level 5 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10

Ladders

No published ladders were found.
Next Chapter