Let $G$ a cyclic group, $|G| = 24$. Let $a\in G$, such that $a^8 \ne e$ and $a^{12}\ne e$. Prove that $\langle a \rangle = G$.
So far i have found that $a^2,a^3,a^4,a^6 \ne e$. So to solve the problem i must prove that the only possibilities is $a^{24} = e$ and $a^{m} \ne e$ for $m=1,2,3,...,23$. Then i have no idea what else to do..
HINT: Since $G$ is cyclic, $G=\langle b\rangle$ for some $b\in G$, and the elements of $G$ are $e,b,b^2,\ldots,b^{23}$. In particular, $a=b^k$ for some $k\in\{0,1,\ldots,23\}$. You know that $a^8\ne e$ and $a^{12}\ne e$, so you know that $b^{8k}\ne e$ and $b^{12k}\ne e$. That rules out many values of $k$. For instance, $k\ne 2$, because $b^{2\cdot12}=b^{24}=e$. What values of $k$ are ruled out? What values are left? If $k$ is one of these remaining values, why is $a=b^k$ a generator of $G$? What property of $k$ determines this?