How does I find a generation set of multiplicative group of integers modulo $n$ in the following cases:
$n $ is prime, and
$n $ is not prime?
For example I've got $n = 188 = 47 \times 4$. That somehow means that here in this group we have $2$ generators. Moreover we can find them and they are $95$ has order $ 2 $, $45$ has order = $\phi(47) = 46$.
$\phi$ is the Euler's function.
So the problem is - I've got an answer, but I don't know, how to get it.
If order of group is prime $p$(say) . Then of course it is cyclic and it has $\psi(p)=p-1$ generators( one can prove it). If order of group is not prime then the matter is a bit complicated. You can fight with permutation group and Dihedral group and so on..
But there is an important theorem you need to keep in mind i.e., Cauchy's theorem, it states that if $G$ is a finite group and $p$ is a prime number dividing the order of $G$ (the number of elements in $G$), then $G$ contains an element of order $p$.