(i) State and prove the Fermat-Euler Theorem.
(ii) Let p be an odd prime number, and x an integer coprime to p. Show that x(p−1)/2≡±1(modp), and that if the congruence y2≡x(modp) has a solution then x(p−1)/2≡1(modp).
(iii) By arranging the residue classes coprime to p into pairs {a,bx} with ab≡1(modp), or otherwise, show that if the congruence y2≡x(modp) has no solution then x(p−1)/2≡−1(modp).
(iv) Show that 555≡5(mod23).