compute a pseudo primitive root
positive integer or 0
integer greater than 1
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[PseudoPrimitiveRoot] instead.
The function pprimroot(g, n) computes the next primitive root larger than g or, if n does not have primitive roots, computes a number which is not a root of order of any of the factors of φ⁡n.
Thus (in all cases), find an integer y, such that there is no x for which xr=ymodn when r is a divisor of φ⁡n greater than 1 and igcd⁡y,n=1.
If only one argument n is present then this function will return the smallest primitive root of the number n. If there is no primitive root of n then this function will return the smallest integer y, such that there is no x for which xr=ymodn when r is a divisor of φ⁡n greater than 1 and igcd⁡y,n=1.
The command with(numtheory,pprimroot) allows the use of the abbreviated form of this command.
Download Help Document
What kind of issue would you like to report? (Optional)