4.II .7 B. 7 \mathrm{~B} \quad

Numbers and Sets
Part IA, 2002

(a) Suppose that pp is an odd prime. Find 1p+2p++(p1)p1^{p}+2^{p}+\ldots+(p-1)^{p} modulo pp.

(b) Find (p1)(p-1) ! modulo (1+2++(p1))(1+2+\ldots+(p-1)), when pp is an odd prime.