Let p be a prime and k a positive integer.

(a) Show that if x is an integer such that x^2=x mod p, then x= 0 or 1 mod p.

(b) Show that if x is an integer such that x^2=x mod p^k, then x= 0 or 1 mod p^k.

(c) Show that if p is odd and x is an integer such that x^2=1 mod p^k, then x= +/- 1 mod p^k.

(d) Find the solutions of the congruence equation x^2=1 mod 2^k.

Have looked at this for ages and can't get anywhere - any help would be much appreciated.