lucas-lehmer ( p -- ? )
Lucas-Lehmer Mersenne Primality test


Vocabulary
math.primes.lucas-lehmer

Inputs
pa prime number


Outputs
?a boolean


Word description
Runs the Lucas-Lehmer test on the prime p and returns t if (2 ^ p) - 1 is prime.

Examples
! Test that (2 ^ 61) - 1 is prime: USING: math.primes.lucas-lehmer prettyprint ; 61 lucas-lehmer .
t


Definition