I'm given this relation on a group $G$ and a positive integer $n$.
$$a \sim b \Longleftrightarrow ab^{-1} = g^n$$
for some element $g \in G$. Clearly this relation is symmetric ($aa^{-1} = e^n$) and reflexive, so if it's not going to be an equivalence relation it will fail to be transitive, but if $G$ is commutative it will be transitive ($g^nh^n = (gh)^n$). So I'm looking for an example in a non-abelian group of an $a,b,c$ so that $a \sim b, b \sim c$, but $a$ is not related to $c$.
I've tried hard to find one in $S_3$ and $S_4$ with no luck. Any hints?
This is an equivalence relation if and only if the set $\{ g^n : g \in G \}$ of $n^{th}$ powers is a subgroup. Since it's normal (invariant under conjugation), it's a union of conjugacy classes, and for nice $G$ we can hope to determine exactly which conjugacy classes these are. Then if the sum of their orders doesn't divide $|G|$ they can't be a subgroup.
As Brian M. Scott says in the comments, if $G = S_3, n = 3$ then we are looking at the set of all third powers in $S_3$. A $3$-cycle satisfies $g^3 = e$ and a $2$-cycle is fixed by taking the third power, so the set of all third powers is exactly the set $\{ e, (12), (23), (31) \}$ of $2$-cycles, together with the identity. This has order $4$ and so can't be a subgroup: explicitly, $(12)(23) = (123)$ is not a $2$-cycle.