mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2010-08-04, 14:05   #397
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Quote:
Originally Posted by CRGreathouse
Primorial bases are, naturally, the best for a given size. I imagine they're largely taken? 30030, for example, would produce 5.2135 times the normal number of primes.
Largely taken? Show me the distributed search for k * p(x)#^n + 1, and I'll take your word for it.

Also: I don't use factor-rich bases because they sieve too slowly and leave too many candidates behind, which wastes time testing what could have been eliminated given a prime or factor-deficient base. P.S: Why does it become harder to sieve for larger bases? I tested 510510 and it barely got past 1/7. Unacceptable.

Last fiddled with by 3.14159 on 2010-08-04 at 14:12
3.14159 is offline   Reply With Quote
Old 2010-08-04, 14:17   #398
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Primality tests do not need any factoring to work. Albeit trial factoring is used to eliminate obvious composites.
Factoring is pretty common in primality proving, actually. The whole Pocklington's theorem-based tests use it. The Brillhart-Lehmer-Selfridge algorithm, the modern combined p-1/p+1 method, is rather popular.
CRGreathouse is offline   Reply With Quote
Old 2010-08-04, 14:22   #399
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
Factoring is pretty common in primality proving, actually. The whole Pocklington's theorem-based tests use it. The Brillhart-Lehmer-Selfridge algorithm, the modern combined p-1/p+1 method, is rather popular.
They are useless for most integers, as most integers are not special-form integers.

Last fiddled with by 3.14159 on 2010-08-04 at 14:24
3.14159 is offline   Reply With Quote
Old 2010-08-04, 14:25   #400
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175B16 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Quote:
Originally Posted by CRGreathouse View Post
Primorial bases are, naturally, the best for a given size. I imagine they're largely taken? 30030, for example, would produce 5.2135 times the normal number of primes.
Largely taken? [image removed] Show me the distributed search for k * p(x)#^n + 1, and I'll take your word for it.
I refuse to give you a source for my imagination.

Quote:
Originally Posted by 3.14159 View Post
Also: I don't use factor-rich bases because they sieve too slowly and leave too many candidates behind
I suspect you're counting the numbers removed from other bases on account of their small factors (2, 3, 5, etc.). That's fallacious, of course -- you can't remove these from bases which have those factors, but that means that the bases with small factors have more small candidates. They're better in that sense, not worse, even though the sieving percentages will be an easily-calculated percentage 'worse'. (The factor by which I call them better is the factor by which you call them worse.)
CRGreathouse is offline   Reply With Quote
Old 2010-08-04, 14:27   #401
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
They are useless for most integers, as most integers are not special-form integers.
Wrong. They're used in general-purpose packages all the time. See, for example,
http://pari.math.u-bordeaux.fr/cgi-b...2380&root=pari

Also, your claim (now edited out) that p-1 or p+1 must be fully factored is incorrect; Brillhart-Lehmer-Selfridge requires that p^2-1 is about one-third factored.
CRGreathouse is offline   Reply With Quote
Old 2010-08-04, 14:29   #402
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Primality tests do not need any factoring to work. Albeit trial factoring is used to eliminate obvious composites.

Also:


This is too vague for me. Many things are left unspecified here.
what should I explain today ? give me a list.
science_man_88 is offline   Reply With Quote
Old 2010-08-04, 14:34   #403
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
Also, your claim (now edited out) that p-1 or p+1 must be fully factored is incorrect; Brillhart-Lehmer-Selfridge requires that p^2-1 is about one-third factored.


.. Dammit. You're right.

Last fiddled with by 3.14159 on 2010-08-04 at 14:34
3.14159 is offline   Reply With Quote
Old 2010-08-04, 14:35   #404
axn
 
axn's Avatar
 
Jun 2003

13DF16 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
The more (small distinct) prime factors in the base, the better. A base of 12096 'protects' you from 2, 3, and 7; you find 3.5 times the expected number of primes vs. random numbers of the same size. For base 1297 you find 1.0008 times the expected number of primes.
Quote:
Originally Posted by 3.14159 View Post
Also: I don't use factor-rich bases because they sieve too slowly and leave too many candidates behind, which wastes time testing what could have been eliminated given a prime or factor-deficient base. P.S: Why does it become harder to sieve for larger bases? I tested 510510 and it barely got past 1/7. Unacceptable.
To be honest, the factors of base has very little effect on prime search, once you have done sieving on them**. What I mean is, the expected number of candidates to search for a prime is dependent only on the average candidate size and the sieve depth. For a factor-rich base, you would naturally start with less candidates (before sieving) as compared to a factor-deficient base. The numbers such as "1 in 7 candidates left" are irrelevant -- what is relevant is the aposteriori probability, after sieving, of a candidate yielding prime.

** For a fixed-n search. For fixed-k search, different considerations come into play.

Last fiddled with by axn on 2010-08-04 at 14:38
axn is online now   Reply With Quote
Old 2010-08-04, 14:39   #405
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Quote:
Originally Posted by CRGreathouse
I suspect you're counting the numbers removed from other bases on account of their small factors (2, 3, 5, etc.).
Nope. I merely compare the fraction of candidates that remain. Factor-rich numbers leave too many behind and as a result waste time testing obvious composites that could have been eliminated. A prime or factor-deficient base does not leave many candidates behind.

Quote:
Originally Posted by CRGreathouse
That's fallacious, of course -- you can't remove these from bases which have those factors, but that means that the bases with small factors have more small candidates.
How is that fallacious? Factor-rich bases can barely manage to eliminate 90% of the candidates, while factor-deficient or prime bases can eliminate 95% of the candidates with ease.

Quote:
Originally Posted by CRGreathouse
They're better in that sense, not worse, even though the sieving percentages will be an easily-calculated percentage 'worse'. (The factor by which I call them better is the factor by which you call them worse.)
How is wasted time testing obvious composites that could have been eliminated with ease "better"?

Last fiddled with by 3.14159 on 2010-08-04 at 14:41
3.14159 is offline   Reply With Quote
Old 2010-08-04, 14:40   #406
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by axn View Post
To be honest, the factors of base has very little effect on prime search, once you have done sieving on them**.
Agreed, in terms of time per number at a given size. But the base does change the number of good candidates, and if nothing else the candidates are smaller (though this doesn't have much of an effect on time, since that just adds 1 or 2 to the denominator).
CRGreathouse is offline   Reply With Quote
Old 2010-08-04, 14:41   #407
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175B16 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Nope. [...] How is wasted time testing obvious composites that could have been eliminated with ease "better"?
You misunderstand me. I don't have time to re-explain at the moment, but you may figure it out. Read axn's post; maybe that will help.
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wheel Factorization a1call Factoring 11 2017-06-19 14:04
Efficient Test paulunderwood Computer Science & Computational Number Theory 5 2017-06-09 14:02
LL tests more credit-efficient than P-1? ixfd64 Software 3 2011-02-20 16:24
A Wheel storm5510 Puzzles 7 2010-06-25 10:29
Most efficient way to LL hj47 Software 11 2009-01-29 00:45

All times are UTC. The time now is 14:52.


Fri Aug 6 14:52:03 UTC 2021 up 14 days, 9:21, 1 user, load averages: 2.83, 2.89, 2.85

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.