![]() |
|
|
#12 | ||
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
Quote:
Quote:
I've written this: Code:
And you can go further: if n=4*k+2, then for all remaining factors p==1 or 3 mod 8. (notice the difference in the condition). |
||
|
|
|
|
|
#13 |
|
Dec 2011
11×13 Posts |
Much of what is being discussed in this thread (and the other thread) mirror the same discussions and pros/cons as for potential Mersenne primes (2^n-1, where n is prime.)
You haven't really made it clear whether you are also concerned about x^n-1, where x != 2. Or whether you are interested in numbers of the form x^n+1. You might search for Chris Caldwell's prime pages and some of the proofs on his pages for some ideas that may also be applicable for non-prime values of n. (Especially odd values of n.) Trial Factoring for the GIMPS project has asked (and answered) most of your questions for the case where x=2 and n is prime. Prime95 and the GPU-to-72 project have had several discussions in these fora. In particular, there are several threads in the Math forum that discuss these issues, especially near the inception of the GPU-to-72 project. (I know I contributed a few remarks related to sieving (in the context of trial factoring) in about 2011 or 2012.) In fact, the math is so similar, you might be able to adapt some of the existing trial factoring programs for your purpose. Good luck! There are also some faster algorithms, compared against old-fashioned long-division, to perform trial factoring. You mentioned dividing out the known factors. But, it might be faster to keep the unfactored dividend. (I.e., keep it as a string of binary 1's.) Finally, this forum's own ewmayer has a recent paper, titled "Efficient long division via Montgomery multiply". The paper discusses some new algorithms and includes some references that are relevant to the questions you have been asking. Good luck! |
|
|
|
|
|
#14 | ||
|
Aug 2006
3·1,993 Posts |
Quote:
Quote:
I'll look it up, thanks. |
||
|
|
|
|
|
#15 | |
|
Sep 2009
2·1,039 Posts |
Quote:
Chris |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Round Off Checking and Sum (Inputs) Error Checking | Forceman | Software | 2 | 2013-01-30 17:32 |
| Prime factors of googolplex - 10. | Arkadiusz | Factoring | 6 | 2011-12-10 15:16 |
| Are all factors prime? | kurtulmehtap | Math | 4 | 2010-09-02 19:51 |
| Speeding up double checking when first test returns "prime" | Unregistered | PrimeNet | 16 | 2006-02-28 02:00 |
| Double Checking Factors | eepiccolo | Software | 6 | 2003-03-10 05:01 |