# Lucas-Lehmer primality test

Let $p>2$ be a prime, and let $M_{p}$ be a Mersenne number, then $M_{p}$ is prime iff $M_{p}$ divides $s_{p-1}$ where the numbers $(s_{n})_{n\geq 1}$ are given by the following recurrence relation: $s_{1}=4$, and

 $s_{n+1}={s_{n}}^{2}-2$

for $n\geq 1$.

Title Lucas-Lehmer primality test LucasLehmerPrimalityTest 2013-03-22 14:24:31 2013-03-22 14:24:31 CWoo (3771) CWoo (3771) 8 CWoo (3771) Theorem msc 11A51