List all elements of order 10 and 20 in $Z_{20}$ List all elements of order 10 and 20 in $Z_{20}$. I know how to compute all elements generated by a single element. Example I take <5>, I start from 5 and add 5 (mod 20), until I get back to 5. That would leave me with <5>={0,5,10,15}. I also directly see the order, which is 4 in this case. However to answer the question I would have to do this for every single element (and there are 20) and I feel like that's a bit long and inefficient. Is there a faster way to do it? 
 A: The answer to your question would be more immediate if you have learned some number theory.
Let $n\in \mathbb Z_{20}$ such that $\operatorname{ord}(n)=10$. Then 
$$\forall 1\le m<10,\quad nm\not\equiv 0\pmod{20}.$$
In particular let $m=5$ to get
$$n\not\equiv 0\pmod{4}.$$
Also we require
$$10n\equiv 0\pmod{20}\Rightarrow n\equiv 0\pmod{2}.$$
Hence our candidate elements of $n$ are $2,6,10,14,18$. (You can check that everything except for $10$ has order $10$.)
Suppose that $\operatorname{ord}(n)=20$. Then 
$$\forall 1\le m<20,\quad nm\not\equiv 0\pmod{20}.$$
This means that $n$ is unit $\mathbb Z_{20}$ i.e. $\operatorname{hcf}(n,20)=1$. Then our candidate elements of $n$ are $1,3,7,9,11,13,17,19$.
I hope this helps!
A: An element of order 10 in $\mathbb{Z}_{20}$ is represented by an integer $m\in\{1,\dots,19\}$ such that $10 m \equiv 0~ (\text{mod }20)$ and for any $1\leq j\leq 9$ we have $(j\cdot m)~\text{mod 20}\neq0$. The first condition means that we want to find those integers $m$ for which $\frac{10m-0}{20}$ is an integer, or equivalently,
$$\frac{10m-0}{20}=k,k\in\mathbb{Z}\iff 10m=20k,k\in\mathbb{Z}\iff m=2k,k\in\mathbb{Z}.$$
So from this condition alone you can eliminate half of the candidates in $\{1,\dots,19\}$, i.e. all the odd numbers.
In order for the remaining candidates $m\in\{2,4,6,\dots,18\}$ to be of order 10, they have to satisfy
$$(j\cdot m)\not\equiv 0 (\text{mod 20}), \text{ for all }j=1,\dots,9,$$
or, equivalently,
$$\frac{j\cdot m}{20}\notin \mathbb Z  \text{ for all }j=1,\dots,9.$$
Let's try this with $m=2$. Is there a $j\in\{1,\dots,9\}$ such that $\frac{2j}{20}$ is an integer? Obviously not. So $2$ is of order 10.
How about $m=4$, is there a $j\in\{1,\dots,9\}$ such that $\frac{4j}{20}=\frac{j}{5}$ is an integer? Yes, it is $j=5$, so $m=4$ does not have order 10.
Continuing in this way all elements of order 10 in $\mathbb{Z}_{20}$ can be found.
The same reasoning can be applied to find the elements of order 20, however in this case the step in which we eliminated all the odd numbers now is redundant since $20 m \equiv 0 \text{(mod 20)}$ is true for all $m$.
But we can still restrict our candidate set by ejecting all the elements of order 10 which we have just found, then ejecting elements of order 2 (obviously 10 is of order 2) etc. 
