Fermat's factorization method: Difference between revisions

Content deleted Content added
Tag: Reverted
Tag: Reverted
Line 17:
FermatFactor(N): ''// N should be odd''
a ← {{Not a typo|ceiling(sqrt(N))}}
b^2 ← a*a^2 - N
'''repeat until''' b^2 '''is''' a square:
a ← a + 1
b^2 ← a*a^2 - N
// equivalently:
// b^2 ← b^2 + 2*a + 1''
// a ← a + 1