numtheory/mroot(deprecated) - Help

numtheory

 mroot
 modular root

 Calling Sequence mroot(x, r, p)

Parameters

 x, r, p - integers

Description

 • Important: The numtheory[mroot] command has been deprecated.  Use the superseding command NumberTheory[ModularRoot] instead.
 • The function mroot computes the rth root of x $\mathbf{mod}p$. It finds an integer y such that ${y}^{r}=x\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}p$ if possible. Otherwise, it returns FAIL.
 • The order, r, of the root must be prime.
 • The command with(numtheory,mroot) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{mroot}\left(5,11,13\right)$
 ${8}$ (1)
 > $\mathrm{mroot}\left(2,3,6\right)$
 ${2}$ (2)