<s>[INST] Proving $\gcd( m,n)$=1 If $a$ and $b$ are co prime and $n$ is a prime, show that:
$\frac{a^n+b^n}{a+b}$ and $a+b$ have no common factor unless $a+b$ is a multiple of $n$
Also enlighten me why $n$ has to be prime so that $\frac{a^n+b^n}{a+b}$ and $a+b$ have no common factor unless $a$+$b$ is a multiple of $n$?
 [/INST] For odd $n$, we have
$$\frac{a^n+b^n}{a+b} = a^{n-1} - a^{n-2}b +-\dotsb -ab^{n-2} + b^{n-1} = \sum_{k=0}^{n-1} (-1)^k a^{n-1-k}b^k.$$
The latter sum can be written as
$$\left(\sum_{k=0}^{n-2} (-1)^k(k+1)a^{n-2-k}b^k\right)(a+b) + (-1)^{n-1}nb^{n-1}$$
(verification by distributing $(a+b)$ over the sum is elementary). Thus we have
$$\gcd\left(\frac{a^n+b^n}{a+b}, a+b\right) = \gcd \left(nb^{n-1},a+b\right) = \gcd(n,a+b),$$
the last because $\gcd(b,a+b) = \gcd(b,a) = 1$.
So if $n$ is an odd prime, we have a common factor (namely $n$) if and only if $a+b$ is a multiple of $n$. For odd composite $n$, we can have common factors also if $a+b$ is not a multiple of $n$, it is sufficient that some prime factor of $n$ divides $a+b$.
For the even prime $n = 2$, in general $\dfrac{a^2+b^2}{a+b}$ is not an integer. For coprime $a,b > 0$, it is only an integer if $a = b = 1$.
</s>