View Single Post
Old 2017-07-30, 00:29   #1
carpetpool
 
carpetpool's Avatar
 
"Sam"
Nov 2016

2×163 Posts
Post A second proof for the Lucas-Lehmer Test

The Lucas-Lehmer test is a test for Mersenne Numbers 2^n-1.

2^n-1 is prime if and only if 2^n-1 divides S(4, n-2).

Here S(4, n) = S(4, n-1)^2-2

starting with S(4, 0) = 4

now suppose we replace S(4, 0) = 4 with S(x, 0) = x.

We get the following polynomial sequence

S(x, 0) = x
S(x, 1) = x^2-2
S(x, 2) = x^4-4*x^2+2
S(x, 3) = x^8-8*x^6+20*x^4-16*x^2+2
S(x, 4) = x^16-16*x^14+104*x^12-352*x^10+660*x^8-672*x^6+336*x^4-64*x^2-2
...

Now we see that the discriminant D of S(x, n) = 2^r where r = (n+1)*2^n-1

Since the exponent r is odd, each prime factor q dividing S(x, n) has the form k*2^(n+1)+-1.

Now assume 2^n-1 divides S(4, n-2).

This shows that each prime factor of 2^n-1 must have the form k*2^(n-1)+-1. Since k*2^(n-1)+-1 > sqrt(2^n-1) is always true for k > 0, there is no prime factor less than or equal to sqrt(2^n-1) with that form. By trial division test if c is composite, there exists a prime p < sqrt(c) that divides c. Therefore, 2^n-1 must be prime. Please feel free to comment, suggest, improve or ask on this. Thanks!!!

Last fiddled with by carpetpool on 2017-07-30 at 00:31
carpetpool is offline   Reply With Quote