Motivation for $r$ in AKS Primality Test

206 Views Asked by At

I've been reading up on the AKS primality test, and I understand the big ideas and proofs as they are pretty elementary number theory. I am confused about how to value of $r$ is selected. In the algorithm, the value of $r$ is chosen as such:

Find the smallest $r$ such that $o_r(n) > (log(n))^2$, where $n$ is the number we're checking to see if prime or not.

I've read several papers on the AKS test, but I still don't understand the motivation. Could you please explain to me why $r$ is defined as such?