![]() |
|
|
#12 |
|
Jul 2003
So Cal
211510 Posts |
|
|
|
|
|
|
#13 |
|
Einyen
Dec 2003
Denmark
2·1,579 Posts |
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) ? |
|
|
|
|
|
#14 |
|
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
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 |
|
|
|
|
|
#15 |
|
Einyen
Dec 2003
Denmark
2×1,579 Posts |
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 |
|
|
|
|
|
#16 |
|
Romulan Interpreter
Jun 2011
Thailand
72·197 Posts |
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 Last fiddled with by LaurV on 2011-11-27 at 06:44 |
|
|
|
|
|
#17 |
|
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
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.
|
|
|
|
![]() |
| 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 |