This is from Pinter's Book of Abstract Algebra Chapter 11, Exercise D5.
Let $n=\operatorname{ord}(a)$.
I think I can prove the $\Rightarrow$ direction: since $a^r$ generates $\langle a \rangle$ iff $\gcd(r, n)=1$, hence $a=b^k$ generates $\langle b \rangle$. Since $a$ generates $\langle a\rangle$ and $\langle b \rangle$, the equality holds.
But I have trouble proving the $\Leftarrow$ direction. What I can see so far:
$\langle a\rangle\subseteq\langle b\rangle$ because $a = b^k\tag 1$
$n\mid\operatorname{ord}(b)\tag 2$ because the order of cyclic subgroup $A$ of cyclic group $B$ divides the order of cyclic group B. $\operatorname{ord}(b)\mid k n\tag 3$ because $b^{kn}=a^k=e$
Because of $(1)$, we know that $\langle a \rangle=\langle b\rangle$ iff $a$ and $b$ have the same order, so it feels like I just need to tighten $(2)$ and $(3)$, but I am stuck. Any help will be appreciated.
\mid
and, if you want $\nmid$, use\nmid
. – PinkyWay Jun 05 '20 at 08:12