NumberTheory
ModularRoot
modular root
Calling Sequence
Parameters
Description
Examples
Compatibility
ModularRoot(x, r, n)
x
-
integer
r
non-negative integer
n
positive integer
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.
with⁡NumberTheory:
The following numbers have cube roots modulo 24.
residues≔seq⁡i3mod24,i=0..23
residues≔0,1,3,5,7,8,9,11,13,15,16,17,19,21,23
13 has a cube root modulo 24.
evalb⁡13inresidues
true
ModularRoot⁡13,3,24
13
133mod24
12 does not have a cube root modulo 24 and so an error message is displayed.
evalb⁡12inresidues
false
ModularRoot⁡12,3,24
Error, (in NumberTheory:-ModularRoot) 12 is a 3rd order non-residue modulo 24
The NumberTheory[ModularRoot] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
NumberTheory[ModularSquareRoot]
NumberTheory[PrimitiveRoot]
NumberTheory[RootsOfUnity]
Download Help Document