Modular Root - Maple Help

Online Help

All Products    Maple    MapleSim


NumberTheory

  

ModularRoot

  

modular root

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ModularRoot(x, r, n)

Parameters

x

-

integer

r

-

non-negative integer

n

-

positive integer

Description

• 

The ModularRoot function computes a non-negative integer y such that yr=xmodn if possible. If not possible, an error message is displayed.

• 

When x has more than one roots of order r, any one of them may be returned.

Examples

withNumberTheory:

The following numbers have cube roots modulo 24.

residuesseqi3mod24,i=0..23

residues0,1,3,5,7,8,9,11,13,15,16,17,19,21,23

(1)

13 has a cube root modulo 24.

evalb13inresidues

true

(2)

ModularRoot13,3,24

13

(3)

133mod24

13

(4)

12 does not have a cube root modulo 24 and so an error message is displayed.

evalb12inresidues

false

(5)

ModularRoot12,3,24

Error, (in NumberTheory:-ModularRoot) 12 is a 3rd order non-residue modulo 24

Compatibility

• 

The NumberTheory[ModularRoot] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

NumberTheory

NumberTheory[ModularSquareRoot]

NumberTheory[PrimitiveRoot]

NumberTheory[RootsOfUnity]