pub fn classical_order(a: u64, n: u64) -> u64Expand description
Brute-force the multiplicative order of a modulo n (classical reference).
Returns the least r ≥ 1 with a^r ≡ 1 (mod n), or 0 if gcd(a, n) ≠ 1
or no order is found within n steps.