As the title suggests. Let $G$ be a group, and suppose the function $\phi: G \to G$ with $\phi(g)=g^3$ for $g \in G$ is a homomorphism. Show that if $3 \nmid |G|$, $G$ must be abelian.
By considering $\ker(\phi)$ and Lagrange's Theorem, we have $\phi$ must be an isomorphism (right?), but I'm not really sure where to go after that.
This is a problem from Alperin and Bell, and it is not for homework.