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.