Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume $(a,b)$=1, and let $p$ be an odd prime, prove that $$(a+b,\frac{a^p+b^p}{a+b})=1 \text{ or } p$$.

I thought of letting $p=2k+1,k\in\mathbb{Z}$,

then use the identity


So dividing throughout,


However, after that, I am kind of stuck..

Sincere thanks for any help!

share|cite|improve this question
Hint: suppose that $h$ divides $a+b.$ Note that $(-a)^{k}b^{p-1-k} \equiv b^{p-1}$ (mod $h$). – Geoff Robinson Aug 26 '12 at 15:40
For completeness, you should show that both $1$ and $p$ can happen. – André Nicolas Aug 26 '12 at 16:49
up vote 4 down vote accepted

Let me continue the hint I wrote above. We see that if $h$ divides $a +b,$ then $\frac{a^p +b^p}{a+b} \equiv pb^{p-1}$ (mod $h$). Hence, if we let $h = {\rm gcd}(a+b,\frac{a^p +b^p}{a+b}),$ we see that $h|pb^{p-1}.$ But $h$ is coprime to $b,$ since $h |(a+b)$ and ${\rm gcd}(a,b) = 1.$ Hence $h|p,$ as required.

Later edit: Although the question does not request a proof that both $1$ and $p$ can occur, I provide one, in response to the comment of Andr\'e. If $p$ divides $a+b,$ then taking $h =p$ above shows that $\frac{a^p +b^p}{a+b} \equiv pb^{p-1} \equiv 0$ (mod $p$), so that $p$ divides ${\rm gcd}(a+b,\frac{a^p +b^p}{a+b})$ in that case, and the gcd is equal to $p$ by what has been shown already.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.