compute a primitive root
positive integer or 0
integer greater than 1
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[PrimitiveRoot] instead.
The function primroot will compute the first primitive root of n that is greater than g, if possible, otherwise it returns FAIL. The integers that are relatively prime to n form a group of order φ⁡n under multiplication mod n. If this group is cyclic then a generator of the group is called a primitive root of n (i.e. the order of primroot (g, n) is φ⁡n). If only one argument n is present (in this case g=0) then this function will return the smallest primitive root of the number n.
The command with(numtheory,primroot) allows the use of the abbreviated form of this command.
Download Help Document
What kind of issue would you like to report? (Optional)