proof about generators of a cyclic group

Let $G$ be a cyclic group of order $n$, generated by $a$. We write $G = \langle a \rangle$.

I wish to verify my proofs of: $a^k$ is a generator if and only if $\gcd(k,n)=1$.

direction $1$:

First I assume that $\gcd(k,n)=1$.

Consider the set $\{a^k, a^{2k},...,a^{nk} = e\}$.

This set is a subset of the cyclic group generated by $a$ ($\langle a \rangle$) and if I can show it has the same number of elements, then I am done.

Since $\gcd(k,n)=1$, by fundamental theorem of arithmetic, it follows that $\text{lcm}(k,n) = kn$. Thus $mk$ is not a multiple of $n$ for $0 < m < n$. $a^{mk} = 1$ iff $mk$ is a multiple of $n$, thus $n$ is least positive integer such that $(a^k)^n = a^{kn} = 1$, and so $\langle a^k \rangle$ is of order $n$ and we are done.

Other direction:

Now suppose that $a^k$ generates $\langle a \rangle$. Then $\langle a^k \rangle$ is a group of order $n$, and so $\{a^k, a^{2k},...,a^{nk} = e\}$ should have $n$ elements. This implies that $n$ is smallest positive integer such that $(a^k)^n = a^{kn} = 1$. Thus $mk$ is not a multiple of $n$ for $0 < m < n$. Thus $\text{lcm(n,k)} = nk$. Thus $\gcd(n,k) = 1$.

In order to prove it in the other direction, I would have done this: if $\gcd(n,k)=d>1$, then$$\langle a^k\rangle=\left\{a^k,a^{2k},\ldots,a^{\frac ndk}=a^{n\frac kd}=e\right\}.$$Since this set has less than $n$ elements, it is not the whole group $G$.