Let $a,b,n$ be positive integers, if $n|a^n-b^n$ then $n|\frac{a^n-b^n}{a-b}$

elementary-number-theorymodular arithmetic

Let $a,b,n$ be positive integers, if $n|a^n-b^n$ then prove that $n|\frac{a^n-b^n}{a-b}$.


My approach: If $n$ is a prime, write $n=p$, then since $$a^p\equiv b^p\pmod p$$
and by Fermat's little theorem, we have $$a^p\equiv a, b^p\equiv b\pmod p.$$
Therefore $$a\equiv b\pmod p.$$
We have $$\dfrac{a^p-b^p}{a-b}\equiv a^{p-1}+a^{p-2}b+\cdots+b^{p-1}\equiv pa^{p-1}\equiv 0\pmod p,$$
so this statement is true for prime $n$.
But when $n$ is not a prime, I cannot construct a similar proof. Any suggestion?

Best Answer

Suppose $(n, a-b)=d$ is the highest common factor. Use the $a=b+kd$ and the binomial expansion to show that $d^2|a^n-b^n$.

Related Question