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.