Example
Considering the factor base {2,3,5,7}, we will try to factor 84923.
5132 mod 84923 = 8400 = 24*3*52*7
5172 mod 84923 = 33600 = 26*3*52*7
so
(513.537)2 mod 84923 = 210.32.54.72
513 times 537 is 20712 (mod 84923).
That is,
207122 mod 84923 = (25.3.552.7)2 mod 84923 = 168002 mod 84923
We then look at 20712-16800 = 3912 and 20712+16800 = 37512, and compute their greatest common divisors with 84923 by using Euclid's algorithm. This is 163 in the case of 3912, and 521 in the case of 37512; and, indeed, 84923 = 521 * 163.
REFERENCES
1. http://en.wikipedia.org/wiki/Trial_division
2. Richard P. Brent. An Improved Monte Carlo Factorization Algorithm, BIT 20,
1980, pp.176-184
3. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein.
Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 31.9: Integer factorization, pp.896–901
4. http://en.wikipedia.org/wiki/Pollard%27s_p-1_algorithm
5. http://www.mersennewiki.org/index.php/P_Plus_1 MersenneWiki article about p+1 factorization method.
6. Lenstra Jr., H. W. "Factoring integers with elliptic curves." Annals of
Mathematics (2) 126 (1987), 649-673. MR 89g:11125.
7. Brent, Richard P. "Factorization of the tenth Fermat number." Mathematics of
Computation 68 (1999), 429-451.
8. http://en.wikipedia.org/wiki/Fermat%27s_factorization_method
9. J. D. Dixon, "Asymptotically fast factorization of integers," Math. Comput.,
36(1981), p. 255-260.