How to prove that this conjecture about a new primality test for Mersenne numbers is true ?
Definition: Let $M_{q}=2^{q}-1 , S_{0} = 3^{2} + 1/3^{2} , \ and: \ S_{i+1} = S_{i}^{2}-2 \pmod{M_{q}}$
Conjecture: $$M_{q}\text{ is a prime iff: } \ S_{q-1} \equiv S_{0} \pmod{M_{q}}$$ $$\text{ and iff: } \prod_{0}^{q-2} S_i \equiv 1 \pmod{M_{q}}$$ $$\text{ and iff: } S_i \ncong S_0 \pmod{M_{q}} , 0 < i < q-1$$
The easy part part (if $M_{q} \text{ is prime then } S_{q-1}\equiv S_{0} \pmod{M_{q}}$), has already been proven. See: http://tony.reix.free.fr/Mersenne/ConjectureLLTCyclesMersenne.pdf .
Now, a proof of the converse is needed.
The "classic" LLT by Lucas and Lehmer for Mersenne numbers is based on the binary tree of the digraph (under $x^2-2 \pmod{M_q}$). This new conjectured test makes use of a cycle of the same digraph.
The goal of this question is to validate (or not) the method (use a cycle of the digraph) for Wagstaff numbers ($\dfrac{2^q+1}{3}$ , q prime) for which we also lack a proof for the converse. See: https://trex58.files.wordpress.com/2009/01/wagstaffandfermat.pdf for a proof of the easy part, by Robert Gerbicz .
I and a team (Vincent and Paul) had found a very large Wagstaff PRP with this algorithm. See: http://www.primenumbers.net/prptop/prptop.php (2^4031399+1)/3 , rank 9 for now.
The seed (here 3^2+1/3^2) can be anything else, under the condition that it is a Universal Seed (works for all q prime).
The second condition (the product of Si) is not relevant. I've found non-prime Mersenne and Wagstaff numbers which have a cycle with the expected q-1 length and verifying that the product of all Si is 1 Mod Mq. However, such a cycle of length q-1 of a non-prime Mq does not start with a well-known Universal Seed and thus not with 3^2+1/3^2.
– Tony Reix Feb 17 '23 at 09:04