0

For example, $3^b \mod 5$ will cycle through all number between $0$ and $5$:
$3^1 \mod 5 = 3$,
$3^2 \mod 5 = 4$,
$3^3 \mod 5 = 2$,
$3^4 \mod 5 = 1$,
$3^5 \mod 5 = 3$

Another example is
$11^b \mod 13$,
$2^b \mod 5$,
$3^b \mod 7$

Example of modulo that does not cycle through all number between $0$ and $c$ is
$2^b \mod 7$

What are the required condition for $a^b \mod c$ to cycle through all number between $0$ and $c$? is there any material/reference for this?

LLL
  • 103
  • 1
    If a is a primitive root mod n, then $a^b$ will attain any nonzero value mod n. https://en.wikipedia.org/wiki/Primitive_root_modulo_n – C614 Apr 18 '23 at 02:09
  • @C614 ah thanks ! i just googled about primitive root and found the answer immediately – LLL Apr 18 '23 at 02:11

0 Answers0