1

Given a prime $p$ and number $a$ isn't divided by $p$, how do I find the smallest positive integer number $n$ such that $a^n≡1\pmod p$?

Example for $a=10; p=13$; $n$ would be $6$.

Is there an algorithms that faster than brute-force with $O(p)$?

Bill Dubuque
  • 272,048
aka61bt
  • 19

0 Answers0