Let $p$ be an odd prime number, $a,b\in\mathbb{Z}$ such that $\gcd(a,p)=\gcd(b,p)=1$ and $a\equiv b\pmod{p}$. Prove that $a^ n\equiv b^n\pmod{p^k}$ if and only if $n(a-b)\equiv 0 \pmod {p^k}$ in which $k,n\in\mathbb{N}$.
This is what I did(spoiler: I did almost nothing):
$p$ is an odd prime number, therefore $(\mathbb{Z}/p^k\mathbb{Z})^\times =\{\overline{x}\in\mathbb{Z}/p^k\mathbb{Z}:\gcd (x,p^k)=1\}$ with the multiplication is a cyclic group. By hypothesis we have that $\gcd(a,p)=1$ and $\gcd(b,p)=1$. Therefore $\gcd(a,p^k)=1$ and $\gcd(b,p^k)=1$ which implies that $\overline{a},\overline{b}\in (\mathbb{Z}/p^k\mathbb{Z})^\times$.
Let $\varphi(n)$ be the Euler's totient function. Then the cardinality of $(\mathbb{Z}/p^k\mathbb{Z})^\times$ is $\varphi(p^k)=(p-1)p^{k-1}$.
$(\Rightarrow)$ Suppose that $\overline{a}^n=\overline{b}^n$. Therefore $\overline{ab^{-1}}^n=1$.
My strategy is to prove that $ab^{-1}$ is a generator of the group $(\mathbb{Z}/p^k\mathbb{Z})^\times$ because this implies that $\varphi(p^k)$ is the order of $ab^{-1}$ which implies that $\varphi(p^k)|n$. I believe that this can indeed occur since, by hypothesis, $a\equiv b\mod p\Rightarrow ab^{-1}\equiv 1\pmod{p}$. But unfortunately I could not prove it.
If $\varphi(p^k)|n$, then exists $m\in\mathbb{Z}$ such that $n=\varphi(p^k)m$. We know that $a-b=cp$ in which $c\in\mathbb{Z}$. Therefore $n(a-b)=(p-1)p^{k-1}mcp=(p-1)p^kcm\Rightarrow n(a-b)\equiv 0 \mod p^k$. Therefore we can prove this implication if $\varphi(p^k)|n$. But does this actually occur?
Could someone please help me?
Below are some lemmas that may be helpful.
Lemma 1: Let $p$ be a prime number. If the class of $x\in\mathbb{Z}$ generates $\mathbb{Z}/p\mathbb{Z}$ then $\overline{x}$ or $\overline{x+p}$ generates $(\mathbb{Z}/p^2\mathbb{Z})^\times$.
Lemma 2: Let $p$ be an odd prime number. If the class of $x\in\mathbb{Z}$ generates $(\mathbb{Z}/p^2\mathbb{Z})^\times$ then it also generates $(\mathbb{Z}/p^k\mathbb{Z})^\times$.
Lemma 3: Let $m\geq 1$ be an integer. Then $|\{\overline{x}\in (\mathbb{Z}/p^k\mathbb{Z})^\times :\overline{x}^m=1\}|=\gcd(m,\varphi (p^k))$. Here |A| means the cardinality of the set $A$.
EDIT: I realized that the above strategy will not work. To see this, just pick $(p,a,b,k,n)=(3,5,2,2,3)$. But I thought of other strategies:
We know that $\overline{ab^{-1}}^n=\overline{1}$. Let $c=ab^{-1}$. Therefore $c^n\equiv 1\pmod {p^k}\Rightarrow (c-1)(1+c+\cdots +c^{n-1})\equiv 0\pmod {p^k}$.
If we demonstrate that $1+c+\cdots +c^{n-1}\equiv n\pmod {p^k}$, then we will finish the demonstration. Maybe we can prove this using $c=ab^{-1}\equiv 1\pmod p$.