TITLE: In a group, does $(xy)^n=x^ny^n$ for $n\geq 3$ imply $xy=yx$?
QUESTION [6 upvotes]: Let $G$ be a group and let $x,y\in G$ such that $(xy)^n=x^n y^n$
for every $n\geq 3$. Does it necessarily follow that $x$ and $y$
commute ?
My thoughts : from $(xy)^{n+1}=x^{n+1} y^{n+1}$ we deduce
$x^{n+1} y^{n+1}=xy(xy)^n=xyx^ny^n$, whence $x^ny=yx^n$ for every
$n\geq 3$, so we are done if $x$ (or $y$) has finite order. But I
do not see how to continue when both $x$ and $y$ have infinite
order.
I seem to remember that an identical (or very close) question was asked
here on MSE some time ago, but I couldn't find it.

REPLY [7 votes]: As you have already, $x^ny=yx^n$.  By the same argument, $x^{n+1}y=yx^{n+1}$.  Hence
$$yx^{n+1}=xx^ny=xyx^n$$
and so $yx=xy$.
Comment.  In fact, this shows that if the relation $(xy)^n=x^ny^n$ is true for three consecutive positive integers $n$, then $x$ and $y$ commute.