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


2 Answers 2


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


Not the answer you're looking for? Browse other questions tagged .