chickadee » math » primitive-root

primitive-root nprocedure

Returns a primitive root of Un if one exists, otherwise #f is returned. The modulus n must be positive.

> (primitive-root 5)
2
> (primitive-root 6)
5