![]() |
![]() |
#1 |
Aug 2006
598710 Posts |
![]()
I have a composite exponent n and I want to test the cofactor of 2^n-1 after dividing out 2^p-1 for each prime dividing n. What is the best way to do this?
I looked at the Cunningham project but their ranges are too small (as far as I can tell) -- my n is several million. At the moment I'm feeding the numbers to PFGW. If there's a better approach, let me know! (I did do a small amount of trial division with gp first.) |
![]() |
![]() |
![]() |
#2 |
"William"
May 2003
Near Grandkid
94516 Posts |
![]() |
![]() |
![]() |
![]() |
#3 | |
Aug 2006
598710 Posts |
![]() Quote:
![]() In particular I'm interested in the factorizations of Last fiddled with by CRGreathouse on 2013-06-06 at 06:31 |
|
![]() |
![]() |
![]() |
#4 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
235028 Posts |
![]()
Extending http://oeis.org/A156585, eh?
![]() |
![]() |
![]() |
![]() |
#5 | |
"Forget I exist"
Jul 2009
Dartmouth NS
2×3×23×61 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#6 |
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10B716 Posts |
![]()
Your chances of fully factorizing such a number are very slim. The reason the Cunningham project's ranges are so small is that factoring is just that hard. Yours will be more in the range of millions of digits. You basically have to hope for enough tiny factors that you find a large PRP cofactor. I'd guess that if you limit your search to 2^(p^2)-1, where p is a Mersenne prime exponent, you'll find no full factorizations (other than those already known).
|
![]() |
![]() |
![]() |
#7 |
Einyen
Dec 2003
Denmark
343410 Posts |
![]()
Trialfactor limits I reached 2 years ago:
http://www.mersenneforum.org/showpos...7&postcount=29 |
![]() |
![]() |
![]() |
#8 |
(loop (#_fork))
Feb 2006
Cambridge, England
2·7·461 Posts |
![]()
I think pfgw is about the best way to go for this.
I'd imagine that a base-3 PRP test on 2^(11213^2)-1/(2^11213-1) wouldn't be unreasonable on multi-core current hardware, and a p-1 factorisation attempt for q=2281 or q=4423 shouldn't be too painful (9941 or 11213 is more work) - you can put a premultiplier on the command line for gmp-ecm ('-go 368449') to account for the fact that q^2 | p-1 Second-stage of P-1 with gmp-ecm for 2^368449-1 seems slow; ECM with B1=10^3 is 75 seconds per curve. gmp-ecm on 2^(2281^2)-1 at b1=1e4 b2=1678960 takes 4900 seconds for stage 1 and 8396MB and 2374 seconds for stage 2, on a 3.4GHz Sandy Bridge machine I'm trying; didn't find a factor. On 2^(607^2)-1 at b1=1e5 it uses 3.2GB peak per process and about 2200 seconds per curve. Last fiddled with by fivemack on 2013-06-07 at 08:53 |
![]() |
![]() |
![]() |
#9 |
∂2ω=0
Sep 2002
República de California
267538 Posts |
![]()
Testing the cofactor for rigorous primality is expensive, but PRP-testing (starting with the full LL residue) can be done similarly cheaply as cofactor-PRP testing is done for Fermat numbers (starting with a Pépin-test residue).
In the late 1990s I adapted the procedure used for Fermats to PRP-test a bunch of M(p) cofactors (and discovered numerous PRP cofactors up to my search limit of a then-lofty 20k digits or so). My version of the test needed a Pépin-style test residue to be generated for the target M(p), but Peter Montgomery showed me how to use an LL-test residue, thus eliminating the redundant LL-test/Pépin-style-mod-powering effort. |
![]() |
![]() |
![]() |
#10 | |
Aug 2006
176316 Posts |
![]() Quote:
![]() Finding what is already known is (part of) the point of this post! I don't know where to search, and I can think of nowhere better to ask than here. Edit: the answer appears to be "ATH knows all". Last fiddled with by CRGreathouse on 2013-06-07 at 02:33 |
|
![]() |
![]() |
![]() |
#11 | |||
Aug 2006
10111011000112 Posts |
![]() Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
gpuOwL: an OpenCL program for Mersenne primality testing | preda | GpuOwl | 2898 | 2023-01-19 10:15 |
Search for prime Gaussian-Mersenne norms (and G-M-cofactors) | Cruelty | Proth Prime Search | 158 | 2020-07-31 22:23 |
Manual Testing ECM on cofactors? | yih117 | PrimeNet | 24 | 2018-02-03 15:46 |
Feasibility of testing Fermat cofactors | JeppeSN | And now for something completely different | 6 | 2017-02-24 10:17 |
Testing an expression for primality | 1260 | Software | 17 | 2015-08-28 01:35 |