[proofplan]
The proof reduces the question of generation to a question about element order. Since $G$ is finite cyclic of order $n$, an element generates $G$ exactly when its cyclic subgroup has $n$ elements. We then use the formula for the [order of a power in a finite cyclic group](/theorems/8239), which computes $\operatorname{ord}(g^k)$ as the quotient of $n$ by $\gcd(n,k)$, and compare this number with $n$.
[/proofplan]
custom_env
admin
[step:Translate generation into equality of orders]Fix $k \in \mathbb{Z}$. Define the order function on $G$ by
\begin{align*}
\operatorname{ord}: G \to \mathbb{N}_{>0}, \quad h \mapsto \min\{m \in \mathbb{N}_{>0} : h^m=e\}.
\end{align*}
Since $G$ is finite and $|G| = n$, the element $g^k$ generates $G$ if and only if the subgroup generated by $g^k$ is all of $G$, namely $\langle g^k\rangle = G$. Because $\langle g^k\rangle \le G$ and $G$ is finite, this is equivalent to $|\langle g^k\rangle| = |G| = n$; a subgroup of a finite group with the same cardinality as the ambient group must be the whole group. By [citetheorem:8236] applied to the element $g^k \in G$, we have $|\langle g^k\rangle| = \operatorname{ord}(g^k)$. Therefore $g^k$ generates $G$ if and only if $\operatorname{ord}(g^k)=n$.[/step]
custom_env
admin
[guided]We first convert the statement into something numerical. To do that, we fix the order notation explicitly: define
\begin{align*}
\operatorname{ord}: G \to \mathbb{N}_{>0}, \quad h \mapsto \min\{m \in \mathbb{N}_{>0} : h^m=e\}.
\end{align*}
With that notation in place, saying that $g^k$ is a generator of $G$ means exactly that the subgroup generated by $g^k$ is all of $G$, namely $\langle g^k\rangle = G$. Because $G$ is finite of order $n$, this subgroup equality is equivalent to equality of cardinalities. Indeed, if $\langle g^k\rangle = G$, then $|\langle g^k\rangle| = |G| = n$. Conversely, since $\langle g^k\rangle \le G$, a subgroup of a finite group with the same cardinality as the whole group must be the whole group. Thus $g^k$ generates $G$ if and only if $|\langle g^k\rangle| = n$.
Now we identify this cardinality with the order of the element $g^k$. By [citetheorem:8236] applied to the group $G$ and the element $g^k \in G$, $|\langle g^k\rangle| = \operatorname{ord}(g^k)$. Hence the generation condition is equivalent to $\operatorname{ord}(g^k)=n$. This is useful because the order of $g^k$ can be computed explicitly in terms of $n$ and $k$.[/guided]
custom_env
admin
[step:Compute the order of $g^k$]
Since $G=\langle g\rangle$ has order $n$, the element $g$ has order $n$. By [citetheorem:8239] applied to the [cyclic group](/page/Cyclic%20Group) $G=\langle g\rangle$ and the integer $k$, we obtain
\begin{align*}
\operatorname{ord}(g^k) &= \frac{n}{\gcd(n,k)}.
\end{align*}
Combining this with the previous step, $g^k$ generates $G$ if and only if $\operatorname{ord}(g^k)=n$.
[/step]
custom_env
admin
[step:Compare the order formula with $n$]
Because $G$ has finite order $n$, we have $n \in \mathbb{N}$ and $n \ge 1$. Also $\gcd(n,k)$ is a positive divisor of $n$. Therefore $\operatorname{ord}(g^k)=n$ if and only if $\gcd(n,k)=1$. Thus $g^k$ generates $G$ if and only if $\gcd(n,k)=1$, as required.
[/step]