Modular Arithmetic Order Computer

Definition: The order of an integer modulo $n$ is the smallest positive power to which you can raise it to obtain $1$ modulo $n$.

Note: it may not exist (the element $0$ never gives $1$ when raised to any positive power!).

Order Computing Tool

Here’s a tool for computing the orders of elements modulo $n$.  Change $n$ and hit evaluate to obtain all orders.

 

Sage Command Examples

Here’s how you compute the order of an element modulo $n$.

 

Let’s double check that actually is the order: