I'm asked to prove that if $\gcd(n,p-1)=1$ where p is prime, then $$x^n\equiv a \pmod{p}$$ has exactly one solution. What I've done so far is the following,
Since $\gcd(n,p-1)=1$, that means, except for $1$, there is no least residue $r$ such that $r^n\equiv 1\pmod{p}$. Moreover, it would suffice to show that every least residue raised to $n$ is cogruent to another unique least residue or, in other words, for any two least residues $a,b$, $$a^n\equiv b^n\pmod{p}\quad\to\quad a\equiv b\pmod{p}.$$ To do so, suppose $a^n\equiv b^n\pmod{p}$, then $$p\mid (a-b)(a^{n-1}+a^{n-2}b+\dots + b^{n-2}a+ b^{n-1})$$ and so $p$ must divide one of those terms. At this point, I tried to show that $p\nmid (a^{n-1}+a^{n-2}b+\dots + b^{n-2}a+ b^{n-1})$ by finding a contradiction but I got stuck. I'm thinking maybe one of my earlier steps was incorrect because I'm not really using the fact that $\gcd(n,p-1)=1$ in the proof. Am I heading in the right direction here ?