Prove that the congruence $x^{5} \equiv a \pmod p$ has a solution for every integer $a$

elementary-number-theorymodular arithmetic

Let $p$ be a prime such that $5 \nmid p-1$. Prove that the polynomial congruence $x^{5} \equiv a \pmod p$ has a solution for every integer $a$.

I struggle to solve the case where $p \nmid a$. I've thought about using the existence of primitive roots modulo $p$ to apply the theorem which holds that if $g$ is a primitive root modulo $p$, then the set $\{g,g^{2},…,g^{p-1}\}$ runs through all the invertible congruence classes modulo p, but I haven't have luck.

Best Answer

Hint. If $\gcd(p-1,5)=1$ then there are $x,y\in \mathbb{Z}$ such that $(p-1)x+5y=1$.