![]() |
|
|
#1552 | |
|
Einyen
Dec 2003
Denmark
35·13 Posts |
At 31 digits there is very far between any SPRP, so the average number at 31 digits probably fails very close to 0 times.
http://mathworld.wolfram.com/StrongPseudoprime.html Quote:
Edit: At 100,000,000 it is still above 1/4 actually, that is surprising: 25,003,138 fails. Last fiddled with by ATH on 2017-02-16 at 13:03 |
|
|
|
|
|
|
#1553 | |
|
Sep 2002
Database er0rr
1110100110112 Posts |
Quote:
Last fiddled with by paulunderwood on 2017-02-16 at 13:53 |
|
|
|
|
|
|
#1554 |
|
"Dana Jacobsen"
Feb 2011
Bangkok, TH
22·227 Posts |
GMP does a little trial division, a base 210 Fermat test, then n Miller-Rabin tests, using identically-seeded pseudorandom bases. It gives a deterministic test which is good for consistency, testing, and debugging, but also allows one to find pseudoprimes, albeit not as easily as the old "first n prime bases" methods like libtommath still uses.
Nicely wrote about this over a decade ago: GNU GMP mpz_probab_prime_p pseudoprimes. I'm not really sure why the base 210 Fermat test is added, as it doesn't really take any less time than a full M-R test as is done right before the M-R tests start. The Euler-Plumb test at least costs ~5% less time and is stronger than the Fermat test, so would make a better pre-test IMO. Far better is, as Paul has said a few times, to switch to BPSW. WraithX offered his code a few years ago on one of the GMP mailing lists but it wasn't taken. I should tidy up my code and do the same since it's faster. It is deterministic and has no known counterexamples (even when the test is weakened to make them easier to find). The time taken is comparable to using an argument of 2-3 for mpz_probab_prime_p. |
|
|
|
|
|
#1555 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
101110011002 Posts |
Quote:
For Miller-Rabin gmp doesn't use fixed base! But and it is important in my search is that for a given interval of n it is using the same set of base for the first T tests (if you increase T then the interval will be smaller). Here the bases are large, "close" to n, so the Arnault's attack is just not working to get n that is a strong pseudo prime for many bases. |
|
|
|
|
|
|
#1556 |
|
Aug 2006
3×1,993 Posts |
Yes. Depending on what you're trying to do a random Miller-Rabin first to more quickly weed out composites might be worthwhile, but after that I certainly wouldn't suggest anything weaker than BPSW. We've come a long way since 1980.
|
|
|
|
|
|
#1557 |
|
"Nuri, the dragon :P"
Jul 2016
Good old Germany
809 Posts |
Does anyone know how to PRP test an cofactor from an Fibonacci Number?
Looks like pfgw doens´t like this type of numbers. |
|
|
|
|
|
#1558 |
|
Einyen
Dec 2003
Denmark
35×13 Posts |
You can always output the entire decimal cofactor to a file and pfgw will read that. How big numbers are you working with?
|
|
|
|
|
|
#1559 | |
|
"Nuri, the dragon :P"
Jul 2016
Good old Germany
809 Posts |
Quote:
Was about 21K digits, or so. I´ll give it a try, maybe I´ll find some small factors with ECM. Thanks, anyway. |
|
|
|
|
|
|
#1560 |
|
Einyen
Dec 2003
Denmark
1100010101112 Posts |
21K is nothing I have done at least 750K digits by just writing the entire number to a text file and then running pfgw:
pfgw64.exe -f0 -V -l number.txt -f0 for no factoring assuming you did factoring earlier, -V for verbose if you want that, and -l to log results in the "pfgw.out" file or -l<logfilename>. Use -b<base> to run PRP test in another base than 3, like -b2, -b5, -b7 etc. up to -b255. |
|
|
|
|
|
#1561 |
|
Jun 2003
31×163 Posts |
At 21K, factordb will itself do it for you, if you ask it nicely.
|
|
|
|
|
|
#1562 |
|
"Nuri, the dragon :P"
Jul 2016
Good old Germany
11001010012 Posts |
I just fullyfactored my first number above 100 digits. (I mean a odd number, no just somethink like 10^n*3) It has 240 digits. Here.
Found 3 factors (P18, P20 and P28). Remaining cofactor was prime. ![]() Next one, this time P220 cofactor. New personal record. Next edit: Two more FF, we should need table at the status that shows us the amount of fully-factored composite numbers. Please. Last fiddled with by MisterBitcoin on 2018-03-29 at 09:20 |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Database for k-b-b's: | 3.14159 | Miscellaneous Math | 325 | 2016-04-09 17:45 |
| Factoring database issues | Mini-Geek | Factoring | 5 | 2009-07-01 11:51 |
| database.zip | HiddenWarrior | Data | 1 | 2004-03-29 03:53 |
| Database layout | Prime95 | PrimeNet | 1 | 2003-01-18 00:49 |
| Is there a performance database? | Joe O | Lounge | 35 | 2002-09-06 20:19 |