Write with odd. If , the polynomial factor of by , evaluated at , supplies a proper divisor. Therefore must be a power of two. Conversely this is only a necessary condition for primality testing.
For a prime factor of the number, is odd and does not divide . Its multiplicative order satisfies but , since . When is a power of two, every proper divisor of divides , so . By Lagrange theorem in the multiplicative group of a finite field, . Thus .
The Fermat factorization method searches for a difference of two squares: starting at , increase until , and return . Every factorization of an odd integer has this form, with and . For , the successive differences at are . The last is , giving . Trial division by the primes up to their respective square roots confirms that both factors are prime.

Articles by others on the same topic (0)

There are currently no matching articles.