<s>[INST] Simple divisibility problem 
Suppose $a$ and $b$ are distinct integers and $n\mid a^n-b^n$. Prove that $n\mid\frac{a^n-b^n}{a-b}$.

Here is how I do it: Write $a=b+d$, then $a^n-b^n=(b+d)^n-b^n=\binom{n}{1}b^{n-1}d+\binom{n}{2}b^{n-2}d^2+ \cdots + \binom{n}{n-1}bd^{n-1}+d^n \equiv 0 \pmod{n}$. Since $n| \binom{n}{k}$ for $k=1,2,\cdots,n-1$, $n|d^n$, which implies $n|d^{n-1}$. Therefore $(a^n-b^n)/(a-b)=\binom{n}{1}b^{n-1}+\binom{n}{2}b^{n-2}d+ \cdots + \binom{n}{n-1}bd^{n-2}+d^{n-1} \equiv 0 \pmod{n}$ and we are done. I wanna ask why $n|d^n$ will implies $n|d^{n-1}$ and that if there are any other possible solutions, thanks in advance.
 [/INST] Write down the unique prime factorization of  $n = p_1^{k_1} \cdot p_2^{k_2} \cdot \ldots \cdot p_l^{k_l}$. Then $n \mid d^n$ implies $p_1 \cdot p_2 \cdot \ldots \cdot p_l \mid d$. Since $k_i < n$ for all $i \in \{1, \ldots , l\}$, we have $n \mid p_1^{n-1} \cdot p_2^{n-1} \cdot \ldots \cdot p_l^{n-1}$ and with $p_1^{n-1} \cdot p_2^{n-1} \cdot \ldots \cdot p_l^{n-1} \mid d^{n-1}$ our desired result $n \mid d^{n-1}$.
</s>