(bind-func mersenne_prime_p
(lambda (p)
(if (= p 2)
#t
(let ((m_p (- (<< 1 p) 1))
(s 4)
(i 3))
(while (< i p)
(set! s (% (- (* s s) 2) m_p))
(set! i (+ i 1)))
(= s 0)))))