TITLE: When does $a + b$ divide $a^p + b^p$?
QUESTION [9 upvotes]: I came across a problem in Niven's number theory text (problem 51 on page 20) that asks the following:

Show that if $(a, b) = 1$ and $p$ is an odd prime, then $$\left(a + b, \frac{a^p + b^p}{a + b}\right) = 1 \text{ or } p.$$

I am not asking for a solution to this problem; instead, I'm trying to understand why $a^p + b^p$ would always be divisible by $a + b$ given the above conditions.  Does anyone have any insights as to why this would be true?  Where (if at all) do we use the conditions that $(a, b) = 1$ and $p$ is an odd prime?

REPLY [2 votes]: Hint $\rm\: \left(x\!-\!a,\frac{f(x)-f(a)}{x-a}\!\right) = (x\!-\!a,\,f\:\!'(a))\:$ by $\rm\: \frac{f(x)-f(a)}{x-a} \equiv\ f\:\!'(a)\pmod{\!x\!-\!a}\ $ for $\rm\ f\in \mathbb Z[x]$
For further details see here, which elaborates on how this result is a number-theoretical analog of a well-known result about functions (polynomials), viz. about multiplicity of roots.