![]() |
|
|
#1 |
|
"J. Gareth Moreton"
Feb 2015
Nomadic
1328 Posts |
Just to clarify, I'm referring to the value of 'sn' that is calculated in each iteration of the Lucas-Lehmer Primality Test (and which sp-2 mod 264 is the residue stored in the GIMPS database).
Mostly out of curiosity but also for mathematics and programming practice, I'm analysing the algorithm used to test Mersenne numbers, but it got me thinking, just from logical reasoning: There seem to be certain values of sn (mod 2p - 1) that, if they appear, indicate a composite Mersenne number at best or an error of some kind at worst:
Maybe I'm over-thinking this, but do these values ever appear in practice, either as a hardware/mathematical error or as part of a sequence, and if so, how should they be handled? |
|
|
|
|
|
#2 | |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
Quote:
Last fiddled with by science_man_88 on 2016-01-07 at 03:18 |
|
|
|
|
|
|
#3 |
|
Einyen
Dec 2003
Denmark
2·1,579 Posts |
The residue 2 has happened several times when the partial residue during the run turns to 0 due to a hardware error then it will go 0, -2, 2, 2, 2... and end in 2.
Here is one example: http://mersenne.org/M38273689 Here is most likely another 2 that has not been verified yet: http://mersenne.org/M79060367 |
|
|
|
|
|
#4 |
|
"J. Gareth Moreton"
Feb 2015
Nomadic
2×32×5 Posts |
I can see how checking the value of sn during every iteration is cost-prohibitive, but would it be an idea to check for a value of 2 and -1 every so often, like how rounding is currently performed? It might save some wasted testing (and mark the result as Suspect after it attempts to go back to correct itself)? I assume there haven't been any cases where a residue of 2 is reproducible and verified yet.
sn = 4 I can see not being an error, but a special situation of the primality test. I would like to find an example where it appears in practice though. Last fiddled with by CuriousKit on 2016-01-07 at 11:29 |
|
|
|
|
|
#5 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Last fiddled with by science_man_88 on 2016-01-07 at 13:42 |
|
|
|
|
|
|
#6 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2×47×101 Posts |
|
|
|
|
|
|
#7 |
|
"J. Gareth Moreton"
Feb 2015
Nomadic
2·32·5 Posts |
Fascinating. Thanks for the heads-up. I had a feeling quadratic residues/non-residues had something to do with it.
Sorry for the naïve question, but how is K defined here? I can see that 75, 147 and 363 are equal to 3 * a prime square, but 91 is an odd one out here. I'm trying to figure out in my head what stops -2, 0 (when n < p - 2) and 2 from appearing. I'm assuming that, for 2, the only values that equate to it are -2 and 2 itself, and 0 is what creates -2 (and I think this is the only value because the only solution to "sn2 ≡ 0 (mod 2p - 1)" is zero, since the modulus cannot be a perfect square). I swear I could go insane trying to get my head around all of this, but I'm going to try! |
|
|
|
|
|
#8 |
|
"Jeppe"
Jan 2016
Denmark
2508 Posts |
Let $p$ be an odd prime ($M=2^p-1$ is possibly composite), and $s_n$ be defined as above.
If we consider the infinite sequence: $$s_0 \mapsto s_1 \mapsto s_2 \mapsto s_3 \mapsto \dots \pmod{2^p-1}$$ then clearly it will become periodic at one point. For there are only finitely many possible values in $\mathbb{Z}/M\mathbb{Z}$, and as soon as we hit a value we have seen before, we go into a loop. So the question is if it can ever happen for some rare values of $p$ that this becomes periodic before $s_{p-2}$. So is there any $p$ which admits two indices $0 \le i < j \le p-2$ such that $s_i \equiv s_j \pmod{2^p-1}$? Can anybody answer that? /JeppeSN |
|
|
|
|
|
#9 | |
|
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
588610 Posts |
Quote:
|
|
|
|
|
|
|
#10 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
Last fiddled with by science_man_88 on 2016-01-29 at 15:15 |
|
|
|
|
|
|
#11 |
|
Romulan Interpreter
Jun 2011
Thailand
32×29×37 Posts |
No.
There can't be a cycle with the period smaller than 2p. |
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Timing for different B1 values? | CRGreathouse | GMP-ECM | 8 | 2018-05-12 05:57 |
| reserving a few k values | Trilo | Riesel Prime Search | 7 | 2015-09-27 23:20 |
| Erroneous data | ATH | Data | 8 | 2013-11-13 19:21 |
| reserving a few k values | Trilo | Riesel Prime Search | 0 | 2013-08-25 14:47 |
| B1/B2 values | esakertt | Information & Answers | 2 | 2012-11-14 13:11 |