mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2011-08-01, 22:54   #1
siegert81
 
Dec 2010

2×37 Posts
Default Question

In the factoring programs, when a factor is discovered, did the program actually perform a full division and evaluate the result as having no remainder, or is some sort of divisibility test used?

In other words, is there a divisibility test that gives a "yes or no" answer to the question "is N divisible by p?"

For the purposes of finding factors, we don't really need all of the information a full division provides. All we need is the binary "yes or no" result. Exact quotients and remainders are useless.
siegert81 is offline   Reply With Quote
Old 2011-08-02, 04:40   #2
wblipp
 
wblipp's Avatar
 
"William"
May 2003
New Haven

2·7·132 Posts
Default

"is N divisible by p" is answered by finding the answer to "does N mod p = 0." N mod p is also known as the remainder. In many cases it can be calculated much more quickly than "doing a division" by using the rules of modular arithmetic. In particular,

(a+b) mod p = ((a mod p) + (b mod p)) mod p.
(ab mod p) = ((a mod p) * (b mod p)) mod p

The last one is especially useful for large powers, which you calculate through successive squarings or sometimes even cleverer "ladders."

Last fiddled with by wblipp on 2011-08-02 at 04:42
wblipp is offline   Reply With Quote
Old 2011-08-02, 04:46   #3
S485122
 
S485122's Avatar
 
Sep 2006
Brussels, Belgium

13·131 Posts
Default

Look on the GIMPS site. In the menu on the left you will find an item "About GIMPS", when you click on the + on the left of the line it it will expand. Then you will find a line "The Math". The method GIMPS uses for trial factoring is explained there.

Jacob
S485122 is offline   Reply With Quote
Reply



All times are UTC. The time now is 15:57.


Mon Aug 2 15:57:12 UTC 2021 up 10 days, 10:26, 0 users, load averages: 1.78, 2.06, 2.19

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.