Cornacchia's algorithm searches for primitive integer solutions of by combining a modular square root of modulo with the Euclidean algorithm. In the standard odd-prime case , choose a root with , run the Euclidean algorithm on until a remainder occurs, and test whether is a nonnegative integer square. Both roots can be tried.
For , the root of gives the remainder , and , yielding . The final exact square test is essential: a modular root is only a candidate-producing input. For general composite moduli, additional hypotheses and choices are required to enumerate primitive solutions.

Articles by others on the same topic (0)

There are currently no matching articles.