Zsigmondy's Theorem

Theorem
Let $a > b > 0$ be coprime positive integers.

Let $n \ge 1$ be a (strictly) positive integer.

Then there is a prime number $p$ such that
 * $p$ divides $a^n - b^n$
 * $p$ does not divide $a^k - b^k$ for all $k < n$

with the following exceptions:


 * $n = 1$ and $a - b = 1$
 * $n = 2$ and $a + b$ is a power of $2$
 * $n = 6$, $a = 2$, $b = 1$

Proof
We call a prime number primitive if it divides $a^n-b^n$ but not $a^k-b^k$ for any $k<n$

Let $\Phi_n(x,y)$ denote the $n$th homogeneous cyclotomic polynomial.

By Product of Cyclotomic Polynomials, $a^n-b^n = \displaystyle\prod_{d\mathop\mid n}\Phi_d(a,b)$.

Thus any primitive prime divisor is a divisor of $\Phi_n(a,b)$.

We start by investigating to which extent the converse is true.

Let $p$ be a prime divisor of $\Phi_n(a,b)$ which is not primitive.

Then there exists $k\mid n$ with $k<n$ such that $p\mid a^k-b^k$.

From Product of Cyclotomic Polynomials, $p\mid \frac{a^n-b^n}{a^{d}-b^{d}}$ for all divisors $d<n$ of $n$.

By the Lifting The Exponent Lemma, $p\mid\frac nd$ for $d\mid n$ with $p\mid a^d-b^d$.

In particular, $p\mid n$.

Let $n=p^\alpha q$ with $p\nmid q$.

By Cyclotomic Polynomial of Index times Prime Power, $p\mid \Phi_n(a,b) \mid \Phi_q(a^{p^\alpha}, b^{p^\alpha})$.

By Fermat's Little Theorem, $p\mid \Phi_q(a,b)$.

By Prime Divisors of Cyclotomic Polynomials, $p\equiv1\pmod q$.

Thus $p$ is the largest prime divisor of $n$.

Also see

 * Zsigmondy's Theorem for Sums