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$?

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$.


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$.