Lucas-Lehmer test: Difference between revisions

Correct link to original source
(Rename function)
(Correct link to original source)
Line 1,418:
end func;
 
const func boolean: lucas_lehmer_testlucasLehmerTest (in integer: p) is func
result
var boolean: prime is TRUE;
Line 1,441:
writeln(" Mersenne primes:");
while p <= 3217 do
if isPrime(p) and lucas_lehmer_testlucasLehmerTest(p) then
write(" M" <& p);
flush(OUT);
Line 1,450:
end func;</lang>
 
Original source: [http://seed7.sourceforge.net/algorith/math.htm#lucas_lehmer_testlucasLehmerTest]
 
Output: