numtheory(deprecated)
pprimroot
compute a pseudo primitive root
Calling Sequence
Parameters
Description
Examples
pprimroot(g, n)
pprimroot(n)
g
-
positive integer or 0
n
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.
with⁡numtheory:
pprimroot⁡1,41
6
pprimroot⁡2,8
3
pprimroot⁡24
5
See Also
NumberTheory[PseudoPrimitiveRoot]
numtheory(deprecated)[order]
numtheory(deprecated)[primroot]
Download Help Document