# Proving $\gcd( m,n)$=1 [duplicate]

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$?

• Sep 12, 2013 at 16:59
• How to relate the title with the body of the Question? Sep 12, 2013 at 17:08
• Since they have no common factors, that's to say gcd(m,n)=1 Sep 12, 2013 at 17:11
• But, there is no $m$ in the body of your question Sep 12, 2013 at 17:13
• And you use $n$ in a different way in the title vs. how you use $n$ in the body Sep 12, 2013 at 17:14

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$.

If you like modular arithmetic, note that $$\tag 1 a\equiv -b\mod a+b$$

Now, since $n$ is odd $$\frac{{{a^n} + {{b }^n}}}{{a + b}}=\frac{{{a^n} - {{\left( { - b} \right)}^n}}}{{a - \left( { - b} \right)}} = \sum\limits_{k = 0}^{n - 1} {{a^k}{{\left( { - b} \right)}^{n - k-1}}}$$ and using $(1)$ $$\frac{{{a^n} + {{b }^n}}}{{a + b}} = \sum\limits_{k = 0}^{n - 1} {{a^k}{a^{n - k - 1}}} = \sum\limits_{k = 0}^{n - 1} {{a^{n - 1}}} = n{a^{n - 1}}$$

Now since $(a,b)=1$ we have that $$(a,a+b)=(a,a+b\mod a)=(a,b)=1\implies (a^{n-1},a+b)=1$$ so it all reduces to $$(n,a+b)$$