How to find a generator of a cyclic group?

Finding generators of a cyclic group depends upon the order of the group. If the order of a group is $8$ then the total number of generators of group $G$ is equal to positive integers less than $8$ and co-prime to $8$. The numbers $1$, $3$, $5$, $7$ are less than 8 and co-prime to $8$, therefore if a is the generator of $G$, then $a^3,a^5,a^7$ are also generators of $G.$ Hence there are four generators of $G.$ Similarly you can find generators of groups of order $10$, $12$, $6$ etc.


Your explanation sounds good to me.

In the general case, finding the generator of a cyclic group is difficult. For example, I believe there is no fast algorithm to find a generator for the multiplicative group $(\mathbb Z/p^k\mathbb Z)^\times$ when $p$ is a large prime. But much of the time when you work with a cyclic group you will also naturally know of a generator.

If your cyclic group has order $n$, I claim that there will be one generator for every number between $1$ and $n-1$ (inclusive) that is relatively prime to $n$: in other words, there are $\varphi(n)$ generators, where $\varphi$ is Euler's totient function. Why is my claim correct? Suppose $g$ is a generator for the group, so that $g$ has order $n$. It is a fact, which I encourage you to prove if you have not encountered it, that for an integer $m$ between $1$ and $n$ the order of $g^m$ is $n/(m,n)$, where $(m,n)$ is the greatest common denominator of $m$ and $n$. So for $g^m$ to be a generator -- or equivalently, for $g$ to have order $n$ -- it is both necessary and sufficient that $m$ be relatively prime to $n$. And every element of the group has the form $g^m$ for some $m$. Hence there are $\varphi(n)$ generators.

If your cyclic group has infinite order then it is isomorphic to $\mathbb Z$ and has only two generators, the isomorphic images of $+1$ and $-1$. But every other element of an infinite cyclic group, except for $0$, is a generator of a proper subgroup which is again isomorphic to $\mathbb Z$.


1.) For large group orders it is no suitable to explicitly evaluate all powers of an optional generator to prove the element's order.

2.) The fact that a multiplicative cyclic finite group is isomorphic to some additive finite subgroup in ℤ is not helpful, as the isomorphism is defined exactly by a generator.

Criterion: An element $g$ of multiplicative group of order $(p-1)$ in $ℤ/pℤ$ with prime $p$ is a generator, iff for each prime factor $q$ in the factorization of $p-1$
     g^((p-1)/q) <> 1
holds.

This excludes $g$ from being generator of a real subgroup and reduces the problem to factorization of $p-1$.