here are some little number theory puzzles:"clock arithmetic" is arithmetic where 12 = 0, i.e. whenever you ad 12 to a number you get back to the same number.
arithmetic "modulo" p, is arithmetic where you get back to the same number whenever you add p to that number. Thus the complete set of different numbers is 0,1,2,3,4,...,p-1. e.g. modulo 5, 2+6 = 3+5 = 3. Thus two numbers (integers) a,b are equal modulo p if a-b is a multiple of p. e.g. 8 and 3 are equal modulo 5, and 81 and -1 are equal modulo 41.
interestingly, if p is a prime number of form 4n+1, such as 5 or 13, or 17, ...(there are infinitely many of them), then there is an integer x such that x^2 = -1, modulo p. e.g. 2^2 = -1, modulo 5, and 4^2 = -1, modulo 17, and 9^2 = -1 modulo 41.
this follows from another basic number theory fact - "wilson's theorem" -that the product of the numbers 1,2,3,...,(p-1) is equal to -1 modulo p, if p is prime.
can you deduce the fact that X^2 = -1 hasan integer solution modulo any prime p, from wilson's theorem?
try looking at the example modulo 5, where (1)(2)(3)(4) = (1)(2)(-2)(-1) = 4 = -1, modulo 5. or the example modulo 11, where (1)(2)(3)(4)(5)(6)(7)(8)(9)(10) = (1)(2)(3)(4)(5)(-5)(-4)(-3)(-2)(-1) = (120)(-120) = (-1)(1) = -1, modulo 11.can you saee why wilsons theorem, i.e. the fact that the product
(1)(2)(...)(p-1) = -1, modulo p, will lead to a solution of X^2 = -1, modulo p?This is not so easy, so give it a try, but you may not see it at once. I probably would not have done so as a student.