znorder
Computes the multiplicative order of x modulo n, the smallest positive k with x^k ≡ 1 (mod n), for coprime x and n.
Instructions
Compute the multiplicative order of x modulo n.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Positive integer. | |
| x | Yes | Integer coprime to n. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |