Advertisements

Let m be an odd positive integer we wish to factor. Let c be the smallest integer (also positive) so that c^{2}>m. (If m is a perfect square, we are done.) Set r=c^{2}-m.

The least non-negative value of x for which x^{2}+2cx+r is a perfect square is a value of x which produces s=c+x whose square differs from m by a perfect square amount t^{2}: m=s^{2}-t^{2}=(s+t)(s-t), quite probably a desired factorization. (With hat-tip to Pierre de Fermat.)

## Leave a ReplyCancel reply