A fast simulation of the Quadratic Sieve (QS) algorithm for factoring moderately large integers using the square root method.
Objective: Find $x$ such that $(a+x)^2 - N$ is smooth over the selected factor base.