If $p$ is congruent to $2 \pmod 3$, how can I prove that all $a$, $1 \le a \le p-1$ are cubic residues $\mod p$? If $p$ is congruent to $2 \pmod 3$, how can I prove that all $a$, $1 \le a \le p-1$ are cubic residues $\mod p$?
Here's what I've done:
$1^3$ congruent to $1 \pmod p$ thus, 1 is a cubic residue,
Also
$(p-1)^3=(p-1) \pmod p$ implies 
$$(p-1)^3 - (p-1) = (p-1)[(p-1)^2 -1] = (p-1)(p^2 -2p) = p(p-1)(p-2) $$ implies $$p|(p-1)^3 -(p-1)$$
Thus  $p-1$ is a cubic residue $\mod p$.
Now I don't know how to show for $1\lt a \lt p-1$ are all cubic residues when $p$ is congruent to $2\pmod 3$.
 A: Claim: Suppose $p$ is a prime congruent to $2\bmod 3$. Then, $0^3,1^3,2^3,\ldots,(p-1)^3$ are all different modulo $p$. 
Hint for the proof of the claim: The result is clear if $p=2$, so assume $p>2$. Suppose $u^3\equiv v^3 \bmod p$. Then $u\equiv v \bmod p$, or $u^2+uv+v^2\equiv 0 \bmod p$. But the latter is impossible when $p\equiv 2 \bmod 3$ (complete the square). 
Corollary: There is an equality of sets $\{0^3,1^3,2^3,\ldots,(p-1)^3\}=\{0,1,2,3,\ldots,p-1\}$, i.e., every congruence class in $\mathbb{Z}/p\mathbb{Z}$ is a cube.
A: Hint: Every $1\leq a\leq p-1$ is a cubic residue if and only if the cube map $c:(\mathbb{Z}/p\mathbb{Z})^\times\to (\mathbb{Z}/p\mathbb{Z})^\times$, defined by $c(x)=x^3$, is surjective. A function from a finite set to itself is surjective if and only if it is injective, and a homomorphism is injective its kernel is trivial. The kernel of $c$ is
$$\ker(c)=\{x\in(\mathbb{Z}/p\mathbb{Z})^\times\mid x^3=1\}.$$
Now think about Lagrange's theorem, the possible sizes of $\ker(c)$, and the size of $(\mathbb{Z}/p\mathbb{Z})^\times$ given that $p\equiv 2\bmod 3$.
A: We use more machinery than necessary, Let $g$ be a primitive root of $p$. Then for some $k$ we have $a\equiv g^k\pmod{p}$. 
Let $p=3n+2$. Then by Fermat's Theorem we have $g^{3n+1}\equiv 1\pmod{p}$, and $g^{6n+2}\equiv 1\pmod{p}$. 
Note that 
$$a\equiv g^k\equiv g^{k+3n+1}\equiv g^{k+6n+2}\pmod{p}.$$
Exactly one of $k$, $k+3n+1$, and $k+6n+2$ is divisible by $3$. Call it $3d$. Then 
$$a \equiv (g^d)^3 \pmod{p},$$ 
so we have obtained a  semi-explicit expression for the cube root of $a$ modulo $p$. 
