TITLE: $n \mid (a^{n}-b^{n}) \ \Longrightarrow$ $n \mid \frac{a^{n}-b^{n}}{a-b}$
QUESTION [7 upvotes]: How does one prove that if $n \mid (a^{n}-b^{n}) \ \Longrightarrow$ $ \displaystyle n \mid \frac{a^{n}-b^{n}}{a-b}$ where $a,b, n \in \mathbb{N}$.
What i thought of is to consider $$(a-b)^{n} \equiv a^{n} + (-1)^{n}b^{n} \ (\text{mod} \ n)$$ and if we suppose that $n$ is odd then we have, $$(a-b)^{n} \equiv a^{n} -b^{n} \ (\text{mod} \ n)$$ and since $n \mid (a^{n} - b^{n})$ we have $$(a-b)^{n} \equiv 0 \ (\text{mod} \ n) $$
I think i am far away from the conclusion of the problem, but this is what i could work on regarding the problem.

REPLY [14 votes]: Let $\,c = (a^n\!-b^n)/(a\!-\!b).\,$ To show $\,n\mid c\,$ it suffices to show $\,p^k\mid n\Rightarrow\, p^k\mid c\,$ for all primes $p$.
If $\,\ p\nmid a\!-\!b\ $ then $\ p^k\mid n\mid  a^n\!-b^n\!= (a\!-\!b)\:\!c\,\Rightarrow\ p^k\mid c\:$ by iterating Euclid's Lemma,
else $\, p\mid a\!-\!b\ $ so $\ p^k{\,\LARGE \mid}\, \dfrac{\color{#90f}{a^{\large p}\!-b^{\large p}}}{\color{#0a0}{a-b}}\,\dfrac{a^{\large p^2}\!\!-b^{\large p^2}\!\!}{\color{#90f}{a^{\large p}-b^{\large p}}}\cdots \dfrac{\color{#c00}{a^{\large p^k}\!\!-b^{\large p^k}}}{a^{\large p^{k-1}}\!\!-b^{\large p^{k-1}}}\, \dfrac{\color{#0a0}{a^{\large n}\!-b^{\large n}}}{\color{#c00}{a^{\large p^k}-b^{\large p^k}}} = \color{#0a0}{\dfrac{a^{\large n}-b^{\large n}}{a-b}} = c$
by first $\,k\,$ factors have form $\,Q= \dfrac{A^{\large p}\!-B^{\large p}\!\!}{A-B}\,$ so each is divisible by $\,p,\,$ by $\,p\mid A\!-\!B\,$ thus
$\qquad\ \ \ \bmod p\!:\ \color{#c00}{A}\equiv B\,\Rightarrow\, Q = \color{#c00}A^{p-1}\!+\color{#c00}A^{p-2}B+\cdots+\!B^{p-1}\!\equiv\ pB^{p-1}\!\equiv 0$
Remark $ $ For generalizations of the above (multiplicative telescopic) lifting of $p$-divisibility  see LTE = Lifting The Exponent and related results.