Talk:Fermat's factorization method
![]() | Mathematics Start‑class Low‑priority | |||||||||
|
The 1st paragraph under sieve imrovements is very unclear. I assume some of these restrictions come about because of the value of N mod 20 etc? This should be explained. This paragraph needs to be expanded with a better step-by-step explanation. —Preceding unsigned comment added by 210.84.56.174 (talk) 02:52, 21 November 2007 (UTC)
The whole article is unclear...
10:55, 6 September 2008 (UTC)
mod 16 optimization
Need to mention that the optimization section needs some remarks, there are more variants of a.
For each N mod 16, the a mod 16 must be as follows:
N mod 16 | variants of a mod 16 |
---|---|
1 or D | 8±4±3 = { 1,7,9,F } |
3 or B | 8±4±2 = { 2,6,A,E } |
5 or 9 | 8±4±1 = { 3,5,B,D } |
7 or F | 6±4±2 = { 0,4,8,C } |
-in order for a² - N to be square.
As you can notice, all even N are skipped - Fermat method does not test them.
Example in hexadecimal format:
Let N be 175116.
The right digit of N is 1, from table, right digit of a can only be 1,7,9 or F.
So we test for a only 4F, 51, 57 and get result a² - N = 57162 - 175116 as a perfect square.