3

From Number Theory we have the theorem that:

There are primitive roots mod $n$ if and only if $n = 1,2,4,p^k, 2p^k$, where $p$ is an odd prime.

The question is, for such general $n$ given as above (with $n \neq p$), how does one find primitive roots without having to brute-force? Perhaps the Chinese Remainder Theorem is relevant? I'm excluding the case $n=p$ because it already has a well-written answer Finding a primitive root of a prime number .

J. W. Tanner
  • 60,406
Albert
  • 1,557

1 Answers1

0

Thanks to everyone who commented! From the comments, the answer can be found:

For $n = p^k$, firstly find a primitive root modulo $p$ as in Finding a primitive root of a prime number. Then, use that if $g$ is a primitive root mod $p$, then $g$ or $g+p$ is a primitive root mod $p^k$ for any $k \in \mathbb{Z}_{\ge 1}$. Then for $n = 2p^k$, denoting by $g'$ the primitive root for $p^k$, either $g'$ or $g'+p^k$ is a primitive root mod $2p^k$.

But if anyone wants to post their own methods or proofs of the propositions used (I actually don't know the proofs), please do so!

Albert
  • 1,557