““The Lucas-Lehmer primality test also uses a recursive function to produce a sequence of numbers (the Lucas-Lehmer sequence). This sequence starts with 4, and each number after that is the previous number squared, minus 2 (see below). For any Mersenne number (such as 2^3 - 1 = 7 and 2 ^ 8 - 1 = 255), you take its power of 2 ( so, 3 and 8 in our examples) and, if the Lucas-Lehmer number in the position one less than that power ( so, second and seventh) is an exact multiple ( no remainders allowed) of the Mersenne number, then it is definitely prime.””