(a) Prove that, if p is prime and a is not a multiple of p, then ap−1≡1(modp).
(b) The order of a(modp) is the least positive integer d such that ad≡1(modp). Suppose now that ax≡1(modp); what can you say about x in terms of d ? Show that p≡1(modd).
(c) Suppose that p is an odd prime. What is the order of x(modp) if x2≡−1(modp) ? Find a condition on p(mod4) that is equivalent to the existence of an integer x with x2≡−1(modp).