mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Factoring

Reply
 
Thread Tools
Old 2011-11-26, 07:03   #12
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

211510 Posts
Default

Quote:
Originally Posted by axn View Post
The latter. For comparison, computing Ord_2 for the first 10^5 primes > 2^65 takes PARI about 9min. That's about 4.5 order-of-magnitude shy of 10^7 primes/sec.
Mathematica took 172 seconds to compute the order for 10^5 primes between 2^65 and 2^66.
frmky is offline   Reply With Quote
Old 2011-11-26, 17:20   #13
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·1,579 Posts
Default

Since q is prime ordp(2) = q. But ordp(2) is a factor of phi(p)=p-1.

So for each prime p, we trialfactor p-1 up to 1 billion and check if any of the factors found are ordp(2) ?
ATH is offline   Reply With Quote
Old 2011-11-26, 20:44   #14
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

For each prime power q^k || p-1 you find, you can look for the largest 0 <= i <= k for which 2^((p-1)/q^i) == 1 (mod p); then q^(k-i) exactly divides ord_p(2). Since ((p-1)/something) will include the same prime factors over and over again, maybe it's worthwhile to build some kind of tree. Then again, taking powers of 2 modulo a relatively small prime is pretty fast already, the tree might lose due to overhead.

Last fiddled with by akruppa on 2011-11-26 at 20:50
akruppa is offline   Reply With Quote
Old 2011-11-27, 04:43   #15
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2×1,579 Posts
Default

I am still missing how ordp(2) can be composite?

If p | Mq => 2q = 1 (mod p) => q = k*ordp(2), but since we are only interested in q prime then k=1 and ordp(2) is prime and equal to q?

So if p-1 = r1^k1 * r2^k2 * ... * rn^kn then we only need to check if ordp(2) is r1, r2... up to 1 billion?

Last fiddled with by ATH on 2011-11-27 at 04:47
ATH is offline   Reply With Quote
Old 2011-11-27, 06:42   #16
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

72·197 Posts
Default

Ord(2,M=2^p-1) it is always p, which is prime. Ord(2,q), where q divides M it is always p, no matter if q is prime or not. There is a simple theorem saying that ord(x,a*b)=lcm(ord(x,a),ord(x,b)) for x prime and any a,b.

Ex: Ord(2,2^29-1)=29. Because the smallest power you need to raise 2 to get 1 mod M, is 29. There is no other smaller power. Therefore, ord(2,233)=29, ord(2,1103)=29, ord(2,2089)=29, ord(2,233*1103)=29, and so on. If any of them would be different, then by the LCM theorem above we would get ord(2,M)>29, which is impossible.

Generally, ord(2,q) can be composite. Ord(2,73)=9, ord(2,13)=12, etc.

I played with these things long time ago. I was hunting factors of mersenne numbers Mp not by p, but by k in 2*k*p+1. Still have the files with all factors below 2^56 or so, for all exponents under 10 billions. I also tried (random) higher numbers (see here some discussion) and sometime got lucky to find a factor after hours of (random) search. The problem with this method is EXACTLY one described by akruppa in post #3 above, in this thread. The method is feasible under approximatively 2^56 (for the factor q, not for k) with a HIGHLY optimized program (for CPU). For the pari script presented in the link above, the cut-off is somewhere between 2^29 and 2^33, depending of how fast is your computer. Over this limits, you will try TOO MANY numbers q whose order is q-1, or (q-1)/2 (the most of the primes, even if you filter them by 8k\pm 1) which are NOT INTERESTED for our domain (lower then a billion).

Last fiddled with by LaurV on 2011-11-27 at 06:44
LaurV is offline   Reply With Quote
Old 2011-11-27, 11:28   #17
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

ATH, yes, if you want to restrict reported factors to those of Mersenne numbers with prime exponent, then just check whether 2^q==1(mod p) for each prime factor q of p-1.
akruppa is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trial Factoring on AMD/ATI GPU's? Stargate38 GPU Computing 9 2018-08-31 07:58
What is Trial Factoring? Unregistered Information & Answers 5 2012-08-02 03:47
over trial factoring JFB Software 23 2004-08-22 05:37
Trial factoring Citrix Software 7 2004-02-26 03:24
About trial factoring gbvalor Math 4 2003-05-22 02:04

All times are UTC. The time now is 17:04.


Sun Aug 1 17:04:42 UTC 2021 up 9 days, 11:33, 0 users, load averages: 1.38, 1.19, 1.28

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.