Maths WorkshopMaths problems with full solutions
Exercise 745Number theory › Divisibility and gcdL1Added 2 Nov 2026

Divisibility of $a^n-b^n$

#divisibility#factorization#powers

Statement

Show that for all integers a,ba,b and all n≥1n\ge1, a−ba-b divides an−bna^n-b^n.

Hint

Factor: an−bn=(a−b)(an−1+an−2b+⋯+bn−1)a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+\cdots+b^{n-1}).

Show solutionHide solution

Solution

Factorization.
an−bn=(a−b)∑k=0n−1an−1−kbk.a^n-b^n=(a-b)\sum_{k=0}^{n-1}a^{n-1-k}b^k.
The sum is an integer since a,ba,b are integers. Hence a−b∣an−bna-b\mid a^n-b^n.

Remark. This is the algebraic identity behind many divisibility results, for example n3−1=(n−1)(n2+n+1)n^3-1=(n-1)(n^2+n+1).