powered by
Determines whether \(p\) is a Mersenne number, that is such that \(2^p - 1\) is prime.
mersenne(p)
Returns TRUE or FALSE, indicating whether p is a Mersenne number or not.
p
prime number, not very large.
Applies the Lucas-Lehmer test on p. Because intermediate numbers will soon get very large, uses `gmp' from the beginning.
https://mathworld.wolfram.com/Lucas-LehmerTest.html