Determining the starting value for primality test

246 Views Asked by At

This question is about Lucasian primality test for numbers of the form $N=3\cdot 2^n-1$ .

There is a following statement in Wikipedia article : Lucas-Lehmer-Riesel test :

"If $k = 3$ : if $n = 0$ or $3$ mod $4$, then $u_0 = 5778$."

However it seems that values $u_0 = 18$ and $u_0 = 488$ also fit .

Here is Maxima implementation of the test with starting value $u_0 = 18$ and here you can find a list of exponents for which $3\cdot 2^n-1$ is prime .

So , my question is : Is there any special reason why $5778$ has been chosen to be starting value instead of $18$ or $488$ ?

1

There are 1 best solutions below

0
On

(The case concerning the sequence starting with 18-some progress).

In the original paper Lehmer proved that $V_{3\cdot 2^{n+1}}\equiv \ 0 \mod N \ ({\text{with}}\ N=3\cdot 2^n-1),$ where $V_n=(\sqrt{5}-2)^n+(\sqrt{5}+2)^n\ ({\text{set}}\ a=\sqrt{5}-2,\ b=\sqrt{5}+2).$ Now note that the sequence $\{u_n\}=\{V_{3\cdot 2^{n+1}}\}.$ For $n=0$ we get $V_6=5778$ which is set as $u_0$ (so this is the reason that 5778 was used). The sequence which starts with $18$ is eventually the sequence $\{V_{2^{n+1}}\}_{n\geq 1}=\{18,322,...\}.$ Using the relation $V_{3\cdot 2^{n+1}}=V_{2^{n+1}}(V_{2^{n+1}}-1)$ (from the property giving $V_{n+m}=...$) we get $V_{2^{n+1}}(V_{2^{n+1}}-1)\equiv 0\mod N.$ Now it is enough to prove that $\gcd(V_{2^{n+1}}-1,3\cdot 2^{n}-1)=1.$