- exists-primitive-root? nprocedure
- n
- integer
Returns #t if the group Un has a primitive root (i.e. it is cyclic), otherwise #f is returned. In other words, #t is returned if n is one of 1, 2, 4, p^e, 2*p^e where p is an odd prime, and #f otherwise. The modulus n must be positive.
> (exists-primitive-root? 5) #t > (exists-primitive-root? 6) #t > (exists-primitive-root? 12) #f