Proving if $(a, b)=1$, then $\gcd(\frac{a^n-b^n}{a-b}, a-b) = \gcd(n, a-b)$ [duplicate]

This question already has an answer here:

If $(a, b)=1$, prove that$$\gcd\left(\frac{a^n-b^n}{a-b}, a-b\right) = \gcd(n, a-b).$$

So since $a$ and $b$ are relatively prime that means $\gcd(a,b)=1$. Now, my question is, what theorems would I use to prove this statement? I was thinking something along the lines of using Euclidean algorithm but I wasn't quite sure how I would use it to prove this.

marked as duplicate by Namaste, lulu, Community♦Mar 2 '18 at 3:30

Hint $$a^{n-1}+a^{n-2}b+...+ab^{n-2}+b^{n-1}\\=\left(a^{n-1}-a^{n-2}b \right)+2\left(a^{n-2}b-a^{n-3}b^2\right)+...+(n-1)\left(ab^{n-2}-b^{n-1}\right)+nb^{n-1}$$
• @CBsmith90 Go step by step. The first term is $a^{n-1}$. We want to make $a-b$ a common factor, since this is the second element. To do this we subtract and then add back $a^{n-2}b$. The sum is now $$a^{n-1}+a^{n-2}b+...+ab^{n-2}+b^{n-1}\\=\left(a^{n-1}-a^{n-2}b \right)+2a^{n-2}b+...+ab^{n-2}+b^{n-1}$$ Now, move to the next term $2a^{n-2}b$ and again try to make $a-b$ a factor. Repeat. – N. S. Mar 2 '18 at 1:46