numtheory/primroot(deprecated) - Help

Online Help

All Products    Maple    MapleSim


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

numtheory

  

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[primroot] command 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

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

numtheory[order]

numtheory[pprimroot]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam