Q:

$\gcd(a, b) = \gcd(a, b-a^n)$ where $n\ge 1$ . Is this statement true?

From Euclid I know $\gcd(a,b) = \gcd(a, b-ka)$
I'm wondering if it is legal to replace $k$ by $a^{n-1}$ ?
I'm a bit skeptical here because $a$ is a variable... It's not like $k$ I guess.
Appreciate any help. Thank you!

A:

Let $\gcd (a,b)= m$
and $\gcd (a,b-a^n) = d$. 
So,
$$ d\big| a \implies d\big| a^n \tag 1 $$
Also,
$$d\big|(b- a^n)\tag 2 $$
From $(1)$ and $(2)$, we get $d\big| b$. Thus , $d\big| a$ and $d\big| b$. This implies that $$d| gcd (a,b) =m \tag 3$$
We now show,$m\big| d$. As $m\big| a$ and $m\big| (b-a^n)$ and ,$gcd (a,b-a^n) = d$, thus, $$m\big|d \tag 4$$
From $(3)$ and $(4)$, we get $m=d$.

A:

If $k$ can be any integer, then it is valid, seeing $a^{n-1}$ is also an integer.

