Also known as the difference of squares method. It was first used by Fermat and improved by Gauss. Gauss looked for integers and
satisfying
for various moduli . This allowed the exclusion of many potential factors. This
method works best when factors are of approximately the same size, so it is sometimes
better to attempt
for some suitably chosen value of
.