4 ms·
The normal approach would be the following: a = ceil(sqrt(N)) = 12772 b2 = (12772+1)*(12772) - N = 13045 <- factorize = 5*2609 <- does not fit in (b+1)*(b) b
by marcookker 5y ago
The normal approach would be the following:
a = ceil(sqrt(N)) = 12772
b2 = (12772+1)*(12772) - N = 13045 <- factorize = 5*2609 <- does not fit in (b+1)*(b)
b2 = (12773+1)*(12773) - N = 38591 <- factorize = 149*259 <- does not fit in (b+1)*(b)
...
- ColinWright 5y agoBut why are you just using c=1? Surely you should be using different c's to make this algorithm work. Using c=1 makes your algorithm effectively identical to the vanilla Fermat algorithm. Elsewhere you talk about selecting different possible values of c, but with no reasoning as to why this should work faster, or better, or even at all. And in cases where you choose c=something else, you don't tell us how to compute a and b, and it seems to me that they have multiple solutions, some of which are tantamount to factoring N anyway. So I am none the wiser, and I await a proper, detailed explanation where I can follow, or even implement, the algorithm.