Show that $\gcd\left(\frac{a^n-b^n}{a-b},a-b\right)=\gcd(n d^{n-1},a-b)$ How to show that

$$ \gcd\bigg( {a^n-b^n \over a-b} ,a-b\bigg )=\gcd(n d^{n-1},a-b ) $$ 
  $a,b\in \mathbb Z$

where $d=\gcd(a,b)$?

Note $\ $ Some of the answers below were merged from this question. The answers (and their comments) may depend on context provided in that question.
 A: Putting $c=a-b,$ we get, $$(a-b, \frac{a^n-b^n}{a-b})=(c, \frac{(b+c)^n-b^n}c)=(c,\binom n 1 b^{n-1}+\binom n 2 b^{n-2}c+\cdots+c^{n-1})=(c,nb^{n-1})$$
As $(c,b)=(a-b,b)=(a,b)=d,$ let $\frac c C=\frac b B=d$ so that $(B,C)=1$
$$(c,nb^{n-1})=(Cd,nB^{n-1}d^{n-1})=d(C,nB^{n-1}d^{n-2})=d(C,nd^{n-2})$$ as $(B,C)=1$
$$(c,nb^{n-1})=d(C,nd^{n-2})=(Cd,nd^{n-1})=(c,nd^{n-1})=(a-b, nd^{n-1})$$
A: $\!{\rm mod}\ \color{#c00}{a\!-\!b}\!:\ c\, := a^{n-1}\!\!+a^{n-2}b+\cdots+\!b^{n-1}\!\equiv\!\overbrace{\color{#0a0}{na^{n-1}}}^{\large {\rm by}\,\ \color{#c00}{b\,\equiv\, a}}\!\!\equiv\!\overbrace{\color{#0a0}{nb^{n-1}}}^{\large {\rm by}\,\ \color{#c00}{a\,\equiv\, b}}\!.\,$ By $\rm\color{#90f}{FD}\!=\!$ Freshman's Dream 
$$\Rightarrow\ \underbrace{(a\!-\!b,c) = (a\!-\!b,\color{#0a0}{na^{n-1}\!,nb^{n-1}})}_{\Large\: (a-b,\,c)\ =\ \:\!(a-b,\,\  c\,\ {\rm mod}\,\ \color{#c00}{a-b})\ \ }\! \underset{\begin{align}\\[-2pt] \large{\rm\, by\ \, Euclid}\end{align}\qquad\qquad\qquad}{\:\! = (a\!-\!b,n(a^{n-1}\!,b^{n-1}))}\! \overset{\color{#90f}{\rm FD}}= (a\!-\!b,n(a,b)^{n-1})\,\ \ {\bf\small QED}\qquad\ \  $$

Merge Disclaimer $\ $ This was the accepted answer to  this question. It was merged here by a moderator, so some things might appear unusual (notation, comments, votes, duplicity, etc)
A: We have $\large\ d=(a,b)\ ,\ $ thus $\large\ \exists\ A,B\ \ \ a=Ad,\ b=Bd,\ (A,B)=1$  
$\large\left(\LARGE\frac{a^n-b^n}{a-b}\large,a-b\right)=(n d^{n-1},a-b)$
$\large\ d\left(d^{n-2}\cdot\LARGE\frac{A^{\ n}-B^{\ n}}{A-B}\large,A-B\right)=d(n d^{n-2},A-B)$  
Let $\large\ m=A-B\ ,\ \ \ \ $ then $\large\ (m,B)=1$  
$\large\ \left(d^{n-2}\cdot\LARGE\frac{(B+m)^n-B^n}{m}\large,m\right)=(nd^{n-2},m)$
$\large\ \left(d^{n-2}\cdot(nB^{n-1}+Qm),m\right)=(nd^{n-2},m)\ \ \ \ $ for some integer Q
$\large\ \left(nd^{n-2}B^{n-1},m\right)=(nd^{n-2},m)\ ,\ \ $ which is due to $\large (m,B)=1$.
A: Here are some major thoughts:


*

*Reduce $a^{n-1}+a^{n-2}b+\cdots+ab^{n-2}+b^{n-1}$ modulo $a-b$ by setting $a=b$.

*Note $a=(a,b)\cdot\frac{a}{(a,b)}$ and $\left(\frac{a}{(a,b)},a-b\right)=\left(\frac{a}{(a,b)},b\right)=\frac{(a,b)}{(a,b)}=1$.
A: This answer does the case $\gcd(a,b)=1$ only.
**Main idea:**$\let\v\nu\let\geq\geqslant$ investigate how many times a prime divides $a^n-b^n$.  
For $m\in\mathbb N$, let $\v_p(m)$ denote the exponent (multiplicity) of the prime $p$ in the prime factorisation of $m$.

Lemma (Lifting The Exponent) let $a,b\in\mathbb Z$, $p\mid a-b$ prime, $p\nmid a$ and $n\in\mathbb N$.
  
  
*
  
*If $p\nmid n$, then $$\v_p(a^n-b^n)=\v_p(a-b).\tag{1}$$
  
*If $p$ is odd, then $$\v_p(a^n-b^n)=\v_p(a-b)+\v_p(n).\tag{2}$$
  
*If $p=2$ and $4\mid a-b$, then $$\v_2(a^n-b^n)=\v_2(a-b)+\v_2(n).\tag{3}$$
  
*If $p=2$ and $2\mid n$, then $$\v_2(a^n-b^n)=\v_2(a^2-b^2)+\v_2(\tfrac n2).\tag{4}$$
Proof. See here (Lemma 1, Theorem 1, Theorem 2, Theorem 4)
  Note that 1. is contained in 2. and 3. except when $p=2$ and $4\nmid a-b$.
  4. is an easy consequence of 3. by letting $a\mapsto a^2$, $b\mapsto b^2$ and $n\mapsto\frac n2$.

Let $p$ be a prime divisor of $a-b$. Because $\gcd(a,b)=1$, we have $p\nmid a$. We'll prove that
$$\v_p\left(\gcd\left(\frac{a^n-b^n}{a-b},a-b\right)\right)=\v_p(\gcd(n,a-b)).$$
If $p$ is odd or $p=2$ and $4\mid a-b$, then $\v_p\left(\frac{a^n-b^n}{a-b}\right)=\v_p(n)$ by $(2),(3)$, hence
$$\begin{align*}\v_p\left(\gcd\left(\frac{a^n-b^n}{a-b},a-b\right)\right)&=\min\left(\v_p\left(\frac{a^n-b^n}{a-b}\right),\v_p(a-b)\right)\\
&=\min(\v_p(n),\v_p(a-b))\\
&=\v_p(\gcd(n,a-b)).\end{align*}$$
The only case left is $p=2$ and $4\nmid a-b$.
If $n$ is odd, then by $(1)$ we know that $\frac{a^n-b^n}{a-b}$ is odd too.
If $n$ is even, $(4)$ gives that $\v_p(a^n-b^n)\geq\v_p(a-b)+1$, hence $\frac{a^n-b^n}{a-b}$ is even.
Either way,
$$\v_2\left(\gcd\left(\frac{a^n-b^n}{a-b},a-b\right)\right)=\v_2(\gcd(n,a-b)).$$
