Why is $a^n - b^n$ divisible by $a-b$? I did some mathematical induction problems on divisibility


*

*$9^n$ $-$ $2^n$ is divisible by 7.

*$4^n$ $-$ $1$ is divisible by 3.

*$9^n$ $-$ $4^n$ is divisible by 5.


Can these be generalized as
$a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer?
But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?
I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.
Are they just a coincidence or is there a theory behind?
Is it about modular arithmetic?

Since you originally observed your pattern while doing proofs by induction, here is a proof by induction on $n$ that $a-b$ divides $a^n - b^n$ for all $n \in \mathbb{N}$:
The statement is clearly true for $n = 1$. Assume the statement is true for $n = m$ for $m \geq 1$. Thus, $a^m - b^m = (a-b)k$, for some $k \in \mathbb{Z}$. Then for $n = m + 1$, 
\begin{equation}
a^{m+1} - b^{m+1} = a^{m+1} - b^mb = a^{m+1} + [(a-b)k - a^m]b = a^{m+1} - a^mb + (a-b)k = a^m(a - b) + (a-b)k = (a-b)(a^m + k). 
\end{equation}
And voila, $a-b| a^{m+1} + b^{m+1}$, so you are done by induction.
