<s>[INST] Need help in an elementary number theory problem from Higher Algebra by S. BARNARD Can someone help me solve this question: 

If a and b are coprime and n is a prime,prove that $$\frac{(a^n+b^n)}{(a+b)}$$ and $$a+b$$ have no common factor,unless $a+b$ is a multiple of $n$. 

I've tried it out but not sure about the solution. So can someone help enlighten me. Thanks in advance. It's from Higher Algebra by S. BARNARD. 
 [/INST] We have $$\frac{a^n+b^n}{a+b}=\sum_{j=0}^{n-1}a^j(-b)^{n-1-j}\equiv \sum_{j=0}^{n-1}a^ja^{n-1-j}=na^{n-1}\mod a+b$$ for every odd $n$
Hence if $n$ is an odd prime and $q\ne n$ a prime dividing both $a+b$ and $\frac{a^n+b^n}{a+b}$, we get $$0\equiv \frac{a^n+b^n}{a+b}\equiv na^{n-1}\mod q$$ hence $q$ must didvide $a$ and because $q$ divides $a+b$, $q$ must also divide $b$. But $a$ and $b$ are coprime, we get a contradiction.
In the case $n=2$, we have $a^2+b^2=(a+b)^2-2ab$, hence if $q\ne 2$ divides both $\frac{a^2+b^2}{a+b}$ (and therfore $a^2+b^2$) and $a+b$, it divides $2ab$ and therefore $a$ or $b$ and therefore $a$ and $b$. We get a contradiction again.
</s>