Let p be a prime number, and x,n integers with n⩾1.
(i) Prove Fermat's Little Theorem: for any integer x,xp≡x(modp).
(ii) Show that if y is an integer such that x≡y(modpn), then for every integer r⩾0,
xpr≡ypr(modpn+r)
Deduce that xpn≡xpn−1(modpn).
(iii) Show that there exists a unique integer y∈{0,1,…,pn−1} such that
y≡x(modp) and yp≡y(modpn)