# All the generators of given order

$Z_{24}$ is group and I have to find all generators of <21>. Or in other words for all m belongs to $Z_{24}=<m>$.I am able to obtain answer by hit and trial is there any other way. Thanks for help in advance.

• You need to find all $m$ such that $21 \in \langle m \rangle$, the subgroup generated by $m$ - is that right? Commented Sep 9, 2017 at 23:36

Hint:

For any modulus $n$ and any integer $a$, $\;\langle\, a\,\rangle=\langle\,\gcd(a,n)\,\rangle,$

As $24=2^3\cdot 3$ and $\gcd(21,24)=3$, there results that the generators of the subgroup generated by $21$ are generated by odd multiples of $3$ which are $<24$.

Assuming that what you are looking for is all $m$ such that $21\in \langle m \rangle$:

Every number coprime to $24$ will (re)generate the whole group: $\{1,5,7,11,13,17,19,23\}$. Additionally note that $\gcd(21,24)=3$, so additionally numbers $3k$ where $k$ is coprime to $24/3=8$ will generate a subgroup of multiples of $3$: $\{3,9,15,21\}$ (and note that these four generate exactly the same subgroup, so this is the answer set for $\langle m \rangle=\langle 21 \rangle$).

The combination of these two answers ends up including all the odd numbers. We can also see that no even number will generate a group containing $21$.

In $\Bbb Z_n$, $S=\{g\in \Bbb Z_n:g$ genertes $\langle m \rangle \}=\{m^b:gcd(b, \frac{n}{gcd(n,m)}\}=1$. You can get the result from any book of Group theory.