numtheory(deprecated)/order - Maple Help

numtheory(deprecated)

 order
 order of a number

 Calling Sequence order(n, m)

Parameters

 n - integer m - positive integer

Description

 • Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[MultiplicativeOrder] instead.
 • The smallest integer i such that ${n}^{i}=1\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}m$ is returned.
 • More formally, the order of n in the multiplicative group mod m is returned. If n and m are not coprime, then FAIL is returned.
 • The command with(numtheory,order) allows the use of the abbreviated form of this command.

Examples

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

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{order}\left(13,100\right)$
 ${20}$ (1)
 > $\mathrm{order}\left(5,8\right)$
 ${2}$ (2)
 > $\mathrm{order}\left(8,12\right)$
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{primroot}\left(20,239\right)$
 ${21}$ (4)
 > $\mathrm{order}\left(,239\right)$
 ${238}$ (5)
 > $\mathrm{\phi }\left(239\right)$
 ${238}$ (6)