TITLE: Prove that if $7^n-3^n$ is divisible by $n>1$, then $n$ must be even.
QUESTION [8 upvotes]: I tried using factorization of $a^n-b^n$ for odd $n$ in an attempt to work through to a situation where the factors are such that they cannot have n as a factor. But I reached nowhere. Here's how I proceeded -
$$a^n-b^n=(a-b)\left(a^{n-1}+a^{n-2}b+a^{n-3}b^2+\dots+a^2b^{n-3}+ab^{n-2}+b^{n-1}\right)$$
a-b=4 and can be ignored.
The latter term is essentially odd and not divisible by any odd number till $9$ (easy to prove without getting into calculations).
However, for some arbitrary odd number $x=p^k$ where $p \ge 11$ is prime, I cannot say whether the sum of two terms is divisible by $x$ or not when the two terms are individually not divisible by $x$.

REPLY [6 votes]: If $n\mid 7^n-3^n$ and $n>1$, then let $p$ be the least prime divisor of $n$.
Clearly $\gcd(21,p)=1$, so $\left(7\cdot 3^{-1}\right)^n\equiv 1\pmod{p}$, i.e. $\text{ord}_p\left(7\cdot 3^{-1}\right)\mid n$.
By Fermat's Little theorem $\text{ord}_p\left(7\cdot 3^{-1}\right)\mid p-1$. Therefore $\text{ord}_p\left(7\cdot 3^{-1}\right)\mid \gcd(n,p-1)=1$, so $7\cdot 3^{-1}\equiv 1\pmod{p}$, so $7\equiv 3\pmod{p}$, so $p\mid 7-3=4$, so $p=2$.