Modular Mathematics

29 isn't all that big. You could just check every number from 0 to 28: 17(0^2)= 0 not 10, 17(1^2)= 17 not 10, 17(2^2)= 17(4)= 68= 2(29)+ 10 = 10 (mod 29)!!! Of course, there may be other solutions.

Similarly, 0^2- 4(0)- 16= -16= 13 (mod 29) not 0, 1^2- 4(1)- 16= -21= 8 (mod 29), etc. Or you could note that x^2- 4x- 16= x^2- 4x+ 4- 20= (x- 2)^2- 20= 0 which is the same as (x- 2)^2= 20. Solve y^2= 20 (mod 29) and then x= y+ 2.
 
Top