powered by
Determine whether g generates the multiplicative group modulo p.
g
isPrimroot(g, p)
integer greater 2 (and smaller than p).
prime number.
Returns TRUE or FALSE.
Test is done by determining the order of g modulo p.
p
# NOT RUN { isPrimroot(2, 7) isPrimroot(2, 71) isPrimroot(7, 71) # }
Run the code above in your browser using DataLab