the least $m$ such that $a^m\equiv 1 \mod n $ for fixed $a,n$.

66 Views Asked by At

Is there any known method for calculating $\lambda_a(n)$ which returns the smallest integer $m$ such that $a^m\equiv 1 \pmod n$ where $\gcd(a,n)=1$ ?

I searched but I found nothing, is there at least an algorithm that does not use bruteforce ?

Note : as you may note this is closely related to Carmichael function, the difference is that $a$ is fixed here.

1

There are 1 best solutions below

3
On

What you're asking for is known as the order of $a$ modulo $n$. The strongest result I know of is that $\text{ord}_n a\mid \phi(n)$.