An implementation of the Lucas Lehmer isPrime function in JS