Generator for $\langle a^{21}\rangle \cap \langle a^{10}\rangle$ Suppose that $|a|=24$. Find a generator for $\langle a^{21}\rangle \cap \langle a^{10}\rangle$. 
This is one of the question given in Gallian. 
My instructor gave the following solution
$\langle a^{21}\rangle= \langle a^{\gcd(21,24)}\rangle=\langle a^3\rangle$ and similarly $\langle a^{10}\rangle= \langle a^{\gcd(10,24)}\rangle=\langle a^2\rangle$ 
And later, he went on to prove that the generator of intersection is $a^{6}$.
I didnt quite understand, why he took gcd of $21$ and $24$. I mean what is the result he used. The only result which I can think of is about the generator of cyclic group which states that: $a^k$ generates a cyclic group $G=\langle a\rangle$ of order $n$ iff $\gcd(k,n)=1$      
I would be highly thankful if someone can give an insight into this result and can illustrate how this result is applied to the above problem.
 A: Maybe this result $\langle a^m\rangle = \langle a^{gcd(m,|a|)}\rangle$. It's not hard to prove. 
The inclusion $\langle a^m\rangle \subset \langle a^{gcd(m,|a|)}\rangle$ is immediate, the other one is not so much. Notice $\exists x,y \in \mathbb{Z}$ s.t. $xm+y|a|=gcd(m,|a|)$, then $a^{gcd(m,|a|)}=a^{xm+y|a|}=(a^m)^x\in \langle a^m\rangle$, since $a^{|a|}=1$.
A: Recall that $\gcd(m,n) = \min\{mx+ny >0 | x,y\in\Bbb Z\}$. So your cyclic group's generator would be powers of the smallest positive power of $a$ present since it is cyclic. But then this is exactly the definition of the $\gcd$.
A: Another (similar) approach
The order of $a^k$ is given by
$$|a^k| = \frac{|a|}{\gcd(|a|,k)}.$$
Thus
$$|a^{21}| = \frac{24}{\gcd(24,21)}=\frac{24}{3}=8.$$ 
So
$$\langle a^{21} \rangle=\langle a^{3} \rangle$$
Likewise
$$|a^{10}| = \frac{24}{\gcd(24,10)}=\frac{24}{2}=12.$$ 
So
$$\langle a^{10} \rangle=\langle a^{2} \rangle$$
You want
$$\langle a^k \rangle =\langle a^{21} \rangle \cap \langle a^{10} \rangle = \langle a^{3} \rangle \cap \langle a^{2} \rangle.$$
Thus $k=6$.
