Solving the congruence x2 a (mod m)

This works for m with up to say 20 digits, due to the limitations of the program used to factor m.
Using the Chinese remainder theorem, the problem is reduced to the case of a prime power pn:

Enter a:
Enter m (≥ 1):

Last modified 20th January 2005
Return to main page