5. (a) Suppose p is prime, p ∤ a and k = gcd(n, p - 1). If a^{(p-1)/k} ≡ 1 (mod p), prove that the congruence x^n ≡ a (mod p) has a solution.
(b) For a prime p and p ∤ a, a is called a cubic residue modulo p if the congruence x^3 ≡ a (mod p) has a solution. Prove that if p = 3k + 2 then all the integers in a reduced residue system are cubic residues modulo p.