20081226, 08:52  #1 
Oct 2008
2^{6} Posts 
More questions about prime95
Hey all,
I still don't quite understand what p1 factoring, trial factoring and first time checks are in relation to prime95. Could someone be gracious enough to explain these in simple terms? I've tried the wiki but it's out of my league. Furthermore, is it possible to discover a prime just by running a first time test, or a p1 check, or do you have to use a combination (or not?). Also, the client says that I have a 7.27% chance of finding a factor. Does this mean that if it is a factor, it cannot be prime? And if I leave the option 'whatever makes the most sense' on, is it the best way of finding primes, or is there only one type of 'final' test that one can chose to determine whether or not a number is prime? Is there a prefered method of maximising your chance of finding a prime, or is everyone on the same level playing field? Sorry for my noobishness, I'm still working my way up this massive learning curve :S Thanks for any help you can provide :D 
20081226, 10:10  #2  
Jun 2003
4,969 Posts 
Yes. This is the key to answering the rest of your questions. It follows from the definition of prime numbers. A number is prime, if and only if it is not divisible by any other number (other than by itself and 1, which trivially divides every number). IOW, if a number has a factor it cannot be prime  i.e. it is a composite. Eg: 15 is composite because it has factors 3 and 5, where as 17 is composite because it has no factors.
Quote:
That was the simple version, with certain details deliberately left out. Quote:
Everyone has a level playing field. So to maximize your chance, just bring more firepower 

20081226, 10:36  #3 
Oct 2008
2^{6} Posts 
Hi axn, thanks for the helpful post.
So if I want to LL test, how do I go about doing that? And is this the test that takes about a month to complete on decent (ie core2) processors? And do you know the statistical chance of actually finding a prime (just out of curiosity)? Thanks again 
20081226, 13:18  #4  
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts 
Quote:
Quote:
At the bottom of the LL section there are formulas to approximate the chances of it being prime. If I'm not mistaken, at GIMPS's current level for first time tests, there's approximately a 1 in 300,000 chance of any specific number being prime, after being factored. 

20081226, 14:03  #5 
Apr 2007
Spessart/Germany
A2_{16} Posts 
Hello,
just as an addition: LucasLehmerTests (LLTs) are: First time tests, Double check tests, World record sized number to test and finally 100,000,000digit number to test (but the last one will need years for finishing...). If you want to maximize your chance to find a prime 'First time tests' and 'World record sized number tests' are the recommened choices. Best regards, Matthias 
20081226, 20:06  #6  
"Richard B. Woods"
Aug 2002
Wisconsin USA
2^{2}×3×641 Posts 
Quote:
They're _all_ factorfinding tests, but their "vision" and speed differ. The LL test almost always (99.999+%) eventually proves that the number you are assigned has factors, but it has two BIG drawbacks: 1) it can't determine what any factor actually is (its "vision" looks everywhere but is fuzzy  it determines only that some factors exist somewhere), and 2) it takes a long time. The TF and P1 are shorter (relative to LL duration) tests that are capable of determining _exactly_ (sharp vision) what one factor is. They do so only some (e.g., that 7.27%) of the time (narrow fieldofview), but when they succeed, they eliminate the need to do the long LL test! If any of the three succeed in showing that the number has a factor, you just report that and go on to another assignment. However, having the LL test show that the number has a factor takes a long time if the TF and P1 don't. Now, if (<0.001% of the time) the LL test happens to find that the number is prime, you get eternal mathematical fame! ... But that's pretty rare  so as soon as you and GIMPS find out in some way that the number is composite, you probably want to go on to another, possiblyfamemaking assignment ASAP. The TF and P1 attempt to shortcut the path to that finding, and sometimes succeed in doing so. So far, we haven't explained the "first time" in "first time checks". Modern computers have a lot of errordetectionandprevention built into them, but it's still possible for an occasional glitch to occur in the circuitry. In most applications, a single glitch isn't all that important, and may not even be noticeable. But the LL test is very exacting  even one glitch in the long calculation can ruin the result. Prime95 tries several ways to detect errors and can sometimes recover from them by automatically redoing part of the calculation, but occasionally an error goes undetected. The most practical way to determine whether that happened is to repeat (doublecheck) the LL test on a different computer under different conditions, and compare a final value, called residue, that is produced by the LL calculation. Because the LL test takes sooo long, the chance of a glitch causing an error in that residue is noticeable: 12% of test results reported to GIMPS turn out to be erroneous. If a later DC (doublecheck) test on the same number produces a residue that matches the firsttime residue, we can be fairly sure that the factor/nofactor indication is correct. Quote:
Last fiddled with by cheesehead on 20081226 at 20:18 

20081227, 00:39  #7 
Oct 2008
64_{10} Posts 
Thanks everyone for your help.
This is definitely clearing up my understanding of prime95. So basically, old/ish computers should be assigned to P1 and factoring tests while relatively modern computers should do LL tests? And do all returned results earn points? Ooh, just out of curiosity, the primes that GIMPS have found so far, what test/s were the computers running? Is it basically a process of elimination when finding primes, ie. first time test => p1 => LL etc? Thanks again :D 
20081227, 01:52  #8 
Oct 2008
California
2^{2}·59 Posts 
To find a prime, you MUST complete ALL of the long LL test on a number. However, as cheesehead said, before the long LL test is done, trial factoring and P1 factoring attempt to eliminate numbers for LL testing. As soon as trial factoring or P1 factoring find a factor, you know it's not prime, so there's no point running an LL test on a factored number. However, trial factoring and P1 factoring cannot determine if a number is prime (or to be exact, it can, but it would take an unimaginably long time), so after some extent of attempting to eliminate a number, the LL test is run on that number.
The point being, ONLY LL tests can tell if a number is prime. However, trial factoring and P1 factoring can tell if a number is NOT prime, saving the need to do LL. 
20081227, 04:29  #9  
Oct 2008
40_{16} Posts 
Quote:
+ Is it possible to run just LL tests on numbers that has no factors, or is finding such a number so uncommon it's only possible once or twice a year? Thanks 

20081227, 04:55  #10  
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
9585_{10} Posts 
Quote:
The order is like this: Trial factoring (this can be done in multiple chunks of work and will eliminate ~ 1/2 of all numbers) any number that survives then has: P1 factoring (about 25% are eliminated here) any number that survives then has: LL primality testing (takes care of the rest) if the number does not show up as prime then: double check (happens much later, same as the LL) else if prime: verification is performed on several other types of computers with other programs. All types of testing get credit. The credit amount is tracked by test type. 

20081227, 10:50  #11 
Sep 2006
Brussels, Belgium
2×5×167 Posts 
Some of the numbers in previous posts are slightly off :
Trial factoring will eliminate round 60% of exponents. P1 factoring will eliminate a bit less than 3% (a bit more than 7% of the remaining exponents.) In GIMPS the minimum requirement to be assigned independant P1 work is 200MB. This means thet if you assign 512MB out of 2GB via the Options / CPU menu it should be enough. Of course more memory wil be more beneficial. The aproximatively 37% of remaining exponents have to be LL tested. There are about 10% of bad results during LL testing stressing the importance of the double checks. IMO most come from badly overclocked machines. Unless you require a specific work type, on a sufficiently powerfull machine, you will be assigned LL tests. Most of those consist of first P1 factoring then the LL test. For minimum requirements look at the page Assignment Thresholds. Jacob 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Prime95  suggest using B2 bound = GMPECM default and other questions  Raman  PrimeNet  34  20200714 22:25 
Prime95 Questions  dimkadimon  Software  19  20110117 20:28 
gmpecm questions  yoyo  GMPECM  34  20090320 18:06 
Questions about RAM and Prime95  Matthias C. Noc  Software  2  20040301 08:16 
DNS questions  Prime95  PrimeNet  2  20030412 01:54 