Finding square roots mod p by Tonelli's algorithm

Here p is an odd prime and a is a quadratic residue (mod p).

See Square roots from 1; 24, 51, 10 to Dan Shanks, Ezra Brown, The College Mathematics Journal 30 No. 2, 82-95, 1999.

Also see version in MP313 lecture notes.

Enter a:

Enter the odd prime p:

Last modified 2nd June 2006
Return to main page