A Javascript Implementation of the Lucas-Lehmer Primality Test for Mersenne Primes
npm install --save lucas-lehmer
or
yarn add lucas-lehmer
import lucasLehmer from 'lucas-lehmer'
lucasLehmer(3) // true, as 2^3 - 1 is prime
lucasLehmer(12) // False, as 2^12 - 1 isn't prime
MIT © Adam Kelly