mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-08-15, 19:16   #529
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by CRGreathouse
I don't think this is GD, though; it's about math and programming primarily.
Yes, but the idea for a General Discussion forum should go in the Lounge/Soap Box. Or it should be a new forum section: Fuse the Lounge and Soap Box into General Discussion.

Mods, please move this into Forum Feedback.

Last fiddled with by 3.14159 on 2010-08-15 at 19:18
3.14159 is offline   Reply With Quote
Old 2010-08-15, 20:10   #530
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

I'm pointless to this forum.
science_man_88 is offline   Reply With Quote
Old 2010-08-15, 21:50   #531
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

On finding k * n! + 1 primes:

I set the following params:

When n ≤ 200: Use APR-CL to prove it prime. (≈360-380 digits, max)*
When n > 200: Use 1-4 iterations of Miller-Rabin. (≈360-380+ digits)*

*Depends on the k-value used. Expect the numbers to increase if you use large k, and expect the probability to drop as well.**
** Can be made up for if factorial is fairly large (Ex: 1900!)

Last fiddled with by 3.14159 on 2010-08-15 at 21:56
3.14159 is offline   Reply With Quote
Old 2010-08-15, 22:04   #532
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Seems broadly reasonable. What's the DLP bound on the chance of wrongly accepting a composite, assuming they act like random numbers?
CRGreathouse is offline   Reply With Quote
Old 2010-08-15, 22:53   #533
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Quote:
Originally Posted by CRGreathouse
Seems broadly reasonable. What's the DLP bound on the chance of wrongly accepting a composite, assuming they act like random numbers?
The odds of that are at worst 1 in 256.
3.14159 is offline   Reply With Quote
Old 2010-08-15, 23:12   #534
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
The odds of that are at worst 1 in 256.
Worst-case at the end of your spectrum, I take it you mean. I was asking about the average case, though.
CRGreathouse is offline   Reply With Quote
Old 2010-08-15, 23:21   #535
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Also: I can't find any damn sieving implementations for specific files of k * n! + 1 (Multisieve only uses factorial primes and primorial primes, making it useless, NewPGen doesn't recognize k * n! + 1 unless I add an exponent to it. Quite frankly, k * (n!)x + 1 is too slow.)

Looking for k * 2250! + 1. (18000 random k's, odds of finding a prime are 1 in 1k, with sieving that could have been improved to as much as.. 1 in 80.)

1 in 80 amongst 6575-digit primes is pretty good.

Solution: Use the trial division switch in PFGW.

Last fiddled with by 3.14159 on 2010-08-15 at 23:55
3.14159 is offline   Reply With Quote
Old 2010-08-15, 23:50   #536
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

I've posted the Pari bootcamp thread, as requested.
CRGreathouse is offline   Reply With Quote
Old 2010-08-15, 23:53   #537
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Also: I can't find any damn sieving implementations for specific files of k * n! + 1
So write one. Loop over the primes from n+1 to as high as you like, and for each start at k = lift(Mod(-1,p)/n!) and use a step size of lift(Mod(1,p)/n!) to mark off candidates. (Check what I said in case of mistakes of finger or mind.)
CRGreathouse is offline   Reply With Quote
Old 2010-08-15, 23:56   #538
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Quote:
Originally Posted by CRGreathouse
So write one. Loop over the primes from n+1 to as high as you like, and for each start at k = lift(Mod(-1,p)/n!) and use a step size of lift(Mod(1,p)/n!) to mark off candidates. (Check what I said in case of mistakes of finger or mind.)
Nono, I have PFGW's trial division switch to help out. But, can you write a script anyway? Thank you.

Quote:
Originally Posted by CRGreathouse
I've posted the Pari bootcamp thread, as requested.
I can't go to a private forum.

Last fiddled with by 3.14159 on 2010-08-15 at 23:58
3.14159 is offline   Reply With Quote
Old 2010-08-15, 23:58   #539
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Nono, I have PFGW's trial division switch to help out. But, can you write a script anyway? Thank you.
I just wrote half of it -- can you complete it?

Sieving is a lot more efficient than trial division.
CRGreathouse is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:00.


Fri Aug 6 23:00:43 UTC 2021 up 14 days, 17:29, 1 user, load averages: 4.02, 4.11, 4.01

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.