THE primality tester is inspired by my love for the GIMPS, and I wanted to do something similar and use the characteristics of Mersenne primes to do some fun stuff. It would be lame if there were a prime tester that only works for Mersenne primes, so I used the AKS method for non-Mersennes. There's actually an implementation of the AKS that can run in O(log^12(n)) time, but I didn't have enough time to do that one. Likewise, I didn't have enough time to integrate probabilistic factoring (which is used in the actual GIMPS algorithm).
Built With
- drafter
Log in or sign up for Devpost to join the conversation.