mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2010-08-02, 21:48   #210
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by axn
Sure. Just sieve till 1.17*10^17
Actually, it's removed 1200 candidates today. It would only take 10 or 11 days to get the desired one in 20.
3.14159 is offline   Reply With Quote
Old 2010-08-02, 22:21   #211
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I use Miller-Rabin for those proofs. And, the app divides by any odd number that ends in 1, 3, 7, or 9, regardless of whether or not it is prime.
...?

You asked about getting lists of small primes. bsquared asked "How small"? You said 10-30 digits. I explained that this would be too many primes, even if I took the square root interpretation. Now you say that you're not using trial division for numbers of that size.

Great... but then we're right back to bsquared's question: How big of a list do you want?
CRGreathouse is offline   Reply With Quote
Old 2010-08-02, 22:55   #212
axn
 
axn's Avatar
 
Jun 2003

5,087 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Actually, it's removed 1200 candidates today. It would only take 10 or 11 days to get the desired one in 20.
Wow. You can sieve till 10^17 in 10 days! That means you must have 10000 cores sieving!!!
axn is offline   Reply With Quote
Old 2010-08-02, 23:10   #213
axn
 
axn's Avatar
 
Jun 2003

5,087 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Actually, it's removed 1200 candidates today. It would only take 10 or 11 days to get the desired one in 20.
Various projected milestones
Code:
p=6.34e12: 1 in 15
p=4.52e13: 1 in 16
p=3.23e14: 1 in 17
p=2.30e15: 1 in 18
p=1.64e16: 1 in 19
p=1.17e17: 1 in 20
PS:- These numbers are specific for your current sieve.
axn is offline   Reply With Quote
Old 2010-08-03, 00:49   #214
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse
You asked about getting lists of small primes. bsquared asked "How small"? You said 10-30 digits. I explained that this would be too many primes, even if I took the square root interpretation. Now you say that you're not using trial division for numbers of that size.

Okay: To clear things up:
1. 10 digits would only require division up to at most 316227.
2. Trial division - Up to about 18 digits.
3. Miller-Rabin - Up to about 30 digits.

Everything is cleared.

Quote:
Originally Posted by axn
Wow. You can sieve till 10^17 in 10 days! That means you must have 10000 cores sieving!!!
HAHAHA, the most entertaining strawman I've ever heard.

Quote:
Originally Posted by axn
PS:- These numbers are specific for your current sieve.
For my specific case?

Last fiddled with by 3.14159 on 2010-08-03 at 00:52
3.14159 is offline   Reply With Quote
Old 2010-08-03, 01:13   #215
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Okay: To clear things up:
1. 10 digits would only require division up to at most 316227.
2. Trial division - Up to about 18 digits.
3. Miller-Rabin - Up to about 30 digits.

Everything is cleared.
So you're asking about making a list of primes up to 10^9?

I just use Pari for that size; its algorithm is plenty good enough for me.
Code:
default(primelimit,10^9)
takes about 3.3 seconds on my machine.

You can also try Bernstein's primegen if you like.
CRGreathouse is offline   Reply With Quote
Old 2010-08-03, 13:32   #216
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
So you're asking about making a list of primes up to 10^9?

I just use Pari for that size; its algorithm is plenty good enough for me.
Code:
default(primelimit,10^9)
takes about 3.3 seconds on my machine.

You can also try Bernstein's primegen if you like.

think he's asking for 10^10 to 10^30 myself but I could be wrong.

though depending base it could be up to infinity base 2 about 10^9 base 10 10^10-9.99999999999999999999999999999*10^30 base 16 16^10-F.FFFFFFFFFFFFFFFFFFFFFFFFFFFFF16^30 ?

Last fiddled with by science_man_88 on 2010-08-03 at 13:41
science_man_88 is offline   Reply With Quote
Old 2010-08-03, 13:40   #217
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Quote:
Originally Posted by science_man_88
think he's asking for 10^10 to 10^30 myself but I could be wrong.
Trial division proofs only require that you divide up to the square root of that number. Only primes up to 109 are needed to prove the primality of any 18-digit number. And about 10-30 iterations of Miller-Rabin (random-based) will guarantee the primality of any number up to 1030.

Last fiddled with by 3.14159 on 2010-08-03 at 13:42
3.14159 is offline   Reply With Quote
Old 2010-08-03, 13:42   #218
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
Trial division proofs only require that you divide up to the square root of that number. Only primes up to 10^9 are needed to prove the primality of any 18-digit number.
I was talking of the range you wanted to prove I wasn't aware about what he was talking about obviously. I know about the sqrt part.
science_man_88 is offline   Reply With Quote
Old 2010-08-03, 13:53   #219
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

I tested the (ispseudoprime) function to the comparison against my methods, coded.

The results are: (For a 5628-digit PRP):
ispseudoprime: 36.083 seconds
isSPRP: 12.355 seconds

Nearly three times as fast.

Last fiddled with by 3.14159 on 2010-08-03 at 13:55
3.14159 is offline   Reply With Quote
Old 2010-08-03, 15:40   #220
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
And about 10-30 iterations of Miller-Rabin (random-based) will guarantee the primality of any number up to 1030.
For some meaning of "guarantee", at least.

Of course as I've said, if you're looking to get that kind of certainty you'd be better off with one Miller-Rabin and a few applications of some modern test, e.g. Damgård-Frandsen; for the time it would take you to do 10 M-Rs (1 M-
R + 3 D-F), you can get higher confidence than you'd get for 30 M-Rs: 1/142657607172096 vs. only 1/1073741824. They're better in the average case, too.

Quote:
Originally Posted by 3.14159 View Post
I tested the (ispseudoprime) function to the comparison against my methods, coded.

The results are: (For a 5628-digit PRP):
ispseudoprime: 36.083 seconds
isSPRP: 12.355 seconds

Nearly three times as fast.
Sure, because ispseudoprime() is stronger. If you want just one test do
Code:
ispseudoprime(n, 1)
(though that will still do some trial division).
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prime posting thread, part 2. (With a catch.) 3.14159 Miscellaneous Math 55 2010-11-19 23:55
Tiny range request .... 555.1M petrw1 LMH > 100M 1 2010-07-13 15:35
Other primes thread nuggetprime No Prime Left Behind 32 2009-10-21 21:48
Error: tiny factoring failed 10metreh Msieve 26 2009-03-08 23:28
Tiny error on nfsnet pages. antiroach NFSNET Discussion 1 2003-07-08 00:27

All times are UTC. The time now is 15:01.


Fri Aug 6 15:01:17 UTC 2021 up 14 days, 9:30, 1 user, load averages: 3.15, 2.87, 2.83

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.