numtheory(deprecated)/primroot - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : numtheory(deprecated)/primroot

numtheory(deprecated)

  

primroot

  

compute a primitive root

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

primroot(g, n)

primroot(n)

Parameters

g

-

positive integer or 0

n

-

integer greater than 1

Description

• 

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.

Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[PrimitiveRoot] instead.

withnumtheory:

primroot2

1

(1)

primroot41

6

(2)

primroot0,41

6

(3)

primroot7,41

11

(4)

order,41

40

(5)

φ41

40

(6)

primroot2,8

FAIL

(7)

See Also

NumberTheory[PrimitiveRoot]

numtheory(deprecated)[order]

numtheory(deprecated)[pprimroot]