Finding cyclic group $\mathbb{Z}_n^\times$ of prime order

59 Views Asked by At

It can be proven that multiplicative group of integers modulo $N$ defined as

$$\mathbb{Z}^\times_N = \{ i\in \mathbb Z : 1\leq i\leq N−1\; \text{ and }\; \gcd(i,N)=1 \}$$

is cyclic for a prime $N$ and that if it is of prime order, then every non-identity element in the group is a generator of this group.

How can I find such $N$?

I wrote a simple program and brute-forced for $i \in \mathbb Z; i\in [1, 300 000]$ and found no group of prime order so far.