Python implementation of the AKS algorithm. I am NOT a mathematician. If I got the math right the implementation should be correct now. At least it worked for many primes I've tested.
Nevertheless if you are a mathematician and find mistakes in my programm I would be really happy if you tell me