TITLE: Is $every$ prime factor of $\frac{n^{163}-1}{n-1}$ either $163$ or $1\;\text{mod}\;163$?
QUESTION [8 upvotes]: This was inspired by this question. More generally, given prime $p$ and any integer $n>1$, define,
$$F(n) = \frac{n^p-1}{n-1}=n^{p-1}+n^{p-2}+\dots+1$$

Q: Is every prime factor of $F(n)$ either $p$, or $1\;\text{mod}\;p$?

REPLY [5 votes]: Community Wiki answer, expanding that by Mark Wildon.
We have a fixed prime $p=163,$ but we will keep the symbol $p.$ The main tool here is Fermat's Little Theorem, which says that, for a prime $q$ that does not divide $n,$ we get
$$ n^{q-1} \equiv 1 \pmod q. $$
Furthermore, there is some minimal positive integer $t,$ sometimes called the "order," such that $n^t \equiv 1 \pmod q.$ Manipulations using the gcd show that this $t |(q-1).$
We have some $q$ dividing $n^p - 1.$ So $n^p \equiv 1 \pmod q.$ We have some order $t.$ This says that $t | p.$ Either $t=1$ or $t=p.$
If the order $t=p,$ this means $p | (q-1).$ This is main conclusion asked about.
If the order $t=1,$ this means $n \equiv 1 \pmod q.$ We begin by expanding $n=1 + \lambda q.$ But then Mark gives
$$ \frac{n^p-1}{n-1} = \frac{(1 + \lambda q)^p - 1}{\lambda q}  $$ This is further expanded as
$$ (1/\lambda q) (1 + p \lambda q + \binom{p}{2} \lambda^2 q^2 + \cdots + p  \lambda^{p-1} q^{p-1} + \lambda^p q^p - 1  ) $$
or
$$ p + \binom{p}{2} \lambda q + \binom{p}{3} \lambda^2 q^2 + \cdots + p  \lambda^{p-2} q^{p-2} +  \lambda^{p-1} q^{p-1}. $$
All but the first term of this have an explicit $q$ factor. The missing item is the first term, $p.$ If $q$ divides the whole thing, then $q$ divides $p$ and $q=p.$