numtheory(deprecated)
order
order of a number
Calling Sequence
Parameters
Description
Examples
order(n, m)
n
-
integer
m
positive integer
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[MultiplicativeOrder] instead.
The smallest integer i such that ni=1modm 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.
with⁡numtheory:
order⁡13,100
20
order⁡5,8
2
order⁡8,12
FAIL
primroot⁡20,239
21
order⁡,239
238
φ⁡239
See Also
NumberTheory[MultiplicativeOrder]
numtheory(deprecated)[pprimroot]
numtheory(deprecated)[primroot]
Download Help Document