What is the smallest element $a$ in $\mathbb{Z}/36\mathbb{Z}$ such that $\langle21\rangle=\langle a\rangle$? What is the smallest element $a\in\mathbb{Z}/36\mathbb{Z}$ such that $\langle21\rangle=\langle a\rangle$? So I know that $\langle21\rangle$ has order 12 in $(\mathbb{Z}/36\mathbb{Z})$. Does it have anything to do with finding the smallest element $a$? I mean, is the order relevant here?

For every element $a\in\mathbb{Z_n}$ we have $\langle a\rangle=\langle \gcd(a,n)\rangle$. I'll give a short proof. Let $d=\gcd(a,n)$. $d|a$ so $a\in\langle d\rangle$ and that implies $\langle a\rangle\leq \langle d\rangle$. As for the other direction note that there are integers $k,l\in\mathbb{Z}$ such that $d=ka+ln$. If we write this equation in $\mathbb{Z_n}$ then we get $d=ka$. Hence $d\in\langle a\rangle$ and that implies $\langle d\rangle\leq \langle a\rangle$. So $\langle d\rangle=\langle a\rangle$.
Now, in your specific example $\gcd(21,36)=3$ so $\langle 21\rangle=\langle 3\rangle$. So the $a$ you need to find is at most $3$. Easy to check that smaller elements of $\mathbb{Z_{36}}$ generate different subgroups. (look at their orders) 
