I am trying to implement Modified Miller-Rabin Algorithm by Shyam Narayanan (https://math.mit.edu/research/highschool/primes/materials/2014/Narayanan.pdf). The algorithm demands to check if a number is carmichael number. Is there any possible algorithm to check if a number of the order $10^{100}$ is a carmichael number or not in reasonable time on a standard PC?(Other than by efficient factorization)
The Paper also describes that there is a $O(\log(n)^4)$ algo for checking if a number is carmichael or not. Do any such algorithm exists?
First check, whether the given number $n$ is prime. (This can be done efficiently and $100$% correct very fast for numbers with about $100$ digits).
If the number is prime, it is not a carmichael number.
Go through the numbers $a$ coprime to $n$ and check whether $a^{n-1}\equiv 1\ (\ mod\ n\ )$ holds.
If you find such an $a$, for which this is not the case, the number is not carmichael.
It will not take too long to find a base $a$, such that $n$ is pseudoprime to base $a$, but not strong pseudoprime (or you find a base $a$, such that $n$ is not even pseudoprime to base $a$, in which case you are done).
In this case, you can efficiently find a non-trivial factor because you get a non-trivial congruence $s^2\equiv 1\ (\ mod\ n\ )$.
It is not known, whether you find a base $a$ "quickly", but in practise you will probably always succeed.