WORKED DEFAULT
Check the calculation with the default inputs
For base 2 modulo 9, residues return to one at exponent 6, so ord_9(2) = 6.
- Check coprimalitygcd(2,9) = 1
- Advance residues2, 4, 8, 7, 5, 1
- Read first returnOrder = 6
MODULAR ARITHMETIC / ELEMENT ORDER
Find the least positive exponent that sends a coprime base to residue one modulo m.
METHOD / WORKED EXAMPLE
Find the least positive exponent that sends a coprime base to residue one modulo m. The page exposes the recurrence, factorization, or residue evidence used to obtain the bounded exact result.
WORKED DEFAULT
For base 2 modulo 9, residues return to one at exponent 6, so ord_9(2) = 6.
READ THE RESULT
The order describes the cycle length of one invertible residue, not the universal cycle length of every residue.
ASSUMPTIONS AND LIMITS
This educational repeated-product implementation is bounded and is not a discrete-logarithm solver or cryptographic primitive.
COMMON QUESTIONS
Validate coprimality, normalize the base, and iterate exact modular products up to the Carmichael bound until residue one first appears. If gcd(a,m) exceeds one, a is not a unit and this multiplicative order is undefined. Inputs must be whole numbers inside the displayed safe bound. The calculator does not round decimals into the domain or silently substitute a different convention, so verify each entered integer before interpreting the exact result.
The order describes the cycle length of one invertible residue, not the universal cycle length of every residue. Computing a^order modulo m must return one, while every smaller positive exponent must fail that test. Use the displayed factors, recurrence step, or modular residue as an independent check. Exact integer output means the implemented arithmetic has no decimal approximation within its bound; it does not prove an unrelated theorem or an unstated combinatorial model.
This educational repeated-product implementation is bounded and is not a discrete-logarithm solver or cryptographic primitive. Large-modulus order finding generally uses factorization and stronger algorithms rather than an unrestricted linear search. The bound keeps browser work predictable and every returned integer within JavaScript's exact safe range. Larger inputs need arbitrary-precision software, explicit resource controls, and independent verification rather than treating an overflowed floating-point value as exact.
RELATED TOOLS
Use boundary
Validate coprimality, normalize the base, and iterate exact modular products up to the Carmichael bound until residue one first appears. The workspace preserves the bounded integer method and verification evidence beside the result.
ord_m(a) = least k > 0 such that a^k is congruent to 1 mod m.