20070306, 18:32  #1 
Mar 2007
3 Posts 
A Followup question on Mlucas...
Thank you all for answering my first question...now I have another question about the LL test as run in MLucas...
Do the statistical odds actually increase for a positive result as the number of iterations passed increases? I'm running a test right now and am 580,000 iterations in...so far, no rounding errors and am churning out 2000 iterations every 50 minutes + 30 seconds. It would seem to me that the odds would have to increase, but I don't remember enough statistics to compute HOW much... Thanks in advance! 
20070306, 18:46  #2 
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts 
No, it does not. Because of how the LL test works it must complete all iterations before it knows whether it's prime or not.
More reading on LL test: http://en.wikipedia.org/wiki/Lucas%E...rsenne_numbers http://mathworld.wolfram.com/LucasLehmerTest.html 
20070306, 18:56  #3  
Nov 2003
2^{6}×113 Posts 
Quote:
Allow me to ask: To what statistical odds do you refer? The number being tested is either prime or composite. There are no "odds". If you refer to the a priori probability of a *randomly selected* value of 2^p1 being prime, this has nothing to do with the LL test. I also do not understand you reference to "number of iterations". How could anyone think that the number of iterations is related to probability in any way? I need to understand your thinking before I can help. What probability do you think is related to the number of iterations? 

20070306, 21:30  #4 
"Nancy"
Aug 2002
Alexandria
2^{5}×7×11 Posts 
I think the question was meant as MiniGeek interpreted it: it assumed that the LL test can somehow tell halfway through that the number being tested is composite and stop there. But that is not how it works, as MiniGeek already pointed out.
Alex 
20070306, 23:39  #5  
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
4267_{10} Posts 
Quote:
note to deadspam: Don't take what I'm saying here as what is correct, that's in my first post. What I'm trying to say here is what you said, but in another way so other people understand it. 

20070307, 01:13  #6  
"Richard B. Woods"
Aug 2002
Wisconsin USA
2^{2}·3·599 Posts 
Quote:
As we've repeatedly seen implied by novices' questions in this forum, an average novice will fairly easily understand that the TF process is a series of tests of multiple individual candidate divisors of a Mersenne number, especially because this obviously parallels the definition of a prime as a number not divisible by any number other than itself and 1. In contrast, the LL test's ultimate dependence on a division (of S(p2) by the Mersenne number) is not nearly so clear to a novice. (I'm tempted to assign significance to the fact that the meaning of the division in LL is opposite to that in TF  in TF, a zero remainder signals compositeness, while in LL a zero implies primeness  but if one's understanding goes that far, one is unlikely to be fazed by the opposite phases. :) Novices' questions I've seen repeatedly show that they are thinking that the LL test is basically a series of tests of individual candidate divisors, as in TF but somehow only modestly different in the detail of its (LL) supposed "individual tests". This assumed parallel leads directly to misunderstandings. Last fiddled with by cheesehead on 20070307 at 01:31 

20070307, 05:51  #7 
Mar 2007
3 Posts 
Well, now I'm REALLY confused...
Ok...
I guess I don't understand just wnat an 'iteration" consists of in the LL test I am running. Right now, I am thru 608,000 "iterations", with each 2K outputting that Res64: <Big Hex Number Here>. In these 600K + iteratons, just WHAT has the program accomplished? (Yes, I am a 'novice' nut will be able to follow the math if someone explains it... SLOWLY...lol Ed 
20070307, 09:08  #8 
"Nancy"
Aug 2002
Alexandria
2^{5}×7×11 Posts 
The LucasLehmer test is pretty much just a huge exponentiation (although in GF(p^{2}), but that's beside the point atm). The Mersenne number is prime if and only if the result of the exponentiation is a particular value, a residue of 0 in case of the LucasLehmer test. What each iteration does is process a bit of the exponentiation, so it keeps getting closer to the final result. Unfortunately, we cannot tell what the final result will be by the intermediate results during the exponentiation, so all we can do is wait for the exponenitation to finish and get the final answer then.
Alex Last fiddled with by akruppa on 20070307 at 09:17 Reason: typesetting 
20070307, 18:48  #9  
Feb 2007
2^{4}·3^{3} Posts 
it's calculating just one number.
Quote:
For several different reasons this number is called S[p1]. And it is calculated by repeating p times the formula S[n+1]=S[n]²2, starting with S[1]=4. Each of these steps is one of the famous iterations. (Here p = 32 ooo ooo, e.g.) The RES_64 (which I have never seen printed...) is just some (binary) digits of the number S[n], as a kind of debugging information while the calculation goes on... This sequence grows extremely fast, but fortunately it is sufficient to keep at each step only the rest modulo 2^p1, i.e. (roughly said...) about ("only"(!)) the least 10^7 decimal digits. There digits make up the 8MB file which P95 saves every 30 mins. So, each iteration corresponds to calculating the square of this "small number"  2 and taking again the rest mod Mp. So in some sense, prior to the last step, the program has achieved "nothing" yet! (Well, one could quite easily see already from the last value, S[p2], if p is prime. [Namely, if S[p2] = +/ 2^((p+1)/2) mod Mp.] But from the penultimate, S[p2], it would be already quite hard, and this would only save 2 iteration in 32 million. OK, that's not the whole information [for nonprime p the last values usually are periodically repeated so one could detect such a "looping" already before, but it's quite impossible to implement.]) 

20070307, 21:10  #10  
Apr 2006
Down Under
89 Posts 
Quote:
Remember the game people do with flowers ... "She loves me... She loves me not" LL tests are like that but with a REALLY BIG flower with LOTS of petals. Each petal you remove is an iteration and the residual is binary (loves me or loves me not). For LL tests the same applies but the residual is a "Big Hex Number". As you remove the petals (complete iterations) you get closer to knowing the answer, but not any closer to what the answer will be. The answer will not be revealed until the final iteration has occurred. Either she loves you (prime) or not (not a prime). Of course, even if she does loves you, it is only a matter of time before she leaves you for someone with a bigger PRIME 

20070307, 23:31  #11  
"Jason Goatcher"
Mar 2005
5×701 Posts 
Quote:


Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Mlucas on ubuntu  Damian  Mlucas  17  20171113 18:12 
MLucas on IBM Mainframe  Lorenzo  Mlucas  52  20160313 08:45 
Mlucas on HPUX/PARISC setup question  smoky  Mlucas  14  20090505 15:40 
mlucas on sun  delta_t  Mlucas  14  20071004 05:45 
A quick question regarding iterations in Mlucas...  DeadSpam  Mlucas  4  20070305 14:06 