•
|
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 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 ). If only one argument n is present (in this case ) then this function will return the smallest primitive root of the number n.
|