![]() |
|
|
#12 |
|
Sep 2002
10616 Posts |
:)to test a factor, all you need is the same algorythm that they use in prime95. you wish to test 2^9835211-1, so take the binary number of 9835211.
110100110100100001101001 here is a small basic programm m=9835211 Factor=36293798558667431 fnModulo(Factor,m) modulo=1 length=len(m) for x=length to 0 step -1 modulo=(modulo*modulo) mod Factor if bit(x,m)=1 then modulo=(2*modulo) mod Factor next return(modulo) if modulo=1 then 36293798558667431 is a factor of 9835211 very fast algorythm. |
|
|
|
|
|
#13 | |
|
Aug 2002
3110 Posts |
Quote:
2^15 mod 6 = (2^3)^5 mod 6 = 8^5 mod 6 = 2^5 mod 6 = 2^3 * 2^2 mod 6 = 2 * 4 mod 6 = 2 2^17 mod 7 = (2^3)^5 * 2^2 mod 7 = 8^5 * 4 mod 7 = 1^5 * 4 mod 7 = 4 mod 7 = 4 This works for all values: X mod Y can be calculated very fast this way. There is no need to multiply 9835211 times q * 2 modulo ...... You just need to compute smaller values. I used this formula. X*Y mod Z = XX * YY mod Z where XX = X mod Z and YY = Y mod Z. The "difficult" part is to do it efficiently in the least amount of computations. But even if you waste a few, no big deal. It's still much faster. This is maybe what the other tools are doing. |
|
|
|
|
|
|
#14 |
|
Aug 2002
2·3·5 Posts |
jocelynl has got it quite right. It might help to look at the GIMPS home page quickie description of the algorithm at
http://www.mersenne.org/math.htm under "Trial Factoring". Chris Caldwell's Prime Pages glossary has an entry for the Binary Exponentiation algorithm upon which this is based: http://primes.utm.edu/glossary/page.php?sort=BinaryExponentiation HTH |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 'Verifying' a Mersenne prime vs. 'proving' it | Rodrigo | Information & Answers | 28 | 2011-02-14 23:43 |
| Missing factors at the 'Known Factors' page | MatWur-S530113 | PrimeNet | 11 | 2009-01-21 19:08 |
| I need some factors | MatWur-S530113 | Math | 21 | 2007-05-12 19:36 |
| The factors of 11,199- | Jeff Gilchrist | NFSNET Discussion | 2 | 2004-09-27 23:40 |
| Introducing GIMPS, Now Verifying M10,000,000+! | E_tron | Lounge | 7 | 2003-09-16 21:30 |